Repository navigation
Point the UK quickstart and examples at the certified dataset - #709
Open
vahid-ahmadi wants to merge 1 commit into
Open
vahid-ahmadi wants to merge 1 commit into
vahid-ahmadi wants to merge 1 commit into
Conversation
The README population quickstart and examples/policy_change_uk.py and income_bands_uk.py still loaded enhanced_frs_2023_24, which the certified bundle no longer ships. Use microcosm_uk_2024_25, and document how to request access to the private UK data and what works without it. Fixes #473 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Fixes #473.
The README's UK population quickstart,
examples/policy_change_uk.pyandexamples/income_bands_uk.pystill loadedenhanced_frs_2023_24, which the certified bundle no longer uses as the UK default. A new user following them gets a missing-file error from the examples, or a superseded dataset from the quickstart.microcosm_uk_2024_25, the bundle's certified default.ensure_datasets(datasets=["microcosm_uk_2024_25"], years=[year])instead of expecting./data/enhanced_frs_2023_24_year_{year}.h5to exist already. TheirRun:lines now name the real file names.docs/microsim.mdsay how to request access to the private UK data (the route in the policyengine-uk getting-started guide: email contact@policyengine.org with the Hugging Face username and evidence of UK Data Service access).docs/microsim.mdsection, "Working without UK data access": household calculations and US population data need no access; there is no public UK population file;managed_microsimulation(dataset=path, allow_unmanaged=True)runs on a local file and records it with no certified hash.Checks
Both updated examples ran to completion on 6.10.1 against the bundle's Microcosm UK 2024-25 (
income_bands_uk.py: 29.2m households, 22.6% average effective tax rate). Theallow_unmanaged=Truestatement was checked by running it on a local copy of the file and readingsim.policyengine_bundle.ruff checkandruff format --checkpass on the changed examples.Found while reproducing a published think-tank analysis on Microcosm UK 2024-25 as a new user with only the public docs.
🤖 Generated with Claude Code