Skip to content

Commit b1d4a84

Browse files
MaxGhenisclaude
andauthored
Add Scottish Child Payment as calibration target (#261)
* Add Scottish Child Payment as calibration target - Add SCP total spend to calibration targets - Source: Scottish Budget 2026-27, Table 5.08 - Values: £455.8m (2024), £471.0m (2025), £484.8m (2026) - Extrapolates 3% growth for other years Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix SCP calibration target ordering Move scottish_child_payment df assignment to after the statistics lookup to avoid KeyError when looking up targets. Custom targets (not in statistics CSV) should be added after the initial targets lookup. Also use household_from_person instead of household_from_family since scottish_child_payment is now a Person-level variable. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 753d614 commit b1d4a84

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

changelog_entry.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- bump: minor
2+
changes:
3+
added:
4+
- Add Scottish Child Payment as a calibration target using Scottish Budget figures

policyengine_uk_data/utils/loss.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,23 @@ def pe_count(*variables):
519519
target_names.append("dwp/pip_dl_enhanced_claimants")
520520
target_values.append(1_608_000)
521521

522+
# Scottish Child Payment total spend
523+
# Source: Scottish Budget 2026-27, Table 5.08
524+
# https://www.gov.scot/publications/scottish-budget-2026-2027/pages/6/
525+
scp = sim.calculate("scottish_child_payment")
526+
df["sss/scottish_child_payment"] = household_from_person(scp)
527+
SCP_SPEND = {
528+
2024: 455.8e6,
529+
2025: 471.0e6,
530+
2026: 484.8e6,
531+
}
532+
# Extrapolate for other years using 3% annual growth
533+
scp_target = SCP_SPEND.get(
534+
int(time_period), 471.0e6 * (1.03 ** (int(time_period) - 2025))
535+
)
536+
target_names.append("sss/scottish_child_payment")
537+
target_values.append(scp_target)
538+
522539
# Council Tax band counts
523540

524541
ct_data = pd.read_csv(STORAGE_FOLDER / "council_tax_bands_2024.csv")

0 commit comments

Comments
 (0)