Read the six folded datasets from data-lectures, not high_dim_data - #60
Conversation
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>
❌ Deploy Preview for beautiful-dodol-cb9543 failed.
|
There was a problem hiding this comment.
Pull request overview
This PR updates hard-coded dataset URLs in lecture source files to point to the relocated “six folded” datasets in QuantEcon/data-lectures, using raw.githubusercontent.com so the reads work in-browser (avoiding the LFS media host and CORS/redirect pitfalls).
Changes:
- Repoint SCF dataset reads in
mle.mdandinequality.mdfromhigh_dim_data(media host) todata-lectures(raw host). - Repoint four cross-section dataset reads in
heavy_tails.mdfromhigh_dim_data(media host) todata-lectures(raw host). - Update the served static notebook artifact
_static/lecture_specific/inequality/data.ipynbto use the new raw URL.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lectures/mle.md | Updates SCF dataset URL to raw.githubusercontent.com/QuantEcon/data-lectures/... |
| lectures/inequality.md | Updates SCF dataset URL to raw.githubusercontent.com/QuantEcon/data-lectures/... |
| lectures/heavy_tails.md | Updates Forbes/cities dataset URLs to raw.githubusercontent.com/QuantEcon/data-lectures/... |
| lectures/_static/lecture_specific/inequality/data.ipynb | Updates the embedded SCF dataset URL in the notebook source |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
📖 Netlify Preview Ready! Preview URL: https://pr-60--beautiful-dodol-cb9543.netlify.app (fe465d1) ✨ Browse the preview at the URL above. |
Browser-fetch verification — the check this repo's CI cannot do
So each of the six was fetched with
All six browser-fetchable. The zero redirect hops matter as much as the header: the form these replaced routes through a 302 whose On the four red Netlify checksPre-existing and unrelated — lecture-wasm#49 documents exactly this set ( |
|
Two corrections to my comment above, both found while validating. The working preview is fine — the red checks are the App's separate buildThere are two previews on this PR, and only one of them is failing. The workflow's own Netlify CLI deploy ( So the failing Only 1 of these 7 reads is in a currently-published lectureI should have checked this before writing "verify in a browser console from a published page". In
The repoint is still correct and still worth landing: the files are in the tree, they are what gets published the moment those entries are uncommented, and leaving them on a host that 404s would mean re-enabling the lecture silently ships broken data cells. But the live exposure of this PR is one read, not seven — so the The CORS table in my previous comment stands on its own: it tested the six URLs directly rather than through the site, so it is unaffected by which lectures are enabled. |
Seven reads across four files. The six datasets moved into
QuantEcon/data-lectures(QuantEcon/data-lectures#62), so every read here follows them — and the host changes too, not just the org and repo.Why the host has to change
media.githubusercontent.comis the LFS media endpoint and routes per path by LFS status. These six were LFS-tracked inhigh_dim_dataand are plain git indata-lectures, so the media host 404s for every one of them. Measured today:media.githubusercontent.com/media/QuantEcon/data-lectures/main/lectures/SCF_plus_mini.csvraw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/SCF_plus_mini.csvA mechanical org/repo swap that preserved the host would have broken every chart in these three lectures. This is repoint rule 6.
Why everything lands on
raw.githubusercontent.comAll four consuming repos now spell these reads identically. The set 1/2 repoints broke this repo by "harmonising" its URLs onto the
github.com/…/raw/redirect form (QuantEcon/data-lectures#46) — reasonable-looking, since the two spellings did look like an inconsistency, but that form's 302 carries an emptyaccess-control-allow-origin, so a browser rejects it before following the redirect. One spelling on these lines means that class of fix cannot recur.qeld(QuantEcon/data-lectures#65, tracker QuantEcon/data-lectures#66) is intended to resolve dataset URLs through one call site and make the spelling an implementation detail. The bar here is that each link works in the context it is in.The notebook is the read nothing would carry
_static/lecture_specific/inequality/data.ipynb:37is edited by hand. No audit scans_static/**, the build never executes it, and the translation sync is.md-only — so nothing mechanical would ever surface or carry this change. It is also a served artifact: it returns 200 on the published site with the URL in its body.No prose is touched
The lecture says the Forbes billionaires data is a 2020 snapshot. The bytes contradict it — 2,935 rows, 282 distinct timestamps spanning 2020-04-07 to 2023-04-15, and the chart plots
realTimeWorth/realTimeRankrather than the annual list'sworth/rank. Split out to QuantEcon/workspace-lectures#35. The Global 2000 "2020" claim nearby is correct and is deliberately left alone.Verification
data-lecturesread, and nohigh_dim_datareference anywhere inlectures/cross_sectionfiles — manifestsha256= new URL = oldhigh_dim_dataURL, so this changes the address and not the dataThis repo specifically — do NOT read green CI as evidence
ci.ymlhere runsmyst build --htmlwith no execution, so a dead data URL is invisible to it: the pages still return 200 and the figures simply never appear, because they are produced by in-browser execution that dies at the first data cell. That is exactly how QuantEcon/data-lectures#46 went unnoticed. Green here means the markdown built, nothing more.Verify in a browser console from a
quantecon.github.iopage:All seven reads here were on the media host, so raw is mandatory under rule 5, not a preference — this repo has no working alternative form. The one remaining
github.com/…/raw/reference in this repo is a{download}role ininflation_history.md, which is a plain navigation where CORS does not apply; it is correct and untouched.The three red Netlify checks are pre-existing (lecture-wasm#49).
Part of QuantEcon/workspace-lectures#23 (step 3, PR set C2). Companion PRs land in
lecture-python-introandtest-actions-lecture-introunder the same title. Merged as three independent branches offmain, never stacked.🤖 Generated with Claude Code