# AI exposure and unemployment in Canada

Did unemployment in Canada's most AI-exposed occupations rise more than in the least exposed after ChatGPT's release?
This study applies a published US design to Statistics Canada's Labour Force Survey public file, 2016 to 2026. Exposed
groups have the lower unemployment throughout, and on its face their gap to the least exposed was 0.71 points narrower after the
release than in 2016 to 2019 and 2022 (95% interval 0.09 to 1.26). But it may already have been narrowing, so the rule written in
advance does not count it as the release's effect. That does not show there was none: against 2022 alone the interval reaches 0.68 points. The page is `index.html`.

## Data

- Statistics Canada, Labour Force Survey public-use microdata file (71M0001X), January 2016 to September 2026. No
  record-level data is in this download. `data/public-cells/` holds group-by-period aggregates for the 20 High and Low
  occupation groups, which are enough to recompute the declared estimates.
- The exposure score, credited under "Source of the exposure score" below. `data/derived/exposure_noc21_unit.csv` and
  `data/derived/exposure_noc43.csv` hold the scores by Canadian occupation unit and by survey group, and
  `data/derived/treatment_noc43.csv` holds each group's High, middle or Low arm under each score. They are the study's
  files, byte for byte. `data/raw/hf-aei-lmi/job_exposure.csv` is the dataset's US score table, unmodified.
- `data/sources.json` lists the study's public inputs with their download pages and sha256 hashes, so you can fetch the
  same files. The score dataset's address is in the credit below and in `NOTICE.txt`.

## What you can run from this download

Python 3.12 with `numpy==2.2.6` and `scipy==1.15.3`. Those versions matter: a newer numpy refuses one conversion in the
frozen estimator.

```
python3 -B code/tests/test_estimators.py
python3 -B code/tests/test_wald_power.py
python3 -B tests/test_public.py
python3 -B tools/replay.py
```

`tools/replay.py` recomputes the seven pooled estimates, the event studies, the fake break dates and most robustness
rows for the two main outcomes from the published cells, with the study's own code and seeds, and fails on any
difference. `--main-only` does just the seven pooled estimates. It shows the download matches the published numbers. It is not new evidence.

`python3 -B tools/additions.py` runs what was added after the results: each group's own change, the rows without the trades
groups, the earlier period from 2018, bootstrap p-values for the fake dates, the earlier-trend row with both steps
re-estimated, and the log of the rate. `--only` with a section id from the script's usage line does one section and `--compare` checks a run against
`results/additions.json`. These were built after seeing the results, and the declaration of the first set, which is not in the download, recorded their scope, the
bets and what each result makes the page say, committed before any code or run for them. None is a test the plan declared.

`python3 -B tools/additions2.py` runs the second set, declared the same way in `additions/DECLARATION-2.md`: the gap's move by end
year with and without the trades groups, the rows without the trades groups and without software and business on every baseline, each
group left out in turn, the pre-trend tests on noise from this study's own data, and how often the trend interval covers a known
effect. `--only` with a section id from the script's usage line does one section, and `--compare` checks a run against `results/additions-2.json`. The two simulations run one seed per
section, three seeds each; the section ids are in the script's usage line.

`python3 -I -B site/render.py` rebuilds the page from `results/results-public.json` and `assumptions.json`. Claims the
text makes are asserted there, so a changed result stops the build.

`DESIGN.md` is the plan, and `predictions.json` holds its sha256 as `design_sha256`.

`code/build_exposure.py` rebuilds the two exposure files, `data/derived/exposure_noc21_unit.csv` and
`data/derived/exposure_noc43.csv`, from the raw inputs under `data/raw/`: `python3 -B -P code/build_exposure.py .` It also
needs `openpyxl` to read the BLS workbook (checked with 3.1.5). It reads `data/raw/hf-aei-lmi/job_exposure.csv`, which is here, and six inputs that
are not: the capability scores (`gpts-are-gpts/occ_level.csv`), the US employment weights (`bls-oews-2024/oesm24nat.zip`),
Statistics Canada's three correspondence tables (`statcan-noc-crosswalks/`), the Census employment table
(`statcan-census2021-98100449/noc2021_unit_employed_2021.csv`), the survey codebook from the September 2026 file
(`statcan-lfs-2026-09/extracted/LFS_PUMF_EPA_FGMD_codebook.csv`) and the Canada usage shares (the one file under
`hf-aei-canada/`). `data/sources.json` gives their hashes, except the codebook, which comes out of the September 2026
survey file it lists. The usage file is a filtered extract of the 2026-06-26 release, Canada and global rows by occupation,
12.6 MB, above the site's 5 MB limit for one file, so it is not here. The Census table was assembled from Statistics
Canada's web service by a downloader that is not here either. The build also writes a file of counts under `results/`.
`data/derived/treatment_noc43.csv` comes from `code/assign_treatment.py` instead, which needs the survey's record-level
files and so cannot run from this download; the file keeps each group's employment for August to October 2022, the weight
its arms are cut on.

## What you cannot run from this download

These rows need data the published cells do not hold, such as the 23 middle groups, the industry mix, the provinces,
immigrant status or ages 22 to 24: the continuous and cutoff forms, the province effects, the other score constructions,
the non-immigrant and 22 to 24 rows, the industry-mix control, usage against capability and the randomisation inference.
Their results are in `results/results-public.json` and the code that made them is in `code/`.

To re-run those from scratch you would download the survey files listed in `data/sources.json` and run
`code/build_panel.py` and `code/build_extra.py`; `code/assign_treatment.py` then reads the score table,
`data/derived/exposure_noc43.csv`, which is here.

## What is left out, and why

- **When the plan was written.** `DESIGN.md` is here byte for byte, but a reader of this download alone cannot verify the date it was committed.
- **The Canada usage file.** The score build reads a 12.6 MB filtered extract of the usage shares, above the site's 5 MB
  limit for one file; `data/sources.json` gives its hash.
- **The downloaders.** `fetch_lfs.py` and `fetch_census_weights.py` are not here; `data/sources.json` gives the addresses.
- **Internal run files**: run logs, timing, test files that need the survey's record-level data or private files built
  from it, and the study's working notes.

## Edited for publication

`code/estimators.py`, `code/benchmark.py`, `code/poisson_diag.py`, `code/verify_r16.py` and the two test files under
`code/tests/` are byte for byte the study's files. `code/estimate.py`, `code/panel.py`, `code/build_panel.py`,
`code/build_extra.py`, `code/assign_treatment.py`, `code/power.py` and `code/lfs_io.py` had words in docstrings and comments
replaced for publication, and one results-folder name changed to `design`. The parsed program is otherwise identical.

`DESIGN.md`, `code/build_exposure.py`, the three files in `data/derived/` and the charts in `figures/` are byte for byte the
study's files too, so they keep the study's working words and folder names. The charts are drawn from the frozen results. The
row with the earlier trend carried forward in `figures/us_canada.png` shows the interval with the slope held fixed, −0.83 to 0.33; the
page gives the interval with both steps re-estimated, −1.03 to 0.78.

`results/results-public.json` is copied value for value from the study's frozen results file. It leaves out run durations,
quotes from sources and the exposure cut points.

## Files

- `index.html`: the page. `NOTICE.txt`: the credits and licence notices for third-party material.
- `DESIGN.md`: the plan, committed before any estimate.
- `data/derived/`: the exposure scores by unit and by group, and each group's arm. `data/raw/hf-aei-lmi/job_exposure.csv`:
  the source's US score table. `code/build_exposure.py`: the score build. `figures/`: the study's own charts.
- `results/results-public.json`: every result on the page. `results/verify_r16.json`: the extra look at the two post windows.
  `results/additions.json`: the first set added after the results.
  `results/additions-2.json`: the second set. `additions/DECLARATION-2.md`: its declaration.
- `data/public-cells/quarterly.csv`, `half-yearly.csv`: outcomes and fixed weights by group and period.
- `predictions.json`: the rule and the bets. `assumptions.json`: the money assumptions behind "What it is worth".
- `code/`: the study's estimator, panel and checks. `tools/replay.py`: the replay. `tools/additions.py` and `tools/additions2.py`: the additions runs. `tests/test_public.py`: the file checks.
- `site/render.py`, `site/page.css`: the page's source.
- `vendor/viz-design-system/`: the chart kit (version 2.3.0) with its licences.

## Credits and licences

### Source of the exposure score

Paper: Maxim Massenkoff and Peter McCrory, "Labor market impacts of AI: A new measure and early evidence", Anthropic, 2026. https://www.anthropic.com/research/labor-market-impacts

Dataset: Anthropic, Economic Index, https://huggingface.co/datasets/Anthropic/EconomicIndex, file labor_market_impacts/job_exposure.csv.

Canada usage shares: the release of 2026-06-26, Maxim Massenkoff, Eva Lyubich, Szymon Sacher, Zoe Hitzig, Shaoyi Zhang, Ryan Heller and Peter McCrory, "Anthropic Economic Index report: Cadences", Anthropic, 2026. https://www.anthropic.com/research/economic-index-june-2026-report

Licence: CC BY 4.0, https://creativecommons.org/licenses/by/4.0/, with its disclaimer of warranties. The dataset's metadata also names the MIT License; its notice and disclaimer are in NOTICE.txt.

Copyright notice: none is supplied with the dataset.

Adapted: US SOC scores aggregated to Canadian Labour Force Survey occupation groups.

`NOTICE.txt` carries the same credit, the MIT notice and the other credits below.

### Other sources

Adapted from Statistics Canada, Labour Force Survey public-use microdata file (71M0001X), January 2016 to September 2026.
This does not constitute an endorsement by Statistics Canada of this product.

Adapted from Statistics Canada, 2021 Census of Population, table 98-10-0449-01, and from National Occupational
Classification correspondence tables. This does not constitute an endorsement by Statistics Canada of this product.

Adapted from Statistics Canada, table 14-10-0416-01, 2016 to 2025. This does not constitute an endorsement by Statistics
Canada of this product.

Statistics Canada material is used under the Statistics Canada Open Licence. Employment weights for US occupations:
U.S. Bureau of Labor Statistics, Occupational Employment and Wage Statistics, May 2024. Capability score: Eloundou et
al., "GPTs are GPTs" (MIT licence); its file is not copied here, the score files in `data/derived/` hold
group averages of it, and `NOTICE.txt` carries its notice.

Some files are packed in canada-ai-exposure-labour-market-data-1.zip; unzip it here to restore the full export, which the manifest lists file by file.
