You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
business_cycle is one of the eight lectures this repo excludes ("WASM-unsupported", README; commented out of lectures/myst.yml). It was excluded because every one of its data reads is a live API call — wbgapi against the World Bank and pandas_datareader against FRED — and Pyodide cannot make them (no CORS on the API hosts, and wbgapi needs requests patched). That reason no longer has to hold: QuantEcon/data-lectures now serves cached snapshots over raw.githubusercontent.com, which is CORS-clean and already works in this build (long_run_growth, inflation_history, french_rev, heavy_tails, inequality all read it in-browser today), and it has a weekly refresh-as-PR workflow so a snapshot of a moving series stays current. This issue is the review of what including the lecture would take, and the proposal for doing it.
What the lecture reads today
Measured against lectures/business_cycle.md on 2026-09-01. Nine live reads across two sources; the ones a snapshot already covers are marked.
JupyterLite's "Run all" stops at the first failing cell, so the lecture is runnable only when every row above is served from a snapshot. A partial repoint buys nothing for readers.
What data-lectures would add
Per the design agreed on the data-lectures side (one builder per source, composite files, a shared fetch library — QuantEcon/data-lectures#26):
World Bank: business_cycle_data.csv extended from five economies to the eight-economy union (it has no consumers yet, so that is free today and a breaking change once this repo reads it), plus the unemployment and private-credit tables from the same builder.
FRED: one composite monthly file for the lecture — UNRATE, USREC, UMCSENT, CPILFESL, INDPRO and the 1929–42 historical unemployment series on one date index, 1919 → latest — built by a builders/_fred.py helper against fredgraph.csv (no pandas_datareader in the builder, per the decision on data-lectures#26). FRED's UNRATE carries one structural null, 2025-10 (the shutdown month BLS never published), which the manifest will declare.
Both class: dynamic-snapshot, refreshed by the weekly workflow; this repo would be listed in their manifests as a consumer with on_refresh: rebuild, so a merged refresh triggers a build here.
What this repo would change
lectures/business_cycle.md: every wb.data.DataFrame(...) and web.DataReader(...) becomes a pd.read_csv('https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/<file>') with the same selection applied in pandas (.loc[[...]], a date slice). The %pip install wbgapi … pandas-datareader cell and both imports go. The API-teaching cells (wb.series.info, wb.series.metadata.get) cannot run here and are not the point of this edition — shown as non-executing code blocks with a one-line note that the intro edition runs them live. lecture-python-intro keeps every live call: the API is the lesson there, and that is a deliberate split, not drift.
lectures/myst.yml: uncomment business_cycle; README: remove it from the unsupported list.
data-lectures: extend the World Bank snapshot and land the FRED composite (two PRs, builders + manifests, consumers: []).
This repo: the lecture edit, toc and README — a preview build on Netlify proves the in-browser run.
data-lectures: the flip — consumers recorded with on_refresh: rebuild, migration.yml → repointed, which is what re-arms the audit's drift check for these files.
Repoint rules apply as usual (data-lectures PLAN.md): this repo publishes on push to main, so no repoint/publish/delete split is needed, and nothing is deleted anyway — there is no committed copy to remove.
Part of the P4 dynamic-snapshot pilot (QuantEcon/meta#338; data-lectures PLAN.md Phase 8). See QuantEcon/data-lectures#109, #110 and #112 for the snapshot, the workflow and its first refresh.
business_cycleis one of the eight lectures this repo excludes ("WASM-unsupported", README; commented out oflectures/myst.yml). It was excluded because every one of its data reads is a live API call —wbgapiagainst the World Bank andpandas_datareaderagainst FRED — and Pyodide cannot make them (no CORS on the API hosts, andwbgapineedsrequestspatched). That reason no longer has to hold:QuantEcon/data-lecturesnow serves cached snapshots overraw.githubusercontent.com, which is CORS-clean and already works in this build (long_run_growth,inflation_history,french_rev,heavy_tails,inequalityall read it in-browser today), and it has a weekly refresh-as-PR workflow so a snapshot of a moving series stays current. This issue is the review of what including the lecture would take, and the proposal for doing it.What the lecture reads today
Measured against
lectures/business_cycle.mdon 2026-09-01. Nine live reads across two sources; the ones a snapshot already covers are marked.wb.series.info(q='GDP growth'),wb.series.metadata.get(...)NY.GDP.MKTP.KD.ZGbusiness_cycle_data.csv(five economies, 1960→2025, refreshed annually)NY.GDP.MKTP.KD.ZGSL.UEM.TOTL.NE.ZSFS.AST.PRVT.GD.ZSM0892AUSM156SNBRUNRATEUSRECUMCSENT,CPILFESLINDPROJupyterLite's "Run all" stops at the first failing cell, so the lecture is runnable only when every row above is served from a snapshot. A partial repoint buys nothing for readers.
What data-lectures would add
Per the design agreed on the data-lectures side (one builder per source, composite files, a shared fetch library — QuantEcon/data-lectures#26):
business_cycle_data.csvextended from five economies to the eight-economy union (it has no consumers yet, so that is free today and a breaking change once this repo reads it), plus the unemployment and private-credit tables from the same builder.UNRATE,USREC,UMCSENT,CPILFESL,INDPROand the 1929–42 historical unemployment series on one date index, 1919 → latest — built by abuilders/_fred.pyhelper againstfredgraph.csv(nopandas_datareaderin the builder, per the decision on data-lectures#26). FRED'sUNRATEcarries one structural null, 2025-10 (the shutdown month BLS never published), which the manifest will declare.class: dynamic-snapshot, refreshed by the weekly workflow; this repo would be listed in their manifests as a consumer withon_refresh: rebuild, so a merged refresh triggers a build here.What this repo would change
lectures/business_cycle.md: everywb.data.DataFrame(...)andweb.DataReader(...)becomes apd.read_csv('https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/<file>')with the same selection applied in pandas (.loc[[...]], a date slice). The%pip install wbgapi … pandas-datareadercell and both imports go. The API-teaching cells (wb.series.info,wb.series.metadata.get) cannot run here and are not the point of this edition — shown as non-executing code blocks with a one-line note that the intro edition runs them live.lecture-python-introkeeps every live call: the API is the lesson there, and that is a deliberate split, not drift.lectures/myst.yml: uncommentbusiness_cycle; README: remove it from the unsupported list.wasmbranch", but that branch is 125 commits behind intromainand carries none of the data-lectures repoints, while the last ten PRs here (long_run_growth: read mpd2020.xlsx from data-lectures, not from intro's repo #52–short_path: write the graph with %%file, and move the cell so it can run #63) all editedlectures/directly. The rule is dead and should say so, or the sync should be revived; either way this PR follows the practice.Sequence
consumers: []).consumersrecorded withon_refresh: rebuild,migration.yml→repointed, which is what re-arms the audit's drift check for these files.Repoint rules apply as usual (data-lectures
PLAN.md): this repo publishes on push tomain, so no repoint/publish/delete split is needed, and nothing is deleted anyway — there is no committed copy to remove.Part of the P4 dynamic-snapshot pilot (QuantEcon/meta#338; data-lectures
PLAN.mdPhase 8). See QuantEcon/data-lectures#109, #110 and #112 for the snapshot, the workflow and its first refresh.