Add UK pension facts: State Pension, Pension Credit, workplace pensions, salary sacrifice and Winter Fuel Payment - #305
Conversation
…e labels A /table request for a caseload and the mean of an amount returns one cube per measure. The parser read only the first; it now emits the second cube's rows after the first's, so a single-measure response unpivots exactly as before (all 20 archived Stat-Xplore artifacts reproduce row for row). Stat-Xplore names its age column after the field label, 'Age (bands and single year)', and labels items '66', '65-69', '90 and over' and 'Under 65'. The row-semantic check now reads those labels from that column, so a row can state numeric age bounds beside the publisher's label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…March 2026 Eight Stat-Xplore cubes for #302 sections 1 and 2, every published reference month from February 2023 to March 2026 (the compendium point after the quarterly series ended), each with DWP's own totals: - State Pension, Great Britain residents (abroad and unknown-address cases are separate items of the residence field and are not requested): age by gender by type of pension; region by type by gender; category by protected payment; grouped weekly amount by type. Caseload and mean weekly amount. - Pension Credit: type by partner indicator by age band; region by type; gender by type; grouped weekly award by type. Claims and mean weekly award. 12,822 facts; all-zero series (ages below State Pension age, unknown gender and type) are not ported, and no mean is emitted for a cell with no cases. March 2026 reproduces the compendium: 12,207,303 GB residents of 13,307,794 in all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 2024-25 package carried only the salary-sacrifice headline rows. It now emits every published cell: Income Tax relief on the five contribution types and Class 1 primary and secondary NICs relief on three, by sector, scheme type and rate, under two general concepts. The six original record sets are unchanged. 2023-24 comes from the 31 July 2025 edition, the newest that publishes its detail (the July 2026 tables carry 2024-25 only); GOV.UK now answers 410 for that asset, so the artifact is the UK Government Web Archive capture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to May 2026 DfC's Benefits Statistics Summary, May 2026 edition, for #302 section 3. Each workbook carries a rolling 21-quarter series, so this edition is the newest release for every point from February 2023: State Pension claimants and average weekly payment by category of pension (including the new State Pension), and Pension Credit claimants, partners and beneficiaries by type with the average weekly payment. The May 2026 cross-sections by age band and gender are added; cells another table of the same workbook already prints are ported once. May 2026: 335,540 State Pension claimants (152,970 new State Pension) at an average of GBP 227.39 a week; 60,030 Pension Credit claimants, 68,900 beneficiaries, GBP 92.88 a week. Counts share the DWP Great Britain concepts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the WFP charge #302 sections 5 and 6: - OBR supplementary release of 5 February 2026, Table 1.1, 2027-28 to 2030-31: the salary- and bonus-sacrificed contributions above the GBP 2,000 threshold, the NICs rate increases on each and the static yield. No later OBR update exists. The table labels one yield row GBP m; its values are GBP billion. - HMRC's policy paper: GBP 5.8 billion of NICs forgone through salary sacrifice in 2023-24 and GBP 8 billion expected by 2030-31. These do not match Table 6.2's GBP 4.1 billion for 2023-24, so they carry their own concept. - HMRC's Winter Fuel Payments charge note: 2.2 million recipients with income over GBP 35,000, by the route the charge is recovered through, as a projection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… to 2025-26 #302 section 6, every winter from 2023 to the latest: - Stat-Xplore recipients by country, age band, amount and gender: winter 2023 to 2024 from DWP's 'data to winter 2023' database (Great Britain), winters 2024 to 2025 and 2025 to 2026 from 'data from winter 2024' (England and Wales, as the payment is devolved in Scotland from 2024). - Each winter's statistics workbook, the newest release for it: recipients by region (by sex and age band, and by amount), and beneficiaries where published - 11.0 million beneficiaries against 10.9 million recipients in 2025 to 2026. A winter is stamped as the financial year its payments fall in, as DWP's expenditure and caseload tables book it; period_coverage keeps the publisher's label and qualifying week. 1,048 facts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The NI time-series rows were labelled with their dates, the policy paper's two forgone-NICs rows with their years, and the WFP charge declared value labels that differed from its row labels. The period is on the record set, so each row now carries one label per value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#302 section 4, from the 30 July 2026 edition (2009 to 2025), the newest release for every data year: participation rates and indicative counts by sector and eligibility (Table 1.1), earnings band, age and gender (1.3a, 1.4, 1.5); the annual amount saved and its employee, employer and tax-relief parts, and median contributions (2.1 eligible savers, 2.2 all savers). 936 facts. Every edition restates all years' amounts in its own year's earnings terms and re-cleans the data (Note 18), so data year 2023 is GBP 152.0 billion here against the 2023 edition's nominal GBP 131.8 billion; the amount concepts carry the price basis. 2025: GBP 166.1 billion saved by eligible savers - employer 101.6, employee 44.2, tax relief 20.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…3 and 2024 #302 section 4, from 'Employee workplace pensions in the UK: 2024 provisional and 2021 to 2023 final results' (10 March 2026), the only release since 2023: - summary Tables 1 to 4: membership by pension type, by sector and sex, and the median employer contribution rate, 2023 (final) and 2024 (provisional); - P1 pension type by age and gross weekly earnings; P5 employee and P9 employer contribution rate bands by age and pension type, each on the full-pay and qualifying-earnings bases (2024 provisional, UK, all employee jobs). 3,429 facts. ASHE counts jobs, not people. Suppressed ([u], [c]) and [w] cells emit no fact; cells another table already prints are ported once. The savings- trends median rows now carry the saver population in their ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t, pensioners and disability #302 section 7. The Spring Forecast 2026 workbook is still the latest edition: - the seven ported families now run to 2030-31, the workbook's last year (the first port stopped at 2026-27); every fy2026 record set is cloned with its year's column, and no line zero to 2026-27 becomes non-zero later; - Table 1c (caseloads by benefit, including Winter Fuel Payments and Attendance Allowance), Table 2c's block of benefits directed at pensioners, and the Disability_benefits worksheet (nominal expenditure and caseload), 2023-24 to 2030-31. 2,674 facts (882 before). The existing record sets are unchanged. Disability benefits cover England and Wales from 2020-21 and Winter Fuel Payments from 2024-25, as the Notes tab states. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch 2026 #302 section 7 asked for the Attendance Allowance row of the February 2026 benefit statistics summary (1,744,000 at August 2025). The quarterly summaries ended in May 2026 and the September 2026 compendium publishes no files, so the series from 2023 comes from Stat-Xplore, their revised source: cases with entitlement by country, award type, age band and gender, with DWP's totals. 2,678 facts. August 2025: England 1,611,266 and Wales 125,031, which with cases abroad make the summary's DWP-ownership total; Scotland falls from 92,380 to 579 by March 2026 as cases move to Pension Age Disability Payment. The field's Devolution value set is not used: it codes 'DWP Ownership' as K03000001, Great Britain's code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pension membership by industry, occupation and size of business (P2-P4), and employee (P6-P8) and employer (P10-P12) contribution rate bands by the same groupings on both bases, from the 10 March 2026 release. SIC 2007 sections carry their letter, the glossary's two summary categories their own filter, and SOC 2020 major groups their code. The all-employees rows restate P1, P5 and P9 cell for cell and are not ported twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The policy paper's 290,000 employers, stamped like its employee headcounts. Also note that the paper's NI-relief companions match HMRC Table 6.2's 2023-24 values, and fix a rounding sum in the OBR costing header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Chronicle#302 asks for Pension Credit crossed by type, partner indicator, age band and region. The region package now carries that cross from one Stat-Xplore request, replacing the region-by-type cut, whose 1,144 cells it reproduces exactly in its margins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SPP Review NI-relief pair is ported from HMRC Table 6.2 (2023-24), the edition uk-data's dead salary-sacrifice asset pins, recovered from the UK Government Web Archive. The headcounts row gains the employer count and forgone NICs, and a new section lists the pension packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fact counts, validity and the 2023 window for every package, publisher parity values for each source, and unit tests for the multi-measure Stat-Xplore parser and the Stat-Xplore age-label bounds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The HMRC 2023-24 CSV (CRLF) and the Winter Fuel Payment charge note are pinned publisher bytes, like the artifacts already listed here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Notes tab says Scottish cases leave a benefit's lines once executive competence moves to the Scottish Government: Carer's Allowance from 2019-20; DLA, PIP, Attendance Allowance and Severe Disablement Allowance from 2020-21; Winter Fuel Payments from 2024-25. The Table 1c, Table 2c and Disability_benefits lines for those benefits now carry England and Wales from the move (446 facts). Lines that mix moved and unmoved benefits, and the outside-UK lines, keep the workbook's Great Britain frame. The header no longer claims no ported family is affected, names Table 1c's blank rows, and drops the Council Tax Benefit entity rule, which no fact uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the all-zero series each Stat-Xplore cube drops as they are, give the State Pension and Winter Fuel Payment sums their perturbation caveat, state that the 2023-24 workbook differs from the cube in every shared cell, say which tables the statistics packages port, and attribute the NI-relief pair to uk-data's targets rather than the policy paper. Relabel the Northern Ireland all-ages rows and the savings-trends gender total to the labels the bundle already uses, so they raise no cross-package label warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 new packages and 57,252 facts: 408,145 facts, 268 packages, 263 source tables and one new period (tax year 2030). The 198 new semantic duplicate keys are the State Pension, Pension Credit and Winter Fuel Payment totals reached through more than one cut or release; 16 of them differ, the Winter Fuel Payment 2023-24 workbook against the Stat-Xplore cube, both kept as published. Two warnings are new, both publisher wording: ASHE's age bands against NTS0601's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f15eec6 to
3d93e72
Compare
Automated review pass (Claude Code, high effort) — round 1 at
|
| SDA caseload | 2023-24 | 2025-26 | 2030-31 |
|---|---|---|---|
incapacity_benefits__… (stamped GB) |
10,000 | 8,000 | 2,000 |
caseloads_by_benefit__… (stamped E&W) |
10,000 | 8,000 | 2,000 |
Notes (L) says SDA has been England and Wales only from 2020-21. The header's "None of the seven families first ported is one of those" (:106) misses that the incapacity-benefits family carries SDA.
Suggested fix: stamp the incapacity SDA caseload and expenditure lines K04000001, keeping paid_outside_uk on the frame as elsewhere, and correct the header sentence. If you'd rather not touch facts that predate this PR, stamp at least the 2027–2030 periods it adds, and record the older ones in the checklist.
2. Question: the two "mixed coverage" lines kept as Great Britain. Industrial Injuries benefits and the Disability_benefits totals include benefits whose Scottish cases left the tables (IIDB; DLA/PIP/AA). Their GB stamp therefore over-states coverage for most of the line. Would a concept_relation: approximate, or a coverage note on the fact, be more honest than GB? I'm not asking to split them.
3. Nit: salary-sacrifice relief cells are emitted under two concepts. In both HMRC packages the six hmrc.ss_* facts are the same publisher cells as the generic hmrc.pension_contribution_*_relief{contribution_type: 'Salary sacrificed contributions'} facts. For example, ss_income_tax_relief_total is 7.2bn, and so is the generic Income Tax / salary-sacrificed / Total row. That's fine while consumers pick one family, but a union over relief concepts double counts. Please record the relation: a concept note, or source_concept on the ss_* measures pointing at the generic concept.
4. Nit: one contribution type has two filter values. Income Tax rows say "Employer contributions to net pay arrangements plus deficit reduction contributions" (e.g. hmrc/pension_contribution_relief_2023_24/source_package.yaml:1561). NICs rows say "… and on employer deficit reduction contributions". Keeping publisher wording is the house style, but it means one filter can't join Income Tax and NICs relief for the same contribution. A dimension_value_labels entry pointing both at one value would fix it without changing the guards.
5. Nit: source_rows_from_statxplore_table returns partial rows silently (chronicle/sources/rows.py:1423). If a later cube has no values, return rows hands back the earlier cubes' rows as if complete. Before this change a missing values returned []. I'd raise, or at least continue, and add a test with a two-cube response whose second cube is empty.
6. Question: Winter Fuel Payment 2023-24, two releases for the same key. Workbook and cube disagree in 16 semantic keys (≤311 recipients, ≤0.07 %), and both carry the same concept, period and geography. The body says DWP doesn't explain the difference. Could one be marked the preferred source? For example, a note that the Stat-Xplore cube is the revised series, if that's what it is. Otherwise a consumer resolving the duplicate gets an arbitrary pick.
7. Question: the price basis is in the concept name (dwp.workplace_pension_annual_saving_2025_earnings_terms, …median_contribution_2025_earnings_terms, source_package.yaml:24485). Each edition rebases, so the 2026 edition will mint a new concept family and the time series splits across concepts. Would a price_basis: 2025_earnings_terms filter on one concept serve better? The earnings bands are already in 2024 terms per Note 9, so the table carries two bases.
8. Nit: P1's all-ages, all-earnings row. It is dropped in favour of the summary workbook's Table 1, which is less precise for the shares (28 vs 28.1 for defined benefit; the job counts are identical). If one of the two has to go, I'd keep P1's decimal and drop the summary's 2024 column. The summary is still needed for 2023 final.
Not findings, noted:
- The forgone-NICs £5.8bn vs Table 6.2's £4.1bn gets its own concept.
- NI Table 9's mislabelled columns are left out.
- The WFP charge's 2025-26 stamp is flagged as this package's reading. The note also says PAYE recovery runs through 2026-27 tax codes, which fits a liability-year stamp.
- The ASHE classification of salary sacrifice is marked unverified.
All four are disclosed well.
- Severe Disablement Allowance: the incapacity family's SDA lines carry England and Wales in every year, as the new Table 1c and 2c SDA lines do (Notes, L); the outside-UK line keeps the frame. - Lines that sum moved and unmoved benefits (the incapacity and disability totals, Industrial Injuries benefits) keep Great Britain, marked concept_relation approximate with a note naming the parts. - HMRC Tables 6.1/6.2: the per-line salary-sacrifice measures and the generic relief measures each say the other emits the same cell. The two HMRC wordings of the employer net-pay type keep their row values, which the row-semantic check requires, and share one label. - The Stat-Xplore parser raises on a cube without values, or with values that do not match the fields, instead of returning partial rows. - Winter Fuel Payment 2023-24: both headers say the Stat-Xplore cube is the later release (16 September 2025). - Savings trends: the price basis is a price_basis filter, not part of the concept, so a later edition's restatement keeps the concept. - ASHE P1 keeps its all-ages, all-earnings row (one more decimal place); the summary package keeps Table 1 for 2023 only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, Vahid. All eight are addressed in c6855da, on top of the rebase onto main (a63ce50). 1. Severe Disablement Allowance (should-fix): fixed. The incapacity family's SDA lines now carry England and Wales for every year from 2023-24 to 2030-31, like the new Table 1c and 2c SDA lines. That covers the total, working-age and pensioner lines, for both caseload and expenditure.
2. Mixed-coverage lines: now marked. Industrial Injuries benefits, the Disability_benefits totals and, now that SDA has moved, the incapacity totals keep Great Britain. Each sits in its own record set with 3. The
4. The two employer net-pay wordings: done as you suggested. A 5. Parser: fixed. 6. Winter Fuel Payment 2023-24: the cube is the later release, and both headers now say so. DWP first published WFP statistics on Stat-Xplore, for winter 2020 to 2021 onwards, with the 16 September 2025 release. That is a year after the 2023-24 workbook (24 September 2024), and DWP describes the Stat-Xplore figures as perturbed.
7. Price basis: done. The concepts are now 8. P1: agreed. P1 now keeps its all-ages, all-earnings row (28.1 for defined benefit). The summary package keeps Table 1 for 2023 only. That takes the summary from 80 facts to 66 and P1 from 765 to 779. Checks.
|
Summary
Add the UK pension facts #302 asks for. Every reference period from 2023 to the latest published is ported, each from the newest release that publishes it; superseded editions are not archived. 41 new source packages and 3 extended ones add 57,252 facts.
dwp-state-pension-age-gender-type-february-2023-march-2026, 4,879 facts);dwp-state-pension-region-type-gender-…, 2,798);dwp-state-pension-category-protected-payment-…, 598);dwp-state-pension-amount-band-type-…, 429).dwp-pension-credit-region-type-partner-age-…, 22,966);dwp-pension-credit-type-partner-age-…, 2,194);dfc-ni-state-pension-statistics-may-2026, 275): 335,540 claimants, 152,970 of them on the new State Pension, average £227.39.dfc-ni-pension-credit-statistics-may-2026, 236): 60,030 claimants, 68,900 beneficiaries, average £92.88.dwp-workplace-pension-savings-trends-2009-to-2025, 936). Participation is by sector, earnings band, age and sex. Amounts saved are split by component and sector. The 2025 parity: £166.1bn saved by eligible savers (employee £44.2bn, employer £101.6bn, tax relief £20.3bn), 22.61m eligible employees participating (90%) and 24.21m of all employees.ons-employee-workplace-pensions-summary-2024, 66). Its Table 1 is ported for 2023 only; the 2024 column is P1's all-ages, all-earnings row, which has one more decimal place.ons-ashe-pension-membership-by-{age,industry,occupation,business-size}-earnings-2024);ons-ashe-{employee,employer}-contribution-bands-by-{age,industry,occupation,business-size}-2024-{full-pay,qualifying-earnings}).obr-salary-sacrifice-costing-february-2026, 36). The salary-sacrificed base above £2,000 grows from £12.9bn to £15.1bn, and the bonus-sacrificed base from £13.0bn to £14.2bn.hmrc-salary-sacrifice-reform-2029-headcounts(3 facts to 6): the 290,000 employers operating salary sacrifice, and forgone NICs of £5.8bn in 2023-24 and £8bn projected for 2030-31.hmrc-salary-sacrifice-relief-2024-25(6 facts to 85);hmrc-pension-contribution-relief-2023-24(85), from the July 2025 edition. That asset is gone from GOV.UK and was recovered from the UK Government Web Archive.hmrc-winter-fuel-payment-charge-2025, 5 projections for 2025-26): 2.2m individuals with income over £35,000, of whom 1.3m PAYE-only and 0.9m in Self Assessment.dwp-benefit-expenditure-caseload-spring-2026, 882 facts to 2,674):Code changes:
chronicle/sources/rows.py: the Stat-Xplore parser unpivots every measure cube in a response, so one request can carry a caseload and a mean. A single-measure response unpivots exactly as before; checked on all 20 existing Stat-Xplore artifacts.chronicle/suite.py: the row-semantic age check reads Stat-Xplore's age labels ('66', '65-69', '90 and over', 'Under 65'), so single-year and banded ages carry evidencedagebounds.Docs:
docs/pe-uk-source-checklist.mdgets a section for these packages.Fixes #302.
Review notes
Decisions and departures from the issue text:
benefit_unit, one claim per benefit unit, as indwp-benefit-expenditure-caseload-spring-2026. The issue's proposed shape said person/claimant.period_type: month(the reference month), as the Add UK source packages for #233–#237: UC child-entitlement and nil-award crosses, award-band and Scotland histories, ONS family tables, HMRC Child Benefit, census household composition #239, UK source packages: UC payment-status × child-entitlement composition crosses #251 and UK income facts for the 2025 calibration: SPI 2023-24 Tables 3.3/3.4/3.5/3.8/3.11 and the 3.7 remainder, HMRC liabilities projections (Tables 2.1 to 2.6), ESA caseload by payment type, property rental income statistics 2026, DWP Spring 2026 expenditure tables #280 Stat-Xplore packages do. Chronicle has nopoint_in_timeperiod type.dwp-benefit-statistics-february-2026):price_basisfilter (2025_earnings_terms) rather than a basis in the concept, so a later edition's restatement keeps the concept. Nominal amounts exist only in superseded editions, which are not archived.hmrc.ss_*, which Microcosm selects bysource_concept) and the generic relief measures emit the same cells, and each measure's notes say so.K04000001) from the move.concept_relation: approximatewith a note naming the parts. These are Industrial Injuries benefits, where only the disablement benefit moved, the Disability_benefits totals, which include Armed Forces Independence Payment and Access to Work, and the incapacity totals, which include SDA.Chronicle Governance
ledger-source-ingestor. The following sit outside its allowed paths:chronicle/suite.py, for the age evidence above;chronicle/source_package.pyandchronicle/bundle.py, for alias and UK bundle registration, as every package PR does;db/data/**, for the artifacts;docs/pe-uk-source-checklist.md,changelog.d/302.added.mdand.gitattributes;tests/test_issue_302_uk_pension_facts.py, following thetest_issue_NNNprecedent.tests/test_chronicle_bundle.pyis re-pinned.ledger-source-fidelity: pending specialist review. Each fact is a publisher cell or Stat-Xplore cell, with header or label guards. Tests pin the publisher parity values for every source.ledger-contract: no schema or consumer-contract change.ledger-boundary: pending specialist review. Only publisher levels are emitted, and publisher forecasts aresource_projection. There is no uprating, aging, reconciliation or imputation.Tests
uv run pytest -q(the full suite, including the default-bundle rebuild) before the rebase onto main and the round-one fixes: 1,345 passed, 1 skipped. The skip istest_supabase_client, which needsPOLICYENGINE_SUPABASE_URL.tests/test_chronicle_bundle.py::test_build_bundle_writes_merged_consumer_contract, re-pinned after the rebase and the fixes) passes, and CI runs the full suite.tests/test_issue_302_uk_pension_facts.py(68 tests) covers:uv run ruff check chronicle policyengine_chronicle db scripts testsandruff format --checkon the edited Python files: passed.git diff --check origin/main: clean. The two text artifacts with publisher whitespace (the HMRC 2023-24 CSV and the Winter Fuel Payment charge note) are marked-diffin.gitattributes, as the other pinned artifacts are.🤖 Generated with Claude Code