PolicyEngine / PolicyEngine/microcosm
Port UK compact source stages and 2024-25 refresh from uk-data
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 94
Description
Parent: PolicyEngine/populace#144.
Why
Populace UK can replace the local-geography/matrix path, and the current compact H5 already carries several recent uk-data columns. But if policyengine-uk-data is archived, Populace needs to own the source-stage logic and provenance for those columns instead of relying on uk-data build history.
Scope migrated from uk-data
Open PRs:
- PolicyEngine/policyengine-uk-data#426:
mortgage_debtandconsumer_debtfrom WAS fornet_wealth. - PolicyEngine/policyengine-uk-data#408:
pip_dl_points/pip_m_pointsfrom PIP categories once model variables exist.
Recent merged PRs that need Populace-owned source-stage equivalents:
- #410/#436: FRS 2024-25 ingestion plus household-ID sort invariant for raw compact builds.
- #433:
employment_sector,sic_industry_division, and public-sector target source. - #428/#429/#431:
bus_fare_spending, bus subsidy scaling, and model-version floor. - #425: seeded stochastic draws for property purchase, BRMA, and capital-gains amounts.
- #421: SPI synthetic prior weights,
household_is_spi_synthetic,household_is_capital_gains_clone, and calibration source-share diagnostics. - #380/#383/#416/#417/#419: disability, PIP category, child/QYP, and transfer-side PIP component fixes.
- #372/#385/#403-#407/#412-#414: income/SPI/fuel/consumption prerequisite updates and road-fuel volume uprating.
Acceptance criteria
- Populace has UK source-stage modules/manifests for these compact-data inputs, with no
policyengine_uk_dataimports. - The compact artifact can be rebuilt for at least the current Populace UK release year and the FRS 2024-25 refresh path.
- Export-variable gates prove the compact H5 includes the same PolicyEngine-UK variables expected by
policyengine.py. - Determinism tests cover every stochastic assignment on the live build path.
- Source flags and diagnostics make synthetic SPI/capital-gains support inspectable without row-order inference.
2026-08-12 update — this issue is workstream E of the UK-migration master epic #665 (it absorbs the source-stage track of the now-closed #144).
Full item list to port, each as a declarative source stage + gate (children filed as picked up); order constraints: wealth before consumption (num_vehicles), income before capital gains.
- Full FRS table ingest (incumbent reads ~14 tables; microcosm reads 2): entities/IDs, grossing weights, demographics, council-tax imputation, LHA/BRMA, education, legacy-benefit proxies, disability categories
- Stochastic inputs: 11 take-up parameter files with reported-receipt anchoring, TV licence/FTB draws, seeded RNG discipline,
household_is_*provenance flags as first-class metadata - WAS wealth (11 outputs incl.
num_vehicles, student-loan balance allocation) — note theowned_landrelease-to-release instability recorded in PolicyEngine/policyengine-uk-data#448 - LCFS consumption (18 outputs) + energy raking to NEED targets
- ETB VAT; ETB services + NHS usage
- Capital gains incl. top tail (#560 in flight; #552/#364/#467)
- Salary sacrifice; student loan plans (SLC stocks); childcare take-up fitting; regional property uprating
- From #144: debt, bus fares (#153), employer sector/SIC, PIP/disability, child/QYP
- New stages requested against the incumbent that land here instead: UC deduction attributes (PolicyEngine/policyengine-uk-data#450)
- Known incumbent defects the ports must not replicate: UC caseload ~40% below administrative counts (PolicyEngine/policyengine-uk-data#452), Scottish/Welsh council tax 20–30% above devolved budgets (PolicyEngine/policyengine-uk-data#448)
- FRS 2024-25 refresh (incumbent is already there; calibration year 2025)
Acceptance: the microcosm-built spine replaces the certified incumbent H5 in the national build; eFRS parity fixtures beat or match the incumbent on the frozen register with signed differences.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by mapping the source-stage modules and manifests required for the compact H5 build, then inspect policyengine.py for the expected export variables. Trace the current Populace build and FRS 2024-25 refresh path, including stochastic assignments and provenance diagnostics. Done means the microcosm-built spine replaces the incumbent H5 with export gates, determinism tests, inspectable source flags, and eFRS parity fixtures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, data-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100