PolicyEngine / PolicyEngine/chronicle
Port the NHS budget and the NHS per-capita cost by age and sex behind microcosm's ETB services anchors so the last hand-copied E6 anchors can retire
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 11h 48m
- Merged PRs (30d)
- 45
Description
Microcosm's UK etb_services stage still carries two hand-authored anchor resources flagged chronicle_candidate: true (uk/etb_services_anchors.json, uk/nhs_consumption_by_age_gender.json). The other E6 anchor files retire in microcosm#890's spine half now that their facts are vendored from the 474a0ae artifact (VEH1103, DESNZ/HMRC road fuel, NEED, Ofgem cap levels); these two are the last hand-copied publisher numbers on that surface, and the doctrine (chronicle#221 / #230) is that publisher facts reach Microcosm only as hash-pinned Chronicle artifacts.
Facts to port
- NHS England budget, FY2025-26:
nhs_budget_2025_26 = 202,000,000,000 GBP, cited to HM Treasury, Spending Review June 2025 (E03349913_HMT_Spending_Review_June_2025_TEXT_PRINT.pdf). Microcosm allocates the ETB survey's NHS-in-kind benefit to persons by age and sex and scales to this budget. Ask: a facts-only package for the NHS England resource (RDEL) budget by fiscal year from the Spending Review 2025 tables (FY2023-24 outturn through the settlement years),entity: government,period_type: fiscal_year, with the table and line named in the record set, so the consumer can bind FY2024-25 (the base year) as well as FY2025-26. - NHS activity/cost per capita by age band and sex:
nhs_consumption_by_age_gender.json(rows by half-open age band × sex, carried from the incumbent uk-data build, cited only as "incumbent public NHS age-gender activity/cost table"). Ask: identify and package the publisher table this came from (the candidates are the ONS "Effects of taxes and benefits on household income" methodology's per-capita NHS allocation by age and sex, or the DHSC/NHS England programme budgeting per-capita costs by age band) as a facts package with dimensionsage_band(lower/upper bounds explicit) andsex,entity: person, unit GBP per person per year, and the year stated. If Chronicle cannot identify a public publisher artifact for the incumbent table, say so on the issue and Microcosm will keep the resource with a documented provenance gap instead of achronicle_candidateflag.
Not asked
rail_fare_index_2023in the same file is a PolicyEngine UK parameter path (gov.dft.rail.fare_index) kept for engine lockstep, not a publisher fact; the ORR fares index it is checked against is already in the artifact (orr.rail.fare_index, chronicle #254). It stays.
Context
- Consumer: microcosm
packages/microcosm-build/src/microcosm/build/uk_runtime/etb_services.py(etb_services_configuration,allocate_nhs_by_age_gender), stage declaration inuk/spec/sources.yaml(allocate_per_capita_from_cell_table,budget_resource: etb_services_anchors.json). - Once packaged, Microcosm's #890 spine half (or a follow-up) vendors the rows with
tools/vendor_uk_ledger_facts.py, retires the two JSON files and moves theuk_aggregate_adminNHS anchor (nhs_spending_total, 202bn, tolerance 30.3bn) onto the vendored value.
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 with the two resources named in the issue and the consumer entry points packages/microcosm-build/src/microcosm/build/uk_runtime/etb_services.py and uk/spec/sources.yaml. Identify the publisher tables and provenance for the NHS budget and age-gender cost rows, including explicit dimensions, units, and years, then package the facts and document any provenance gap. Done means Microcosm can vendor both resources through tools/vendor_uk_ledger_facts.py and retire the hand-authored anchors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100