From c71d5ea6234000ccb5c19c53da6c54017b492950 Mon Sep 17 00:00:00 2001 From: vahid-ahmadi Date: Fri, 18 Sep 2026 10:58:14 +0100 Subject: [PATCH] Uprate electricity_consumption and gas_consumption Both variables declare uprating = "gov.economic_assumptions.indices.obr.consumer_price_index" but were missing from data/uprating_indices.yaml, which is the list reset_growthfactor_uprating actually reads. They therefore returned identical values in every year while every other consumption variable on the same index rose with CPI. On enhanced_frs_2024_25, 2024 -> 2027: before electricity_consumption 838.29 -> 838.29 (+0.0%) gas_consumption 658.36 -> 658.36 (+0.0%) domestic_energy_consumption 1496.65 -> 1614.79 (+7.9%) after electricity_consumption 838.29 -> 904.47 (+7.9%) gas_consumption 658.36 -> 710.33 (+7.9%) domestic_energy_consumption 1496.65 -> 1614.79 (+7.9%) This also restores the identity the documentation implies. In the raw dataset domestic_energy_consumption equals electricity_consumption + gas_consumption exactly; after uprating they diverged by 7.9% from 2025 onward, because only the combined variable was in the list. They now agree in every year. The entries are inserted alphabetically within the CPI block, matching the surrounding style. The list as a whole is not fully sorted, so this does not reorder anything else. Fixes #1859. Co-Authored-By: Claude Opus 5 (1M context) --- changelog.d/uprate-electricity-and-gas-consumption.md | 1 + policyengine_uk/data/uprating_indices.yaml | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog.d/uprate-electricity-and-gas-consumption.md diff --git a/changelog.d/uprate-electricity-and-gas-consumption.md b/changelog.d/uprate-electricity-and-gas-consumption.md new file mode 100644 index 0000000000..b02ad01fdc --- /dev/null +++ b/changelog.d/uprate-electricity-and-gas-consumption.md @@ -0,0 +1 @@ +- Uprate `electricity_consumption` and `gas_consumption`. Both variables declare CPI uprating, but were absent from `uprating_indices.yaml`, so they returned identical values in every year while every other consumption variable on the same index rose. This also restores the documented identity `domestic_energy_consumption == electricity_consumption + gas_consumption`, which held in the base year but diverged thereafter because only the combined variable was uprated. diff --git a/policyengine_uk/data/uprating_indices.yaml b/policyengine_uk/data/uprating_indices.yaml index 1c2f83d85b..ff0352ccdb 100644 --- a/policyengine_uk/data/uprating_indices.yaml +++ b/policyengine_uk/data/uprating_indices.yaml @@ -18,12 +18,14 @@ gov.economic_assumptions.yoy_growth.obr.consumer_price_index: - communication_consumption - domestic_energy_consumption - education_consumption +- electricity_consumption - esa_contrib_reported - esa_income_reported - food_and_non_alcoholic_beverages_consumption - free_school_fruit_veg - free_school_meals - free_school_milk +- gas_consumption - health_consumption - household_furnishings_consumption - housing_benefit_reported