Repository navigation
Add the two-child limit child-poverty benchmarks, recomputed on the certified Microcosm pair - #225
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
MaxGhenis
force-pushed
the
uk/two-child-limit-child-poverty
branch
from
October 26, 2026 18:14
af3bc68 to
3ebfc2f
Compare
…ertified Microcosm pair Moves the comparison policyengine-uk's docs page used to hard-code (docs/book/validation/child-poverty-tcl.md) into scorecard. DWP's Budget 2025 note (Tables 1-4, the FYE 2026 figure, children in gaining households) becomes 123 held-out claims; the Resolution Foundation's No half measures figures and HM Treasury's costings were already uk_ab2025 claims, so this lane attaches results to them and mints none. PolicyEngine's counterparts run on policyengine.py 6.11.0's pair in data/uk/certified_pairs.json through the registry's preflight and the managed route, for every concept the sources use, in offline Modal containers. Each result's status comes from one annotation; comparable means the same concept. The September 2026 answers stay as history rows, and the AB2025 stager skips the claims this lane owns. DECOMPOSITION.md measures how the September estimate (~253k) became October's (~548k): an engine x data grid, and a bisection of the engine step over every policyengine-uk release from 2.132.6 to 2.148.3. diagnostics/losers.json measures, in aggregate only, the few households the model makes worse off: in each, a Universal Credit award begins and ends the household's Tax-Free Childcare. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
uk/two-child-limit-child-poverty
branch
from
October 26, 2026 18:33
3ebfc2f to
259129d
Compare
The lane's 123 DWP claims opt into display, so populations.json (and its app/public/data copy) gains them, the build chain gains the lane's step, and the AB2025 staged outputs this PR regenerates get their new hashes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 26, 2026 19:11
…d fiscal-year notes The staged AB2025 rows plus this lane's 13 history rows, in the stager's order, now must equal the pre-move staged file byte for byte. The rounding note no longer says the unstated convention cannot change a rounded figure, and the fiscal-year notes say 30 April is policyengine-uk's default, with fiscal_year_blend and preserve_calendar_dates parameters as exceptions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Merge audit, head
|
This branch was successfully 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.
Moves the UK two-child-limit child-poverty benchmark comparison out of the hard-coded policyengine-uk docs page (
docs/book/validation/child-poverty-tcl.md, corrected by PolicyEngine/policyengine-uk#1724) into scorecard, where it is recomputed on a certified pair and concept-annotated (Max, 2026-10-23: "should that info be in scorecard instead"). PolicyEngine/policyengine-uk#2685 trims that page to the method and links here.What it adds
sources/dwp-two-child-limit-poverty/: DWP's Budget 2025 note, Tables 1-4 (relative and absolute low income, BHC and AHC; children, working-age adults and individuals; FYE 2027-2031), the FYE 2026 figure and the 2 million children in gaining households. Raw GOV.UK content-API captures, adapter, QC against the Child Poverty Strategy note's Tables A1-A5, and annotations. These are 123 claims, all held out.sources/rf-no-half-measures/: the Resolution Foundation's No half measures (30 October 2025), including vendored PDFs, an extract and annotations. Its figures were alreadyuk_ab2025claims, so the lane attaches results to them one for one and mints none. It also attaches results to HM Treasury's static and post-behavioural costings.pipeline/compute_uk_two_child_limit_poverty.py: the counterparts on policyengine.py 6.11.0's certified Microcosm pair,data/uk/certified_pairs.json, entrypair-pe6.11.0_uk2.132.6_microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71(policyengine-uk 2.132.6, core 3.33.3). It goes through that registry's preflight and the managed route and covers every concept the sources use:pipeline/modal_uk_two_child_limit_poverty.pyran it in offline Modal containers (block_network), because a host capacity reservation held local national runs. The ingest'scheck_artifactrefuses an artifact that is off its pair.History. The September 2026 Populace answers for the 13 claims this lane took over stay as each claim's earlier history row.
pipeline/stage_uk_ab2025.pynow skips this lane's claims, and the staged AB2025 files were regenerated over the original cohort; the 13 rows that left them are exactly the history rows.Decomposition (
pipeline/decompose_uk_two_child_limit_poverty.py,results/uk/two_child_limit_poverty/DECOMPOSITION.{json,md}): a measured account of how the September figure (~253,000, Populace + policyengine-uk 2.89.2) became October's (~548,000, Microcosm + 2.148.3).Losers diagnostic (
pipeline/diagnose_uk_two_child_limit_losers.py,diagnostics/losers.json): who is worse off when the limit goes, and through which variables. It writes aggregates only: the repository is public and the microdata is not.Results (2029-30 unless stated)
DWP's count of gaining children in deep material poverty (0.6 million) is
pe_gap: policyengine-uk has no material-deprivation variable. Below, a negative DWP value means fewer people in poverty, matching DWP's tables.Lane totals: 123 claims, 153 results (DWP 123, RF 5, HMT 12, history 13). Statuses: comparable 59, constructed 87, concept_mismatch 6, pe_gap 1.
How the estimate moved from ~253,000 to ~548,000
Measured on 2029-30 AHC children lifted (
DECOMPOSITION.md; BHC alongside it there). Each step changes one factor:Steps 2 and 3 depend on their order. Data first gives +257k for the data, then -68k for the engine.
Step 6 is bisected over every policyengine-uk release from 2.132.6 to 2.148.3, holding policyengine-core at 3.33.3. Every release either ran or sits between two runs with equal counts. Ten releases move a count. The largest:
Core 3.33.3 to 3.33.12 changes nothing. Each release's changelog summary is in the table; a release with several changes is not split.
Invariants (each tested)
diagnostics/wrapper_pe6.10.1.json).losers.jsonmeasures each loss as a Universal Credit award that begins and ends the household's Tax-Free Childcare. policyengine-uk makes a UC award disqualify Tax-Free Childcare, and take-up (would_claim_uc) is a data input. This is a known model limitation, labelled as such. The test holds every loss to that one mechanism, and checks the diagnostic and the compute count the same households. The benefit units whose UC "falls" fall by under a penny a year (float rounding).comparablerequires the same concept, and a measuredspreadwithin half the source's rounding unit wherever the source leaves a convention unstated.Checks
uvx ruff format --check be nz scorecard_db tests pipeline🤖 Generated with Claude Code