Skip to content

Commit 0066783

Browse files
mmckyclaude
andauthored
Read the six folded datasets from data-lectures, not high_dim_data (#832)
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) <noreply@anthropic.com>
1 parent 0222c81 commit 0066783

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

lectures/_static/lecture_specific/inequality/data.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"import wbgapi as wb\n",
3535
"import plotly.express as px\n",
3636
"\n",
37-
"url = 'https://media.githubusercontent.com/media/QuantEcon/high_dim_data/main/SCF_plus/SCF_plus_mini.csv'\n",
37+
"url = 'https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/SCF_plus_mini.csv'\n",
3838
"df = pd.read_csv(url)\n",
3939
"df_income_wealth = df.dropna()"
4040
]

lectures/heavy_tails.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ mystnb:
824824
name: firm-size-dist
825825
tags: [hide-input]
826826
---
827-
df_fs = pd.read_csv('https://media.githubusercontent.com/media/QuantEcon/high_dim_data/main/cross_section/forbes-global2000.csv')
827+
df_fs = pd.read_csv('https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/forbes-global2000.csv')
828828
df_fs = df_fs[['Country', 'Sales', 'Profits', 'Assets', 'Market Value']]
829829
fig, ax = plt.subplots(figsize=(6.4, 3.5))
830830
@@ -851,8 +851,8 @@ mystnb:
851851
tags: [hide-input]
852852
---
853853
# import population data of cities in 2023 United States and 2023 Brazil from world population review
854-
df_cs_us = pd.read_csv('https://media.githubusercontent.com/media/QuantEcon/high_dim_data/main/cross_section/cities_us.csv')
855-
df_cs_br = pd.read_csv('https://media.githubusercontent.com/media/QuantEcon/high_dim_data/main/cross_section/cities_brazil.csv')
854+
df_cs_us = pd.read_csv('https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/cities_us.csv')
855+
df_cs_br = pd.read_csv('https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/cities_brazil.csv')
856856
857857
fig, axes = plt.subplots(1, 2, figsize=(8.8, 3.6))
858858
@@ -876,7 +876,7 @@ mystnb:
876876
name: wealth-dist
877877
tags: [hide-input]
878878
---
879-
df_w = pd.read_csv('https://media.githubusercontent.com/media/QuantEcon/high_dim_data/main/cross_section/forbes-billionaires.csv')
879+
df_w = pd.read_csv('https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/forbes-billionaires.csv')
880880
df_w = df_w[['country', 'realTimeWorth', 'realTimeRank']].dropna()
881881
df_w = df_w.astype({'realTimeRank': int})
882882
df_w = df_w.sort_values('realTimeRank', ascending=True).copy()

lectures/inequality.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ The following code block imports a subset of the dataset `SCF_plus` for 2016,
246246
which is derived from the [Survey of Consumer Finances](https://en.wikipedia.org/wiki/Survey_of_Consumer_Finances) (SCF).
247247

248248
```{code-cell} ipython3
249-
url = 'https://github.com/QuantEcon/high_dim_data/raw/main/SCF_plus/SCF_plus_mini.csv'
249+
url = 'https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/SCF_plus_mini.csv'
250250
df = pd.read_csv(url)
251251
df_income_wealth = df.dropna()
252252
```

lectures/mle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The following code imports this data and reads it into an array called `sample`
9090
```{code-cell} ipython3
9191
:tags: [hide-input]
9292
93-
url = 'https://github.com/QuantEcon/high_dim_data/raw/main/SCF_plus/SCF_plus_mini_no_weights.csv'
93+
url = 'https://raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/SCF_plus_mini_no_weights.csv'
9494
df = pd.read_csv(url)
9595
df = df.dropna()
9696
df = df[df['year'] == 2016]

0 commit comments

Comments
 (0)