Skip to content

P1 pilot: read lingcod data from data-lectures#792

Draft
mmcky wants to merge 1 commit into
mainfrom
datasets/p1-lingcod
Draft

P1 pilot: read lingcod data from data-lectures#792
mmcky wants to merge 1 commit into
mainfrom
datasets/p1-lingcod

Conversation

@mmcky

@mmcky mmcky commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

The lecture half of pilot P1 — local-path static (QuantEcon/meta#338). Repoints msy_fishery at the canonical copy in QuantEcon/data-lectures and drops the local one, which nothing else reads. Paired with QuantEcon/data-lectures#12.

Draft — blocked on merge order. The URL 404s until the data is on data-lectures main: QuantEcon/data-lectures#10 (restructure), then QuantEcon/data-lectures#12 (the data + manifest). CI here cannot pass before those land. That is not a defect in this PR — it is the pilot's main finding, below.

This fixes the lecture, it doesn't just relocate the data

The read was a relative pathpd.read_csv('datasets/lingcod_msy_recovery.csv') — which only resolves inside a repo checkout. A downloaded notebook has no datasets/ directory, so this cell raised FileNotFoundError in Colab. Reading over https is what makes the notebook self-contained, which is exactly the P1 exit test.

Finding: the convention has a merge-order constraint, and it needs stating

The data repo's README promises "the lecture PR builds green immediately, no two-step merge." True — but only once the data is on the data repo's default branch. Probed directly:

URL Result
.../data-lectures/raw/main/lectures/lingcod_msy_recovery.csv 404 — data not merged yet
.../data-lectures/raw/datasets/p1-lingcod/lectures/... 200 — resolves today

The branch URL is right there and would turn this PR green instantly. Taking it would recreate the exact bug QuantEcon/meta#337 is cleaning upmle.md has been pinned to a non-default branch of high_dim_data since 2023, and that pin is precisely why the branch cannot be deleted today. So the order is: data PR first, lecture PR second. Each is a single step, but the order is load-bearing and belongs in QuantEcon/QuantEcon.manual#108.

Verification

Ran this lecture's own cell against the data over https (branch ref substituted, since main 404s): 82 rows fetched, figure renders, no exception, and the terminal-year null in F_over_Fmsy passes through fill_between/plot cleanly.

Output cannot move: the migrated file is byte-identical to the copy removed here (sha256 fc2f873f...), verified before the repoint.

Uses the interim URL form and the data_url convention already used by long_run_growth and inflation_history.

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

Repoints msy_fishery at the canonical copy in QuantEcon/data-lectures and
drops the local one, which nothing else reads.

This also fixes the lecture rather than merely relocating its data. The read
was a relative path, 'datasets/lingcod_msy_recovery.csv', which only resolves
inside a repo checkout — a downloaded notebook has no datasets/ directory, so
the cell raised FileNotFoundError in Colab. Reading over https is what makes
the notebook self-contained.

Uses the interim URL form github.com/QuantEcon/data-lectures/raw/main/… and
the data_url convention already used by long_run_growth and inflation_history.

Blocked until the data is on data-lectures main (QuantEcon/data-lectures#10,
then #11) — until then this URL 404s. The branch URL resolves today, but
pointing at a non-default ref is exactly the bug meta#337 is cleaning up in
mle.md, so it is not a shortcut worth taking.

Verified by running the cell against the data over https: 82 rows, figure
renders, terminal-year null in F/Fmsy handled. Output is unchanged — the
migrated file is byte-identical (sha256 fc2f873f…) to the copy removed here.

Part of QuantEcon/meta#338
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 taupe-gaufre-c4e660 ready!

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

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.

1 participant