Read the three wave-C2 datasets from data-lectures (Track C) - #375
Merged
Conversation
fred_data.csv drops the own-repo raw URL (refs/heads/main spelling,
split across string literals) for the data-lectures form.
acs_data_summary.csv goes from a local _static path to the same URL
prefix. five_preferences.md swaps loadmat('dataBHS.mat') for read_csv
of the converted dataBHS.csv, dropping the scipy.io import for pandas;
the (236, 1) column shape is preserved via a [['c']] selection so every
downstream array — the growth difference, the histogram, and the
ax.hist patch-container indexing — is shape-identical to the loadmat
path. Histogram counts and bin edges verified identical under pandas'
default parser before the edit.
Data landed first in QuantEcon/data-lectures#98; this repo caches
notebook execution, so these cells re-execute against data-lectures
main. The local copies are deleted in a follow-up PR after this one
publishes — fred_data.csv is a live runtime fetch with no
stale-serving grace period.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR repoints three lecture notebooks to load the wave‑C2 datasets from QuantEcon/data-lectures (Track C), aligning the data-loading approach with the existing C1 pattern and standardizing on the github.com/.../raw/main/... URL form.
Changes:
- Update
risk_aversion_or_mistaken_beliefsto readfred_data.csvfromQuantEcon/data-lecturesvia a single consolidated URL string. - Update
match_transportto fetchacs_data_summary.csvfromQuantEcon/data-lecturesusing adata_urlbase. - Update
five_preferencesto replace the localloadmat('dataBHS.mat')path withpd.read_csv(...)fordataBHS.csv, preserving the original(n, 1)array shape for downstream computations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lectures/risk_aversion_or_mistaken_beliefs.md | Repoints FRED CSV load to QuantEcon/data-lectures and simplifies the URL literal. |
| lectures/match_transport.md | Switches the ACS dataset read from local _static path to the shared data-lectures URL base. |
| lectures/five_preferences.md | Replaces loadmat workflow with pandas.read_csv from data-lectures while preserving expected data shape. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
mmcky
added a commit
to QuantEcon/data-lectures
that referenced
this pull request
Aug 18, 2026
Both repoint PRs merged 2026-08-18: the three advanced.myst reads in QuantEcon/lecture-python-advanced.myst#375 and the four programming reads in QuantEcon/lecture-python-programming#612. Statuses flip to repointed, repoints entries filled, the landed-state consumer notes come off the two direct repos, and the dataBHS.mat annotation is deleted now that nothing reads the .mat (its successor manifest is dataBHS.csv.yml). The six translation-repo consumer notes on test_pwt.csv.yml stay: those repos read lecture-python-programming's raw URL until their sync-translations runs (fired by the #612 merge, in progress at this commit) land and their sites republish — which is what gates the source-copy deletion. Measured in both directions against post-merge consumer mains: repointed gives exit 0 with all five problem buckets empty; main's landed state gives exit 1 with four migration_inconsistencies, one per file. Verified the manifest edits touched nothing else: for each of the four manifests, the only top-level key differing from main is consumers (parsed comparison, not a patch eyeball). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
mmcky
added a commit
that referenced
this pull request
Aug 18, 2026
All three now serve from data-lectures: the repoint merged in #375 and published in publish-2026aug18, whose notebooks and the .notebooks mirror both carry the new URLs (verified by basename sweep — one data-lectures read per notebook, zero refs/heads or loadmat residue). fred_data.csv was the live runtime-fetch case, which is why deletion waited for the publish. Deletion-time re-derivation, 2026-08-18: a fresh authenticated Trees sweep over all 278 org repos (278 covered, 0 skipped) finds no other reader of these paths — every other holder of these basenames owns its own copy (lecture-dp / lecture-dp.monorepo / 2026-tom-course for the ACS file; lecture-tools-techniques / lecture-mapping / python-lecture-sandpit.myst for the .mat, with tools-techniques reading its own copy, tracked in QuantEcon/lecture-tools-techniques#11). match_transport's lecture_specific directory empties with this change; risk_aversion keeps its three figure PNGs. The published site keeps serving the two _static copies until the next cache rebuild plus publish, per the settle policy — the re-audit booked on QuantEcon/workspace-lectures#40 verifies that; CI previews stop serving them immediately now that the prune (#374) is in. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repoints the three wave-C2 reads to the data landed in QuantEcon/data-lectures#98, following the C1 pattern (#372). All three use the CPython URL form
github.com/QuantEcon/data-lectures/raw/main/lectures/<file>per that repo's AGENTS.md.risk_aversion_or_mistaken_beliefs.md— the read was already an HTTP read of this repo's own raw URL, split across two string literals with therefs/heads/mainspelling; collapsed to a single literal of the new URL (the audit rejects any non-mainref spelling for data-lectures reads, so the old spelling must not be copied).match_transport.md—data_path(local_staticprefix) becomesdata_url; the prose sentence naming the dataset three lines above is unchanged and still accurate.five_preferences.md—loadmat('dataBHS.mat')becomesread_csvof the converteddataBHS.csv, andfrom scipy.io import loadmatbecomesimport pandas as pd(the file's first pandas use). The[['c']]selection keeps the (236, 1) column shape of the source arrays, so the growth difference,np.histogram, and theax.histpatch-container indexing (lns1[2][0]) all see shapes identical to the loadmat path. Measured before the edit: histogram counts and bin edges are identical under pandas' default parser, and the lecture's hardcoded μ_c/σ_c reproduce from the converted data to printed precision.Deletion of the two local copies (
_static/.../fred_data.csv,_static/.../acs_data_summary.csv) and oflectures/dataBHS.matfollows in a separate PR after this one publishes —fred_data.csvis fetched live at cell execution by every published notebook, so the repoint must be published before the old blob leavesmain.Sweep evidence: after the edit, a basename sweep (bash arrays, positive control: 5 data-lectures reads found) shows zero remaining non-data-lectures references to
fred_data,dataBHS, orhansen_jagannathan_1991_data; the two remainingacs_data_summaryhits are the accurate prose mention and the basename half of the new split read.🤖 Generated with Claude Code