Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
26e8e3b
Hold VAT and the ONS energy rows out of the objective; measure them w…
juaristi22 Oct 8, 2026
f7a02a3
Level household road fuel to ONS 07.2.2 in the LCFS stage (#1113)
juaristi22 Oct 8, 2026
b609d07
Give every flagged fuel-car household a positive road-fuel spend (#1113)
juaristi22 Oct 8, 2026
149fb61
Bind household road fuel on ONS 07.2.2; measure the OBR cars receipts…
juaristi22 Oct 8, 2026
8db8d68
Recompose housing and transport around their levelled parts (#1113)
juaristi22 Oct 8, 2026
e3f2a3a
Label the litres audit's per-fuel ratios as a uniform cars share (#1113)
juaristi22 Oct 8, 2026
21a4d3a
Report stage-levelled consumption at design and final weights (#1113)
juaristi22 Oct 8, 2026
ea433d1
Put every LCFS spend column at calendar-2024 prices (#1113)
juaristi22 Oct 9, 2026
975fd93
Record the consumption-tax receipts and changelog fragments (#1113)
juaristi22 Oct 9, 2026
2232d91
Re-pin the UK Chronicle feed to 1ee7dfe (PolicyEngine/chronicle#322 v…
juaristi22 Oct 9, 2026
543533a
Report each LCFS division's capture of ONS household spending (#1113)
juaristi22 Oct 9, 2026
59339e4
Benchmark each fuel in the litres audit against its cars share (#1113)
juaristi22 Oct 9, 2026
3ed090d
Regenerate the charter-H2 UK spine fixture for #1113
juaristi22 Oct 9, 2026
2e32d7b
Record the Group B receipts (#1113)
juaristi22 Oct 9, 2026
3523109
Address review round 1 on the consumption-tax levels (#1113)
juaristi22 Oct 10, 2026
d822cc4
Address the adversarial review on the consumption-tax levels (#1113)
juaristi22 Oct 11, 2026
e34e643
Commit the consumption-tax measurement scripts and aggregate outputs …
juaristi22 Oct 11, 2026
3f57431
Record the review round 2 receipts (#1113)
juaristi22 Oct 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1113-calendar-2024-spend-basis.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Every household spend column the UK LCFS stage emits is now at calendar-2024 prices, the H5's year (microcosm#1113): the diary columns are carried on the engine's CPI index from the April-to-March 2023-24 diary year to calendar 2024, three quarters of a year's step and not a full one; domestic energy is priced at QEP's calendar-2024 averages paid and levelled to the DESNZ volume over the four quarters of 2024, and each area's fiscal-year bus yield is re-priced to 2024 by its fares index, so policyengine-uk can project every column from the H5's year. A stage-health gate holds every level-setting step to that year and checks that each diary column declares the diary-year window.
1 change: 1 addition & 0 deletions changelog.d/1113-consumption-drift-diagnostics.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UK calibration diagnostics report the stage-levelled consumption totals (electricity, gas, domestic energy, petrol, diesel and total consumption) and shares (gas-connected, fuel-buying, and fuel-car households without fuel) at design and final weights, in a report-only `consumption_drift` block (microcosm#1113).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK calibration holds `obr.vat`, `ons.household_electricity_expenditure`, `ons.household_gas_expenditure` and `obr.fuel_duties_cars` out of the objective as reviewed measure exclusions, still measured on every evaluation; `tools/diagnose_uk_consumption_taxes.py` reports them on any H5 the engine loads (microcosm#1113, microcosm#1123 item 3). VAT's level is an engine factor (policyengine-uk#1996), the ONS energy rows sit below the DESNZ volume at QEP prices the stage sets, and the OBR cars receipts include business-paid car fuel; a re-solve of the 2026-09-30 national problem with the four rows masked together left the other rows fitting no worse.
1 change: 1 addition & 0 deletions changelog.d/1113-division-capture-diagnostic.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK LCFS stage receipt reports how much of ONS household spending each COICOP division captures (microcosm#1113): each of the twelve division totals at prior weights against ONS Consumer Trends for calendar 2024, less the classes a household diary does not record (narcotics, owner-occupiers' imputed rent and FISIM), on ONS's domestic concept, with the twelve together also against the national concept. The block is report-only, and the Consumer Trends resource vendors the division and total rows it reads. When a published row is missing for the year, the block records why it has no figures and the stage carries on.
1 change: 1 addition & 0 deletions changelog.d/1113-household-road-fuel-target.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK contract binds `ons.household_road_fuel_expenditure`, ONS Consumer Trends COICOP 07.2.2 (fuels and lubricants for personal transport) for the calendar year, measured as petrol plus diesel spend (microcosm#1113). The class also carries other motor fuels and lubricants, so the row reads about 0.4% low from scope alone, and the new row adds one ledger-only row to each national compile-parity receipt.
1 change: 1 addition & 0 deletions changelog.d/1113-recomposed-coicop-totals.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK LCFS stage writes `housing_water_and_electricity_consumption` and `transport_consumption` around the parts it re-levels (microcosm#1113): each keeps its own chain draw less the chain's draws of the diary energy, or of petrol, diesel and bus fares, and adds the levelled electricity and gas, or the levelled petrol and diesel and the priced bus fares, back, so no total is below its parts. No column carries the diary's liquid and solid fuels: part of them stays inside the housing remainder, and the receipt records their published ONS spend. The two totals keep their committed support bounds, which the terminal support gate applies to the emitted frame; a stage-health gate checks the declaration and the receipt.
1 change: 1 addition & 0 deletions changelog.d/1113-road-fuel-level-and-incidence.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK LCFS stage sets household road fuel itself (microcosm#1113): a flagged fuel-car household whose chain draw is zero is redrawn from the donor's distribution among households with positive road fuel (`redraw_zero_road_fuel`), and one factor then scales petrol and diesel to ONS 07.2.2 for 2024 less the donor's other-fuels share (`level_road_fuel`). Two stage-health gates check the receipts, petrol and diesel leave the committed support bounds, and the litres audit benchmarks each fuel against HMRC clearances times DESNZ's cars share of that fuel's road use (PolicyEngine/chronicle#322), keeping the OBR cars share of duty receipts, uniform across fuels, beside the total and falling back to it where DESNZ publishes no split for the year.
1 change: 1 addition & 0 deletions changelog.d/uk-chronicle-feed-repin-1ee7dfe.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Re-pin the UK Chronicle feed to 1ee7dfe (PolicyEngine/chronicle#322 via #323). The feed now carries ONS Consumer Trends household final consumption expenditure by COICOP division and class, with the national and domestic totals (annual for 2020 to 2025, quarterly to 2026 Q1), and DESNZ road transport fuel consumption by vehicle type and fuel for 2005 to 2024 (352,549 rows). No compiled target value moved on either surface. The seven Consumer Trends series already in the feed come back on ONS's domestic concept under new keys with the same values, so the electricity, gas and road-fuel targets resolve to the same values; the vendored resources and the membership reports restate the feed identity, and the re-pin itself leaves the three compile-parity receipts unchanged (microcosm#1113).
36 changes: 36 additions & 0 deletions docs/evidence/uk-consumption-taxes-1113/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Consumption-tax levels: measurement scripts and outputs

Evidence for [PolicyEngine/microcosm#1167](https://github.com/PolicyEngine/microcosm/pull/1167) (microcosm#1113), filed on the review's ask that the scripts behind `experiments/1113-consumption-tax-levels-receipts.md` live in the repository. `receipts.json` carries the digests of the files here and of the spine the stage runs measured.

## What was measured

- **M2 and M3, desk measurements** (`scripts/m2_m3_desk.py`, `outputs/m2_m3_desk.json`). ONS Consumer Trends energy and road-fuel spending against DESNZ Energy Trends volume at QEP prices, and the road-fuel level against the OBR cars receipts. It reads the pinned Chronicle feed, the vendored resources, the 2026-09-30 national build and the LCFS 2023-24 household file. It runs no solve and no engine.
- **M4, the masked re-solve** (`scripts/m4_resolve.py`, `scripts/run_m4.sh`, `outputs/m4_report.json`, `outputs/solve_*.json`). The stored 2026-09-30 national problem (1,090 rows) re-solved twice with the doctrine options: with all rows bound, which reproduces the stored weights exactly, and with `obr.vat`, `obr.fuel_duties_cars` and the two ONS energy rows masked together. No arm masks one row alone.
- **Stage-only runs** (`scripts/stage_dev_run.py`, `scripts/run_stage_dev_at.sh`, `outputs/stage_dev_run*.json`). The `lcfs_consumption` stage re-run on the finished head-r3 spine of microcosm#1121 (63,956 households), with every lcfs stage-health gate run on its receipts:
- `stage_dev_run.json`: Group A's head;
- `stage_dev_run.group-b.json`: Group B's head;
- `stage_dev_run.base-7f235941c.json`: the base tree's stage on the same spine;
- `stage_dev_run.review-r2.json`: the head after the second review round.

The base run is what isolates this PR's effect. The spine already holds the stages after `lcfs_consumption`, so a re-run redraws most households, and a comparison with the spine's stored columns mixes that drift with the change. Compare a run with the base run, not with `before_head_r3`.

## What is not here

- **Unit records.** The household dumps the stage runs write (`*.households.parquet`) and the solved weight vectors (`weights_*.npy`) stay out of the repository.
- **Licensed inputs.** The LCFS tabs, the spine and the national H5s.
- **Exact donor minima.** `scripts/sanitize_outputs.py` drops the stage's `donor_floor` receipt, which records each donor column's exact minimum, before an output is copied here.
- **M1.** The design- and final-weight energy volumes on the 2026-09-30 build (93.0 and 260.1 TWh at design weights, 82.9 and 205.2 TWh at final weights) were computed during the audit of 2026-10-08, and no script was saved. `outputs/m4_report.json` holds the same build's spend at design and final weights.

## Re-running

The stage runs need the licensed LCFS 2023-24 tabs and the head-r3 spine:

```bash
scripts/run_stage_dev_at.sh <tree> <label>
```

It runs `<tree>`'s own stage code with one worktree's environment, waits up to 15 minutes for a quieter machine, and writes `stage_dev_run.<label>.json`. A run takes about 70 seconds and 5 GB.

## Provenance

Paths inside the scripts and outputs are machine-local. The scripts are copies of the ones run, formatted by this repository's formatter where they are Python.
145 changes: 145 additions & 0 deletions docs/evidence/uk-consumption-taxes-1113/outputs/m2_m3_desk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
{
"feed_period_keys_sample": {
"04.5": [
"2020",
"2020-Q1",
"2020-Q2",
"2025-Q3",
"2025-Q4",
"2026-Q1"
],
"04.5.1": [
"2020",
"2020-Q1",
"2020-Q2",
"2025-Q3",
"2025-Q4",
"2026-Q1"
],
"04.5.2": [
"2020",
"2020-Q1",
"2020-Q2",
"2025-Q3",
"2025-Q4",
"2026-Q1"
],
"04.5.3": [
"2020",
"2020-Q1",
"2020-Q2",
"2025-Q3",
"2025-Q4",
"2026-Q1"
],
"04.5.4": [
"2020",
"2020-Q1",
"2020-Q2",
"2025-Q3",
"2025-Q4",
"2026-Q1"
],
"07.2.2": [
"2020",
"2020-Q1",
"2020-Q2",
"2025-Q3",
"2025-Q4",
"2026-Q1"
]
},
"m2_energy": {
"cy2025": {
"electricity": {
"energy_trends_twh": 92.8125,
"ons_bn": 26.522,
"ons_implied_all_in_pence_per_kwh": 28.575892255892253,
"ons_over_unit_only": 1.1099126568149906,
"ons_over_unit_plus_fixed": 0.8959278267967942,
"qep_all_in_pence_per_kwh": 31.895306073994245,
"qep_fixed_gbp_per_year": 193.97637754712437,
"qep_unit_gbp_per_kwh": 0.2574607297288936,
"unit_only_bn": 23.89557397796294,
"unit_plus_fixed_per_household_bn": 29.60283094992591
},
"gas": {
"energy_trends_twh": 250.35467,
"ons_bn": 15.339,
"ons_implied_all_in_pence_per_kwh": 6.12690787833117,
"ons_over_unit_only": 0.954864386565531,
"ons_over_unit_plus_fixed": 0.8096847699054153,
"qep_all_in_pence_per_kwh": 7.56702868333178,
"qep_fixed_gbp_per_year": 115.82063769351817,
"qep_unit_gbp_per_kwh": 0.06416521512932861,
"unit_only_bn": 16.064061259182072,
"unit_plus_fixed_per_household_bn": 18.944409688960622
}
},
"fy2024_25": {
"electricity": {
"energy_trends_twh": 93.0268,
"ons_bn": 25.58,
"ons_implied_all_in_pence_per_kwh": 27.49745234706558,
"ons_over_unit_only": 1.1083455378292948,
"ons_over_unit_plus_fixed": 0.8748262957464121,
"qep_all_in_pence_per_kwh": 31.431899659125385,
"qep_fixed_gbp_per_year": 209.38599214492953,
"qep_unit_gbp_per_kwh": 0.24809458249743663,
"unit_only_bn": 23.079445107072537,
"unit_plus_fixed_per_household_bn": 29.240090432095254
},
"gas": {
"energy_trends_twh": 260.07266,
"ons_bn": 14.662,
"ons_implied_all_in_pence_per_kwh": 5.637655261418098,
"ons_over_unit_only": 0.9047648228612897,
"ons_over_unit_plus_fixed": 0.7709264310246218,
"qep_all_in_pence_per_kwh": 7.312831723677202,
"qep_fixed_gbp_per_year": 113.12698361893374,
"qep_unit_gbp_per_kwh": 0.062310725604795225,
"unit_only_bn": 16.205316154569203,
"unit_plus_fixed_per_household_bn": 19.018675985091146
}
},
"gas_connected_households_design_m": 24.869043092306743,
"gb_meters_2024_m": {
"electricity": 29.344362,
"gas": 24.702708
},
"households_design_m": {
"gb": 28.647089333333337,
"ni": 0.7753436666666668,
"uk": 29.422433
},
"lcfs_fye2024_p537_bn": 60.089294518810306,
"ons_04_5_fy2023_24_bn": 46.689
},
"m3_fuel": {
"desnz_2024_divisors": {
"fuel_duty_2025_bn": 13.234832230762382,
"litres_2024_bn": 25.686262365716125,
"vs_obr_cars_14_4": -0.08091442841927898
},
"frame_design_bn": {
"diesel": 9.125353225182106,
"petrol": 19.300497308930442
},
"fuel_car_households_design_m": 22.259794651531145,
"fuel_car_zero_fuel_share_design": 0.33588497980394383,
"lcfs_other_fuels_share": 0.0037195500952492827,
"lcfs_vehicle_households_zero_diary_fuel_share": 0.32366066575040786,
"level_bn": 36.887283657723394,
"level_factor": 1.2976668407320537,
"ons_07_2_2_bn": {
"cy2024": 37.025,
"cy2025": 35.099,
"fy2024_25": 36.92
},
"rac_divisors_pe_uk_2_100": {
"fuel_duty_2025_bn": 12.975711911731786,
"litres_2024_bn": 25.18335969321851,
"vs_obr_cars_14_4": -0.09890889501862599
}
}
}
Loading
Loading