Retail

The Monthly Retail Trade Survey

The following is the attributes collected by the retail trade survey.

retail.query("select * from data limit 10").iloc[0]
date                                                                              REF_DATE
geo                                                                                    GEO
dguid                                                                                DGUID
classification    North American Product Classification System (NAPCS) Canada 2017 Version
UOM                                                                                    UOM
UOM_ID                                                                              UOM_ID
scalar_factor                                                                SCALAR_FACTOR
scalar_id                                                                        SCALAR_ID
vector                                                                              VECTOR
coordinate                                                                      COORDINATE
value                                                                                VALUE
status                                                                              STATUS
symbol                                                                              SYMBOL
terminated                                                                      TERMINATED
decimals                                                                          DECIMALS
Name: 0, dtype: object

The following is the national retail activity from June 2020 to August 2021.

df = retail_sales.groupby('date').value.sum().rolling(5).mean().iloc[4:]
df = df / df['2019-10-01'] * 100
retail_rel = df
retail_rel.plot.line();
pl.title('National level retail activity');
_images/retail_6_0.svg

Retail Labour Force Survey

We are able to use the labour force survey to obtain insight into the retail activity in Toronto area.

We assume that the employment in the retail industry is strongly correlated to the retail activity.

lfs = labourforce.dataframe(cma="Toronto")

The following is the plot of the unemployment rate in the retail industry in Toronto area from June 2020 to October 2021.

#
# unemployment rate
#

df = lfs[['date', 'lfsstat']].groupby(['date', 'lfsstat']).size()
df = df.reset_index(level=1).pivot(columns='lfsstat')
df.columns = [x[-1] for x in df.columns.values]
df = df['Unemployed'] / df.sum(axis=1) * 100
df = df.rolling(5).mean().iloc[4:]
unemploy_rel = df / df['2019-10-01'] * 100
unemploy_rel.plot.line();
pl.title('Unemployment rate of retail in Toronto');
_images/retail_11_0.svg

We can compare the trends of retail unemployment rate in Toronto with the national retail activity.

fig, ax = pl.subplots(figsize=(10, 5))
ax2 = ax.twinx()

ax.set_ylabel('Unemployment (relative)')
ax2.set_ylabel('National retail sales')
              
unemploy_rel.plot.line(ax=ax, label='Unemployment');
ax.legend(['Toronto Retail Unemployment']);

retail_rel.plot.line(ax=ax2, style='--', color='gray');
ax2.legend(['National Retail']);
_images/retail_13_0.svg

Next we correlate the duration of employement in the retail industry in Toronto with the national retail activity.

fig, ax = pl.subplots(figsize=(10, 5))
ax2 = ax.twinx()

ax.set_ylabel('Unemployment Duration (months)')
ax2.set_ylabel('National retail sales')

dur_unemp.plot.line(ax=ax, label='Unemployment');
retail_rel.plot.line(ax=ax2, style='--', color='gray');

pl.title('Unemployment Duration vs Retail Activity');
_images/retail_16_0.svg

Finally, we correlate the retail hourly earning in the retail industry in Toronto with the national retail activities.

fig, ax = pl.subplots(figsize=(10, 5))
ax2 = ax.twinx()

ax.set_ylabel('Salary (hourly)')
ax2.set_ylabel('National retail sales')

hrlyearn.plot.line(ax=ax, label='Unemployment');
retail_rel.plot.line(ax=ax2, style='--', color='gray');
_images/retail_19_0.svg