Fix Universal Credit caseload targets - #458
Merged
Merged
Conversation
Follow-through on the dead-code removal in this PR: the dispatch branch was deleted, so the helper and its exports were unreferenced.
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.
What and why
The Universal Credit family-type targets currently apply an inert undercount adjustment because its numerator is expressed in millions while the family-type values are in thousands. The registry also lacks a current explicit household-total target, while the loss-matrix dispatch retains names that no source emits.
This PR makes the smallest sourced targets fix:
dwp/uc/households, with targets of 6.7 million in 2025 and 7.2 million in 2026, sourced from DWP's Universal Credit deductions statistics, March 2025 to February 2026, Table 1.sources/obr.pyemits neither the GBP split names nor the*_countnames at main.A unit test checks that
get_all_targets(year=2025)returns the new 6.7 million target and that it produces a loss-matrix column through the existing count fallback.Derivation
Table 1 publishes households with a deduction and the share of all Universal Credit households that they represent. Total households are therefore households with a deduction divided by that share.
The 2025 target is the calendar-2025 average, rounded to 6.7 million. The 2026 target represents the December-February plateau, rounded to 7.2 million.
Source: https://www.gov.uk/government/statistics/universal-credit-quarterly-statistics-29-april-2013-to-12-february-2026/universal-credit-deductions-statistics-march-2025-to-february-2026
Vintage tension
The 6.096 million family-type sum and the 6.7 million 2025 total are a known vintage tension: the family-type breakdown predates managed-migration growth. Refreshing the family-type values to a current Stat-Xplore month is follow-up work for the data owner.
Tests
make formatuv run ruff check policyengine_uk_data/targets/sources/dwp.py policyengine_uk_data/targets/build_loss_matrix.py policyengine_uk_data/tests/test_target_registry.pyuv run --extra dev towncrier build --draft --version 0.0.0The full suite was not run because it includes gated private-data tests; the scoped run included every test module importing
policyengine_uk_data.targets, with gated cases skipped by their existing fixtures.Part of #452