UK: two-page note on how constituency impacts are estimated (draft for the Budget-day analysis)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
Start by reviewing the draft text and its internal sources, especially docs/constituency_methodology.ipynb and docs/uk-dense-release-assembly-runbook-762.md; confirm which constituency-weight pipeline will be used and resolve the bracketed decisions. The note is ready when thresholds, suppression, fit figures, validation, dates, and links are settled and the two-page PDF accurately describes the chosen method. The dense release is not yet certified, and issue #1115 is a prerequisite for that route.
Written by the indexing model from the issue text.
Description
A draft of a two-page PDF note explaining how PolicyEngine estimates the constituency impacts of a Budget, for MPs and their staff. It is meant to be published alongside the Budget-day analysis and to stay at a stable link, so that people pointed to the constituency results can see how they are produced.
Before the PDF
- Pipeline for this year's constituency figures. Either Microcosm UK's local ("dense") release, which needs #1115 and a certified local build before Budget day, or the Enhanced FRS constituency weights (policyengine-uk-data), as in 2025. The draft below describes the common approach and marks where the two differ.
- Suppression rule. Decide whether published constituency tables suppress or flag results resting on few survey households (e.g. an effective sample below a threshold), and state it in the note.
- Headline fit figure. Compute one for the chosen weights (e.g. "x% of constituency targets within 10%") by re-running the existing performance check. None is quoted below.
- External check. Decide whether to cite the two-child-limit comparison with official statistics (see Validation), or re-run a similar check for this year.
- Settle the threshold wording (the local runbook's accuracy rule and the effective-sample floor) and check every bracketed item.
Draft text
How we estimate the impact of the Budget in each constituency
What the figures show. For each of the 650 parliamentary constituencies (July 2024 boundaries), we estimate how the Budget changes household net income: the average change per household in pounds a year, and that change as a share of household net income in the constituency. The estimates are static: they show the effect of the policy changes on households as they are today, before anyone changes how much they work, spend or save.
Starting point: a national survey. The analysis starts from a representative sample of UK households: the Family Resources Survey, enhanced with tax records so that high incomes and other under-reported items are measured more accurately [Microcosm: ~X households; Enhanced FRS: ~100,000 households]. PolicyEngine's open-source tax-benefit model calculates each household's taxes and benefits under current policy and under the Budget, so the change in net income is known for every household in the sample.
From national to local: reweighting. The survey is too small to estimate each constituency directly. Instead, each household is given a separate weight for each area, chosen so that the weighted sample matches published official statistics for that area. The targets include:
- population by age (ONS);
- the number of households (Census 2021) [Microcosm];
- employment and self-employment income: the number of taxpayers and the amounts (HMRC Survey of Personal Incomes);
- households on Universal Credit [by number of children] (DWP);
- [local-authority level: housing tenure, private rents and council tax bands].
The weights are fitted together with the national statistics the model is already matched to, so the constituency results add up to the national totals. [Enhanced FRS: a household can only carry weight in constituencies in its own country. Microcosm: each household is copied and each copy is placed in one small census area (an Output Area, or a Data Zone in Northern Ireland), from which constituencies, local authorities and regions are built; no household's weight can move more than tenfold from its starting value.]
From weights to impacts. For each constituency we take the weighted average change in household net income across its households. Because the same households and the same policy calculations are used everywhere, differences between constituencies come from differences in who lives there: their incomes, ages, family types and benefit receipt.
How to read the figures
- Best for comparisons. The estimates are most reliable for comparing constituencies and for seeing which kinds of area gain or lose more. Small differences between individual constituencies should not be over-interpreted.
- What is matched locally, and what is not. Population, households, earnings and Universal Credit are matched to local statistics. Other characteristics, for example most other benefits, disability, and savings and pension income, follow the national pattern within the household types that live in each area. Measures that depend mainly on those characteristics are less precise locally.
- Sample size. Each constituency's estimate rests on a limited number of survey households, reweighted. [We publish / flag the effective sample size; results resting on very few households are [suppressed/flagged] — see the rule above.]
- Static estimates. The figures do not include behavioural responses or wider economic effects.
- Boundaries and data year. Constituencies are on July 2024 boundaries. Some local statistics are published on older boundaries and are converted by population share. The survey and the local statistics describe [2024-25]; impacts in later years apply the policy for that year to the same weighted population.
Validation
- The fitted weights are checked against every local target, and the fit for each is published in our validation notebooks. Fits are weakest where incomes are very unequal, such as some central London constituencies.
- [Microcosm: every constituency must meet a minimum effective sample size; some targets are held out of the fit to test it.]
- As an external check, our constituency estimates of the two-child limit's effect were compared with official local statistics on children in low-income families: the correlation was 0.73 (0.68 against End Child Poverty's estimates), and 12 of the top 20 constituencies were the same.
Method and code
All code and data sources are open: [links to the model, the data pipeline and this note's validation].
Sources for this draft (internal)
- 2025 method (Enhanced FRS, policyengine-uk-data at c61798e): 650 constituency weight vectors over the Enhanced FRS households, starting from national weight ÷ 650 and restricted to the household's country. Fitted by gradient descent (Adam, learning rate 0.1, 256 epochs, 5% dropout) on relative error against local targets plus the national targets; national weight = sum of constituency weights. The local targets were: HMRC SPI employment and self-employment income (counts and amounts); ONS 2020 age populations scaled to the UK projection; DWP Universal Credit households. HMRC and ONS targets on 2010 boundaries were mapped to 2024 boundaries by population share. Local authorities used the same method (360 areas, 2021 boundaries). Dashboard measures: average £/household change and % of baseline household net income, with the 2025 weights reused for 2026-27 to 2030-31.
docs/constituency_methodology.ipynbdescribes earnings-bracket targets that the 2025 code did not use, so don't cite its data section.- There are two internal issues to fix separately: HMRC count targets scaled by the amount factor, and no random seed set.
- External check: the two-child-limit constituency comparison (r = 0.68 against End Child Poverty, 0.73 against DWP/HMRC Children in Low Income Families; ρ = 0.69; 12 of the top 20 overlap).
- Microcosm method:
- Geography: identity-keyed atomic-area assignment within region by census household counts (#932, #931), with supports built from ONS/NRS/NISRA lookups; NI uses NISRA's official lookup (#887). K = 15 copies per household. Constituency, local-authority and region codes are derived from the area.
- Targets: 20,885 local targets. 11,609 are constituency-level (8 age bands, census households, HMRC employment and self-employment counts and amounts, UC households by number of children). 9,276 are local-authority-level (the same, plus tenure, private rent and council tax bands). They're fitted with the ~364 national targets, giving equal weight to the national, constituency and local-authority groups. Overlaps resolve country, then constituency, then local authority (#802).
- Fence: weight ratio ≤ 10×. Local gates: effective sample ≥ 50 per constituency (minimum 54.1 at K = 15), held-out targets, comparison with the incumbent weights.
- Status: the certified national release carries region only. The dense release is "staged for inspection" only (docs/uk-dense-release-assembly-runbook-762.md). #1115 makes dense build on the current spine, and its 6 Oct trial build was gate-blocked. Impacts need
constituency_code_oa, which arrives with #1115 (closes #1114). - Microcosm has no small-cell suppression for published constituency tables and no constituency uncertainty intervals.
- Contrast case: property-tax constituency analyses (mansion tax, high-value council tax surcharge, Scottish £1m+ bands) allocate using Land Registry, Registers of Scotland and Savills property data, not survey weights. Say so if any of those appear alongside the Budget results.
- Dominant language
- Python
- Stars
- 0
- Forks
- 5
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 142
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from PolicyEngine/microcosm
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/microcosm#1220 ·
Maintainers usually reply within 1 day
-
Update two stale comments about the export-mass reviewed-exclusion registerPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
PolicyEngine/microcosm#1108 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
PolicyEngine/microcosm#475 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
PolicyEngine/microcosm#1324 ·
Maintainers usually reply within 1 day
-
Run the Tests workflow for pull requests into any base branchPossibly taken @anth-volk claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 25/100
PolicyEngine/microcosm#1321 ·
Maintainers usually reply within 1 day
All issues in PolicyEngine/microcosm
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
mohitmishra786/readprism#322 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
API-key credentials accept a blank key: empty via the API, spaces-only via the builder's Add API key dialogPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Significant-Gravitas/AutoGPT#15727 ·
Maintainers usually reply within 1 day