Skip to content

inflation_history: read longprices.xls and chapter_3.xlsx from data-lectures - #824

Merged
mmcky merged 4 commits into
mainfrom
repoint/inflation-history
Aug 6, 2026
Merged

inflation_history: read longprices.xls and chapter_3.xlsx from data-lectures#824
mmcky merged 4 commits into
mainfrom
repoint/inflation-history

Conversation

@mmcky

@mmcky mmcky commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Repoints inflation_history at the canonical data repository. Phase 1 of two: the URLs move, the files stay.

Second of three Track A repoint sets for the intro statics. Paired with QuantEcon/lecture-wasm#53.

What this PR does

Four references move; nothing is deleted.

Line Reference Now reads
82 narrative link — "hosted on GitHub" data-lectures CATALOG.md
86 read_excellongprices.xls data-lectures
228 {download}chapter_3.xlsx data-lectures
358 read_excelchapter_3.xlsx data-lectures

lectures/datasets/longprices.xls and lectures/datasets/chapter_3.xlsx remain in this repo and are deleted in a follow-up PR after the next publish. Why, below.

Why the deletion is deferred

This series publishes on a publish* tag, not on push to main. So merging a repoint does not refresh the live site: the already-published notebooks keep the old URL, and if the same PR deleted the file, that URL immediately 404s for every reader who downloads the lecture or opens it in Colab.

That is not hypothetical. Set 1 (#823) merged with its deletion included, and the notebook served at intro.quantecon.org kept pointing at the deleted mpd2020.xlsx — returning 404 — until publish-2026aug06 was tagged. The rendered HTML was fine throughout, because figures are baked at build time, so nothing signalled the problem.

Splitting the work removes the window entirely:

  1. this PR — repoint the URLs, keep the files. Merge, then publish. The published notebooks now fetch from data-lectures while the old paths still resolve, so neither the old site nor the new one can break.
  2. a follow-up PR — delete the two files, once nothing references them in the repo or on the live site.

Recorded as repoint rule 3 in QuantEcon/data-lectures#44.

No figure moves

Both spreadsheets are byte-identical to what data-lectures serves — git blobs 1a2e141 (chapter_3) and a3f100e (longprices) — and the served URLs return sha256 matching the integrity.sha256 in their manifests, verified today. Only the origin of the bytes changes, and the {download} offers the same spreadsheet it did before.

Two references the audit cannot see

Worth flagging, because they nearly shipped broken. The data-lectures audit classifies data references by the code that reads them, so the {download} at line 228 and the narrative link at line 82 are both invisible to it — and a dead download link fails no build here either. Repointing only the read_excel calls would have left a 404 and a misleading link in a published page with every check green.

The line-82 case is the subtler one: it pointed at this repo's lectures/datasets directory, which survives with other files, so it would have kept returning 200 while quietly meaning the wrong thing. Caught by Copilot on this PR. Twelve such references exist across the remaining migration — inventoried in QuantEcon/data-lectures#42.

Provenance note

Writing these manifests established what the two files are. longprices.xls is Sargent and Velde's own assembly of four centuries of price levels (verbatim; no publisher distribution point, so upstream verification is honestly unverifiable). chapter_3.xlsx is constructed — this lecture states the data were transcribed by hand from the printed appendix tables of chapter 3 of Rational Expectations and Inflation, which is our processing and cannot ship a builder.

Part of QuantEcon/data-lectures#4 and QuantEcon/data-lectures#8.

…ectures

Repoints both spreadsheets at the canonical data repository and removes this
repo's copies.

THREE references move, not two. Besides the two read_excel calls, line 228
carries a {download} directive offering chapter_3.xlsx to readers, pointing at
the same file being deleted here. Nothing would have caught that: the audit in
data-lectures classifies data references by the code that READS them, so a
prose link is invisible to it, and a dead {download} does not fail a lecture
build either. Repointing the code alone would have left a 404 in a published
page with every check green. Recorded as QuantEcon/data-lectures#42.

The bytes are unchanged -- both files are byte-identical to what data-lectures
serves (git blobs 1a2e141 and a3f100e), verified against the sha256 in their
manifests. No figure moves, and the {download} offers the same spreadsheet it
did before.

Deleting the local copies is safe only because lecture-wasm's inflation_history
moves in the same set: it read longprices.xls and chapter_3.xlsx from this
repo by URL, and its own {download} points here too. See
QuantEcon/data-lectures PLAN.md, "Repoint rules".

Second of three Track A repoint sets for the intro statics. See
QuantEcon/data-lectures#8 and QuantEcon/data-lectures#4.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 6, 2026 06:08
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 033ea1d
🔍 Latest deploy log https://app.netlify.com/projects/taupe-gaufre-c4e660/deploys/6a742d032cc6490008b0ef61
😎 Deploy Preview https://deploy-preview-824--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Repoints inflation_history to load its two spreadsheet inputs from the canonical QuantEcon/data-lectures repository (and updates the reader-facing download link accordingly), aligning this lecture with the ongoing dataset migration.

Changes:

  • Update the longprices.xls pd.read_excel source URL to data-lectures.
  • Update the chapter_3.xlsx pd.ExcelFile source URL to data-lectures.
  • Update the {download} directive so readers download chapter_3.xlsx from data-lectures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lectures/inflation_history.md Outdated
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request August 6, 2026 06:16 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 6, 2026 06:18 Inactive
Copilot caught a fourth reference this PR had missed: the narrative link
introducing the spreadsheet still pointed at this series own
lectures/datasets directory, which this PR empties. It would not have
404d -- the directory survives with other files -- it would have quietly
become wrong, which nothing would ever flag.

It now points at data-lectures CATALOG.md rather than a directory listing.
A reader following "hosted on github" gets the dataset registry: source,
licence, integrity status and which lectures consume each file. That is
strictly more useful than the folder it replaced, and the catalog is
generated from the manifests, so it cannot drift out of date.

Worth recording why the earlier sweep missed this. It searched for links
ENDING in a data-file extension, so a link to a DIRECTORY was invisible to
it -- a blind spot in the check for the audits blind spot. Re-sweeping
properly found two more of the same shape (inequality.md in both repos,
linking to the usa-gini builder notebook), which belong to a later wave.
Folded into QuantEcon/data-lectures#42.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot noted the link text reads "hosted on github". Checking the corpus
rather than treating it as taste: across the Python lecture family the prose
convention is GitHub, with 12 uses in lecture-python-programming, 6 in
lecture-python.myst and 1 here, and zero lowercase anywhere else. This line is
the only lowercase instance in the family, and it appears twice because wasm
mirrors intro. So it is the outlier, not a preference.

Same review also flagged the link TARGET, which was already fixed in the
preceding commit -- the comment was written ten minutes before that push. Only
the capitalisation remained.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions
github-actions Bot temporarily deployed to pull request August 6, 2026 06:41 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 6, 2026 06:42 Inactive
…ublish

Splits this PR into the first of two phases, because deleting the files here
breaks the CURRENTLY PUBLISHED site rather than this repo.

This series publishes on a `publish*` tag, not on push to main, and was last
published on 2026-07-17. So merging a deletion does not refresh the live site
-- it leaves the already-published notebooks pointing at a file that no longer
exists. That is not theoretical: set 1 (mpd2020.xlsx) merged with its deletion
included, and the notebook currently served at intro.quantecon.org still
carries the old URL, which now returns 404. Anyone downloading or opening that
lecture in Colab today hits it. The rendered HTML pages are unaffected, since
their figures are baked at build time; the breakage is confined to readers who
actually run the code, which for this series is the audience that matters.

So the ordering rule this migration has been following was incomplete.
"Repoint every consumer together" protects the REPOS but says nothing about
the published site, which lags main until someone tags a release.

Two phases close the gap completely:

  1. this PR -- repoint the URLs, keep the files. Publish. The published
     notebooks now fetch from data-lectures while the old paths still resolve,
     so neither the old nor the new site can break.
  2. a follow-up PR -- delete the files, once nothing references them in the
     repo OR on the live site.

The cost is one extra PR per repoint set and a slightly slower orphan
cleanup. The benefit is that no reader-facing window exists at any point.

lecture-wasm's half needs no such split: it publishes on push to main, so it
self-heals on merge, and the copies it deletes are mirror-orphans that nothing
reads in either repo.

See QuantEcon/data-lectures PLAN.md, "Repoint rules".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mmcky

mmcky commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Merging based on previous run. The final run has been held up by LaTeX installation. Safe to merge.

@mmcky
mmcky merged commit 69307ff into main Aug 6, 2026
6 of 7 checks passed
@mmcky
mmcky deleted the repoint/inflation-history branch August 6, 2026 07:26
@mmcky

mmcky commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (zh-cn)

Target repo: QuantEcon/lecture-intro.zh-cn
Translation PR: QuantEcon/lecture-intro.zh-cn#286
Files synced (1):

  • lectures/inflation_history.md

mmcky added a commit to QuantEcon/data-lectures that referenced this pull request Aug 6, 2026
Held as a draft: must not merge before QuantEcon/lecture-python-intro#824 and
QuantEcon/lecture-wasm#53. Verified both ways -- against the lecture repos'
current main this fails with "marked repointed but consumers still read via
['own-repo', 'sibling']" for both files; against their repoint branches it
passes clean and orphans fall 34 -> 32 as wasm's two mirror copies go.

Set 2 of three. Unlike set 1 this batch had a reference the audit cannot see:
a {download} directive in each repo offering chapter_3.xlsx to readers,
pointing at the file being deleted. The lecture PRs move those too. The
general problem -- ten such prose references across the remaining migration,
none visible to the scan -- is #42.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Aug 6, 2026
…ished (#825)

Phase 2 of the repoint set opened in #824. That PR moved the URLs and
deliberately KEPT these two files, because this series publishes on a tag
rather than on push to main -- so the already-published notebooks were still
fetching them, and deleting in the same PR would have 404'd every reader who
downloaded or opened the lecture in Colab.

publish-2026aug06b has since built main, so the live notebooks now read from
data-lectures and nothing points at these copies in either repo. Verified
before deleting: zero references remain here, and lecture-wasm -- which used
to fetch this repo's copies by URL -- references neither file since #53.

The two-phase split is repoint rule 3 in QuantEcon/data-lectures. It exists
because set 1 skipped it: mpd2020.xlsx was deleted in its repoint PR and the
notebook at intro.quantecon.org returned 404 until a publish was tagged.
Rendered HTML was fine throughout -- figures are baked at build time -- so
nothing reported the breakage.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants