Skip to content

Read the SCF sample from high_dim_data main#50

Merged
mmcky merged 1 commit into
mainfrom
datasets/repoint-scf-main
Jul 16, 2026
Merged

Read the SCF sample from high_dim_data main#50
mmcky merged 1 commit into
mainfrom
datasets/repoint-scf-main

Conversation

@mmcky

@mmcky mmcky commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Repoints the SCF+ wealth sample in mle.md off the update_scf_noweights branch of high_dim_data and onto main. Part of risk 1 in QuantEcon/meta#337.

Unblocked and verified. QuantEcon/high_dim_data#6 merged 2026-07-15, so the data is on main and this URL now resolves. Ready to review.

What this fixes

This lecture has fetched its data from an unmerged PR's branch since 2023:

https://media.githubusercontent.com/media/QuantEcon/high_dim_data/update_scf_noweights/SCF_plus/SCF_plus_mini_no_weights.csv

A lecture build pinned to a non-default ref is a build that any branch cleanup breaks silently — and that pin is precisely why the branch could not be deleted. #6 put the file on main; this points the lecture at it.

This is a 4-repo set, not a one-liner

The pin was tracked as living in lecture-python-intro alone. An org-wide code search shows four source repos carry it, each with its own copy of mle.md. All four get the identical change, on the same branch name (datasets/repoint-scf-main) with the same commit subject, so the set tracks as one:

Repo PR
lecture-python-intro QuantEcon/lecture-python-intro#793 the tracked one
lecture-intro.zh-cn QuantEcon/lecture-intro.zh-cn#222 live Chinese translation
lecture-wasm #50 WASM/pyodide variant
test-lecture-python-intro QuantEcon/test-lecture-python-intro#48 actions test fixture — genuinely builds mle.md (it is in its _toc.yml, with ci.yml and linkcheck.yml)

lecture-python-intro.notebooks also references it, but it is a generated artifact and self-heals on the next rebuild. The update_scf_noweights branch may only be deleted once all four of these merge — that is the last step of meta#337 risk 1, and it is the only destructive one.

Why the /raw/ form and not media.githubusercontent.com

Both serve this LFS-tracked file today. Only github.com/.../raw/main/... also works if the file ever stops being LFS — which it will, when the consolidation folds high_dim_data into data-lectures (PLAN Phase 3), a repo that deliberately drops high_dim_data's blanket *.csv filter=lfs rule. Repointing to /raw/ now means this URL never has to change again.

Verification

Checked end-to-end against main after #6 merged:

  • The bytes are identical. The LFS object on main carries the same OID the branch served — sha256:c3b2c78a…, 75902999 bytes — so lecture output cannot change. This is the whole migration-integrity question, answered without downloading twice.
  • The URL resolves. github.com/.../raw/main/...200, real CSV (year,n_wealth,t_income,l_income,nw_groups,ti_groups), 302ing to the LFS media host.
  • The lecture's own cell runs unchanged. Ran mle.md's exact pipeline against the new URL: 1,672,214 rows fetched, 108,783 after the year == 2016 and n_wealth > 1 filters, and a deterministic 10,000-row sample (random_state=1234, mean 6.56 in $100,000 units).
  • The URL form is load-bearing. raw.githubusercontent.com/.../main/... serves LFS pointer text, not data — verified against the sibling SCF_plus_mini.csv, which was already on main. Using that form would have failed as a parse error rather than an obvious hosting bug.

Part of QuantEcon/meta#337
See QuantEcon/meta#336

Repoints the SCF+ wealth sample off the update_scf_noweights branch and onto
main. This lecture has fetched its data from an unmerged PR's branch since
2023 — a build pinned to a non-default ref, which any branch cleanup would
silently break, and which is why that branch cannot be deleted today.

Uses the github.com/QuantEcon/high_dim_data/raw/main/… form rather than
media.githubusercontent.com. Both serve this LFS-tracked file, but only /raw/
keeps working if the file ever stops being LFS — which it will when the data
consolidation folds high_dim_data into data-lectures, a repo that deliberately
drops high_dim_data's blanket "*.csv filter=lfs" rule. Repointing to /raw/ now
means this URL does not have to change again then.

The URL form is verified against the sibling SCF_plus_mini.csv, which is
already on main and LFS-tracked: /raw/main/ serves it as real CSV, while
raw.githubusercontent.com serves LFS pointer text for the same file.

Blocked until QuantEcon/high_dim_data#6 merges — the data file exists only on
the branch, so this URL 404s until then. That PR has been open, mergeable and
conflict-free since 2023-04-28.

Part of QuantEcon/meta#337
See QuantEcon/meta#336

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploy Preview for beautiful-dodol-cb9543 ready!

Name Link
🔨 Latest commit e27393c
🔍 Latest deploy log https://app.netlify.com/projects/beautiful-dodol-cb9543/deploys/6a581d92a3ab9200087c5c8e
😎 Deploy Preview https://deploy-preview-50--beautiful-dodol-cb9543.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.

@github-actions

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-50--beautiful-dodol-cb9543.netlify.app (e27393c)

✨ Browse the preview at the URL above.

@mmcky
mmcky marked this pull request as ready for review July 15, 2026 23:59
Copilot AI review requested due to automatic review settings July 15, 2026 23:59

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 SCF+ wealth sample URL used in lectures/mle.md to fetch the dataset from the main branch of QuantEcon/high_dim_data, avoiding reliance on a non-default branch ref.

Changes:

  • Repointed SCF_plus_mini_no_weights.csv download URL from update_scf_noweights to main using the github.com/.../raw/main/... form.

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

@mmcky
mmcky merged commit a087a38 into main Jul 16, 2026
6 checks passed
@mmcky
mmcky deleted the datasets/repoint-scf-main branch July 16, 2026 00:24
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