From 998b2d912d42a9e05378afa603d64b81ef49b978 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Tue, 11 Aug 2026 14:49:04 +1000 Subject: [PATCH] Read the six folded datasets from data-lectures, not high_dim_data Seven reads across four files. The six datasets moved into QuantEcon/data-lectures (dl#62), so every read follows them -- and the HOST changes too, not just the org and repo. media.githubusercontent.com is the LFS *media* endpoint and routes per path by LFS status. These six were LFS-tracked in high_dim_data and are plain git in data-lectures, so the media host 404s for all of them. Measured: the media URL for data-lectures returns 404 with 0 bytes, the raw URL returns 200. A mechanical org/repo swap preserving the host would have broken every chart in these three lectures. All seven land on raw.githubusercontent.com, including any that used the github.com/*/raw/ redirect form and would have survived a bare org swap. One spelling across all four consuming repos is deliberate: the set 1/2 repoints broke lecture-wasm by "harmonising" its URLs onto the redirect form, whose 302 carries an empty access-control-allow-origin and so is rejected by the browser before it is followed (dl#46). If every repo spells these lines the same way, that class of fix cannot recur. _static/lecture_specific/inequality/data.ipynb is edited by hand. No audit scans _static/**, the build never executes it, and the translation sync is .md-only -- so nothing mechanical would ever carry this change. It is also served: it returns 200 on the published site with the URL in its body. No prose is touched. The lecture's claim that the Forbes billionaires data is a 2020 snapshot is contradicted by the bytes (282 timestamps spanning 2020-04-07 to 2023-04-15, and the chart plots realTimeWorth rather than the annual list), but that is content, not a repoint -- split out to QuantEcon/workspace-lectures#35. The Global 2000 "2020" claim nearby IS correct and is deliberately left alone. Verified: both acceptance greps clean (no media-host data-lectures read, no high_dim_data reference anywhere in lectures/); all 7 URLs return 200; three-way byte identity on the four cross_section files -- manifest sha256 = new URL = old high_dim_data URL, so this changes the address and not the data. Part of QuantEcon/workspace-lectures#23. Data: QuantEcon/data-lectures#62 Co-Authored-By: Claude Opus 5 (1M context) --- lectures/_static/lecture_specific/inequality/data.ipynb | 2 +- lectures/heavy_tails.md | 8 ++++---- lectures/inequality.md | 2 +- lectures/mle.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lectures/_static/lecture_specific/inequality/data.ipynb b/lectures/_static/lecture_specific/inequality/data.ipynb index 97aea6522..1bf3234c6 100644 --- a/lectures/_static/lecture_specific/inequality/data.ipynb +++ b/lectures/_static/lecture_specific/inequality/data.ipynb @@ -34,7 +34,7 @@ "import wbgapi as wb\n", "import plotly.express as px\n", "\n", - "url = 'https://media.githubusercontent.com/media/QuantEcon/high_dim_data/main/SCF_plus/SCF_plus_mini.csv'\n", + "url = 'https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/SCF_plus_mini.csv'\n", "df = pd.read_csv(url)\n", "df_income_wealth = df.dropna()" ] diff --git a/lectures/heavy_tails.md b/lectures/heavy_tails.md index 8d85d60ac..defa5c1e2 100644 --- a/lectures/heavy_tails.md +++ b/lectures/heavy_tails.md @@ -824,7 +824,7 @@ mystnb: name: firm-size-dist tags: [hide-input] --- -df_fs = pd.read_csv('https://media.githubusercontent.com/media/QuantEcon/high_dim_data/main/cross_section/forbes-global2000.csv') +df_fs = pd.read_csv('https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/forbes-global2000.csv') df_fs = df_fs[['Country', 'Sales', 'Profits', 'Assets', 'Market Value']] fig, ax = plt.subplots(figsize=(6.4, 3.5)) @@ -851,8 +851,8 @@ mystnb: tags: [hide-input] --- # import population data of cities in 2023 United States and 2023 Brazil from world population review -df_cs_us = pd.read_csv('https://media.githubusercontent.com/media/QuantEcon/high_dim_data/main/cross_section/cities_us.csv') -df_cs_br = pd.read_csv('https://media.githubusercontent.com/media/QuantEcon/high_dim_data/main/cross_section/cities_brazil.csv') +df_cs_us = pd.read_csv('https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/cities_us.csv') +df_cs_br = pd.read_csv('https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/cities_brazil.csv') fig, axes = plt.subplots(1, 2, figsize=(8.8, 3.6)) @@ -876,7 +876,7 @@ mystnb: name: wealth-dist tags: [hide-input] --- -df_w = pd.read_csv('https://media.githubusercontent.com/media/QuantEcon/high_dim_data/main/cross_section/forbes-billionaires.csv') +df_w = pd.read_csv('https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/forbes-billionaires.csv') df_w = df_w[['country', 'realTimeWorth', 'realTimeRank']].dropna() df_w = df_w.astype({'realTimeRank': int}) df_w = df_w.sort_values('realTimeRank', ascending=True).copy() diff --git a/lectures/inequality.md b/lectures/inequality.md index 1f56e7597..d066b7ab8 100644 --- a/lectures/inequality.md +++ b/lectures/inequality.md @@ -246,7 +246,7 @@ The following code block imports a subset of the dataset `SCF_plus` for 2016, which is derived from the [Survey of Consumer Finances](https://en.wikipedia.org/wiki/Survey_of_Consumer_Finances) (SCF). ```{code-cell} ipython3 -url = 'https://github.com/QuantEcon/high_dim_data/raw/main/SCF_plus/SCF_plus_mini.csv' +url = 'https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/SCF_plus_mini.csv' df = pd.read_csv(url) df_income_wealth = df.dropna() ``` diff --git a/lectures/mle.md b/lectures/mle.md index 9576d979a..a740b0355 100644 --- a/lectures/mle.md +++ b/lectures/mle.md @@ -90,7 +90,7 @@ The following code imports this data and reads it into an array called `sample` ```{code-cell} ipython3 :tags: [hide-input] -url = 'https://github.com/QuantEcon/high_dim_data/raw/main/SCF_plus/SCF_plus_mini_no_weights.csv' +url = 'https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/SCF_plus_mini_no_weights.csv' df = pd.read_csv(url) df = df.dropna() df = df[df['year'] == 2016]