Skip to content

long_run_growth: read mpd2020.xlsx from data-lectures - #823

Merged
mmcky merged 1 commit into
mainfrom
repoint/long-run-growth
Aug 6, 2026
Merged

long_run_growth: read mpd2020.xlsx from data-lectures#823
mmcky merged 1 commit into
mainfrom
repoint/long-run-growth

Conversation

@mmcky

@mmcky mmcky commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Repoints long_run_growth at the canonical data repository and deletes this repo's own copy of mpd2020.xlsx.

This is the first of three repoint sets for the Maddison / Sargent–Velde statics, and part of the Track A migration in QuantEcon/data-lectures.

The change

One line — the lecture assigns data_url once and reuses it for both the Full data and Regional data reads, so all three read sites follow:

Before https://github.com/QuantEcon/lecture-python-intro/raw/main/lectures/datasets/mpd2020.xlsx
After https://github.com/QuantEcon/data-lectures/raw/main/lectures/mpd2020.xlsx

Plus git rm lectures/datasets/mpd2020.xlsx.

This cannot change a figure

The bytes are the same bytes. The deleted file and the served file are the same git blob (d5076da), and the URL above returns sha256 f67af0fd599fcebd9b92a0ad65472998f4548ea006e6b7c0018d4ade76e3bceb, which matches the integrity.sha256 recorded in the dataset's manifest at lectures/mpd2020.xlsx.yml. Only the origin of the bytes changes.

Why the deletion is safe here, and would not have been on its own

lecture-wasm's long_run_growth fetched this exact file by URLraw.githubusercontent.com/QuantEcon/lecture-python-intro/main/lectures/datasets/mpd2020.xlsx. Deleting it here without moving wasm first would have 404'd the wasm build immediately, with no warning from anything in this repo.

So this PR is paired with QuantEcon/lecture-wasm#52, which repoints the same lecture in the same set. Merge order between the two does not matter; what matters is that neither the deletion nor the wasm URL is left stranded. The rule is written up under "Repoint rules" in QuantEcon/data-lectures PLAN.md.

What lands upstream after this

Once this and the wasm PR merge, migration.yml in data-lectures flips mpd2020.xlsx from landed to repointed and its manifest records this lecture as a consumer. That flip is deliberately held until then — the data repo's strict audit has no green state for a dataset whose consumers have only partly moved.

Provenance note worth knowing

Writing this dataset's manifest turned up something about the file itself: it is not a pristine Maddison release. Every data value matches upstream, including all 21,682 rows of Full data, but three header labels on the Regional data sheet were edited locally before the file was committed here in #120 (2023-03-23) — GDP pc 2011 pricesgdppc_2011, Populationpop, and one added label.

This lecture reads that sheet with header=(0,1,2), so those renames are load-bearing: replacing the file with a clean upstream download would silently change what this lecture plots. Nothing to do about it in this PR — the file is unchanged — but it is now recorded in the manifest and tracked in QuantEcon/data-lectures#39 rather than being rediscovered the next time someone refreshes the data.

Part of QuantEcon/data-lectures#4.

Repoints the Maddison Project Database at the canonical data repository and
removes this repo's own copy, which nothing reads once the URL moves.

The served bytes are byte-identical to the copy deleted here -- both are git
blob d5076da, and the URL returns sha256 f67af0f, matching the manifest at
QuantEcon/data-lectures lectures/mpd2020.xlsx.yml. So this cannot change a
figure; only where the bytes come from changes.

The lecture assigns data_url once and reuses it for both the `Full data` and
`Regional data` reads, so the single line covers all three read sites.

Deleting the local copy is safe only because lecture-wasm's long_run_growth
moves in the same set -- it fetched this exact blob by URL, and would have
404'd the moment this file went. See QuantEcon/data-lectures PLAN.md,
"Repoint rules".

Part of the Track A migration. 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 05:37
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 8c93f5b
🔍 Latest deploy log https://app.netlify.com/projects/taupe-gaufre-c4e660/deploys/6a741d888882bb0008f90899
😎 Deploy Preview https://deploy-preview-823--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

This PR updates the long_run_growth lecture to fetch mpd2020.xlsx from the canonical QuantEcon/data-lectures repository instead of this repository, aligning the lecture with the Track A dataset migration and allowing the local copy to be removed.

Changes:

  • Repoint data_url in lectures/long_run_growth.md to https://github.com/QuantEcon/data-lectures/raw/main/lectures/mpd2020.xlsx.
  • Remove the redundant in-repo dataset copy (lectures/datasets/mpd2020.xlsx) as part of the repoint.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
lectures/long_run_growth.md Switches the lecture’s Maddison Excel source URL to the canonical data repository.
lectures/datasets/mpd2020.xlsx Removes the redundant local dataset copy now that the lecture is repointed.

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

@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 05:45 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 6, 2026 05:48 Inactive
@mmcky
mmcky merged commit 3ccd49c into main Aug 6, 2026
8 checks passed
@mmcky
mmcky deleted the repoint/long-run-growth branch August 6, 2026 05:48
@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#285
Files synced (1):

  • lectures/long_run_growth.md

mmcky added a commit to QuantEcon/data-lectures that referenced this pull request Aug 6, 2026
)

* mpd2020.xlsx: record the repoint

Flips the tracker once both consuming lectures read this repo, and records
them in the manifest's consumers list so a future correction knows what to
rebuild.

Held as a draft deliberately. The strict audit has no green state for a
dataset whose consumers have only partly moved, so this must not merge before
QuantEcon/lecture-python-intro#823 and QuantEcon/lecture-wasm#52. Verified
both ways: against the lecture repos' current main this fails with
"marked repointed but consumers still read via ['own-repo', 'sibling']";
against their repoint branches it passes clean, and the orphan count falls
35 -> 34 as wasm's mirror copy goes.

mpd2020 is the first dataset to exercise the two-repo rule end to end. intro's
copy could not be deleted while wasm fetched that exact blob by URL, so the
pair moved together and this flip trails both.

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

* Make the consumers comment durable instead of point-in-time

Copilot caught mpd2020's Consumers comment still reading "Empty until the
Track A repoint lands ... lectures read this file from intro's own copy" while
sitting directly above a populated consumers list naming both repos reading it
from here. It flatly contradicted the data beneath it.

The mistake is structural rather than a typo: the comment described the
field's CURRENT VALUE, so it was guaranteed to go stale the moment its own PR
landed. The identical comment was in all eight manifests from #38, so it would
have gone stale again on repoint sets 2 and 3 and been flagged both times.

All eight now describe what the field MEANS, which stays true in either state:
every lecture that reads this file from this repo, empty not implying the file
is unused since it may still be read from a lecture repo's own copy -- which is
exactly what a repoint moves -- and populated in the repoint PR alongside the
migration.yml flip.

Comments only. Verified: every manifest still parses, consumers values are
untouched (mpd2020 two, the other seven zero), CATALOG.md regenerates
byte-identical, and the strict audit stays green.

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

---------

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