Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f498924
Re-pin the UK Chronicle feed to 7846605 and vendor the bus journey, t…
juaristi22 Sep 18, 2026
db2f85b
Write the calibration's compiled system and weights before the batter…
juaristi22 Sep 18, 2026
37f1f17
Close Vahid's third-pass items on #927: declared fallback regions, co…
juaristi22 Sep 18, 2026
bd36575
Impute local-bus journeys from the NTS microdata, price bus fares at …
juaristi22 Sep 18, 2026
4010cb5
Add the #930 receipts: Chronicle landing and re-pin, the #927 carry-o…
juaristi22 Sep 18, 2026
62436b7
Regenerate the derived surfaces on the 7846605 feed after rebasing ov…
juaristi22 Sep 18, 2026
40a2dbe
Pin the SN 5340 NTS tabs and verify the stage's codebook against the …
juaristi22 Sep 22, 2026
3945aa3
Record the licensed measurement: the pinned tabs and verified codeboo…
juaristi22 Sep 22, 2026
c73bded
Retire the ETB bus-support rake: price bus support from the frame's j…
juaristi22 Sep 23, 2026
eddcaa1
Clip bus support like the other ETB columns before pricing it: drop t…
juaristi22 Sep 23, 2026
b80b185
Rebase onto main b78f5a88: the nts_bus_travel stage records its house…
juaristi22 Sep 23, 2026
9d8e854
Read the NTS stage and ticket tables: the single-fare share of each p…
juaristi22 Sep 23, 2026
5001cb9
Record the support pricing twin, the single-fare share readings and t…
juaristi22 Sep 23, 2026
1411562
Write the single-fare share after the eligibility flag, the declared …
juaristi22 Sep 23, 2026
0e5de2c
Re-pin the gate and certification digests after rebasing over #971 (#…
juaristi22 Sep 23, 2026
b6ac020
Address Vahid's second pass on #954: Northern Ireland's concession ag…
juaristi22 Sep 23, 2026
e3efb1d
Receipts Part K: spine-t4 calibration and the stretch anatomy after t…
juaristi22 Sep 23, 2026
b4f8f79
Rebase onto main 43ca60f6 over #979: fixture and coverage regenerated…
juaristi22 Sep 23, 2026
75a1a0f
Changelog: the NTS tab pins are real and the fixture has 32 stages (V…
juaristi22 Sep 23, 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/927-round3-carry-overs.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The items Vahid's third pass on PR #927 left open are closed (microcosm#930 C0). The lcfs stage notes and their packaged mirror no longer say the FY2024-25 Ofgem pricing sets the energy columns' level (the NEED 2024 shape at the DESNZ level and the QEP average prices paid do). The `price_domestic_energy` schema branch now requires the connection keys whenever `gas_connected` is `published_meter_share` (the first `if`/`then` in `sources.schema.json`), and the regions the crosswalk maps to no subnational area are declared on the stage as `connection_fallback_regions` (Northern Ireland) and refused at runtime if they differ from the crosswalk, so the fallback is no longer inferred from a `None`. `iterative_proportional_fit` records the cross-margin residual after every sweep in `raking_sweep_residuals`, the energy rake receipt carries it per fuel as `sweep_residuals`, and the `uk_stage_lcfs_consumption_energy_rake` note states the tolerance governance (a rule above the observed maxima; a converged residual above it is a new ruling) and the connection-cap rule (declared, waived only for a receipted shortfall). The gas-connection walk is documented as the greedy weight-fitting walk it is, with a test on unequal weights that exercises the skip and nearest-skipped branches and `rows_skipped_for_weight`; the `evidence_absent_blocks` plus `synthetic_smoke` seam has a test (an absent receipt blocks the smoke, a failed population fact check does not). Receipts Parts R and S credit the UK spec-digest move to the rebased `713b5064`, Part T records that ONS 04.5.3 and 04.5.4 (about GBP 1.57bn) are vendored and unbound and that María confirmed the 04.5 sign-out, and the merged PR #927 body carries the rebased hashes. The gate-battery and certification-part digests are re-pinned.
1 change: 1 addition & 0 deletions changelog.d/930-bus-fares-priced-per-boarding.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`bus_fare_spending` is no longer level-set by the lcfs stage. The #890 take-up incidence draw (`assign_bus_use_incidence`) and the fare rake to the DfT, Scottish and Translink receipts (`rake_to_vendored_facts` on `bus_fare_spending`) leave the lcfs declaration; a declared `price_bus_journeys` step (`uk_runtime/bus_fare_pricing.py`, microcosm#930) sets the column as the sum over the household's non-eligible persons of the `nts_bus_travel` stage's journeys times boardings per resident trip (the vendored BUS01 journeys over the vendored NTS0705a trips per resident times the ONS population) times the yield per fare-paying boarding (BUS05ai receipts over journeys less concessionary journeys), per area: bus-in-London trips take the London area's price for every resident, other-local-bus trips the price of the residence area (England outside London; Scotland and Northern Ireland from their own receipts and journeys with England's trip rate as the declared proxy). Wales is unpriced and keeps the chain's raw draw clipped to donor support (María's ruling, 2026-09-17). The chain still draws `bus_fare_spending` so later targets condition on the same raw draw; the emitted column is the priced value. The receipt carries every published input with its source records, the derived factors, the frame-implied boardings beside the published ones and the frame's eligible trip share beside the publisher's concessionary boarding share, with the algebra stated: the design-weight fit of the bound receipts targets is a survey-versus-survey composition check times a survey-versus-admin concession check, never a level the stage set. A stage-time `bus_pricing` gate recomputes every factor from the vendored rows (`uk_stage_lcfs_consumption_bus_pricing`, a population fact check); `dft_bus_journeys.json` gains its consumers and `nts_bus_use_frequency.json` loses the lcfs stage.
1 change: 1 addition & 0 deletions changelog.d/930-bus-support-rake-retired.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The ETB `bus_subsidy_spending` rake to the published net support is retired (microcosm#930; María's ruling of 2026-09-23 that raking retires with the imputation). A declared `price_bus_support` step (`uk_runtime/bus_support_pricing.py`) sets each household's bus support from the frame's journeys the way fares now are: the published concessionary travel reimbursement per concessionary boarding times its eligible persons' boardings plus the rest of the published net support per boarding times every boarding, for London and England outside London (DfT BUS05bi and BUS01) and Scotland (Scottish Transport Statistics components and journeys); Wales (no published boardings) and Northern Ireland (the NITHC accounts carry bus and rail jointly) keep the chain's raw draw, clipped to donor support, as Wales fares do. The support clip no longer exempts the column; the published totals stay bound as calibration targets and now measure the priced quantity. The `rake_to_vendored_facts` operation kind, `uk_runtime/fact_raking.py` and the `fact_rake` stage-health check leave with their last consumer; `uk_stage_etb_services_support_pricing` (`bus_support_pricing`, a population fact check) recomputes every area's components and per-boarding rates from the vendored rows. `dft_bus_journeys.json` and `devolved_bus_finance.json` name the new consumer.
1 change: 1 addition & 0 deletions changelog.d/930-chronicle-repin-7846605.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The UK Chronicle consumer feed is re-pinned to `PolicyEngine/chronicle` `78466057` (chronicle #274 via PR #275, the microcosm#930 landing: 277,183 rows, `chronicle.consumer_fact.v3`), which adds the DfT BUS01 local bus passenger journeys by area with the BUS01c concessionary split, the BUS05i operating-revenue and support components beyond fare receipts and net support, the NTS0303/NTS0601 trip rates by main mode and age band, and the DfI Northern Ireland full-fare concession journeys. No existing national or local reference moves by value or period: the membership, census and validation-level surfaces move by their feed label only (631 active / 7 deferred / 8 signed out national; 20,885 active local). Every vendored fact resource is regenerated with the new feed identity, and three are new: `dft_bus_journeys.json` (BUS01 journeys and concessionary journeys for England, London, England outside London, the metropolitan split and the nine English regions, years ending March 2023 to 2025; the seven BUS05i components; the ONS mid-year population of the four UK countries and the nine English regions, England being the regions' sum), `nts_trip_rates.json` (NTS0303 and NTS0601, 2023 to 2025) and `nts_car_availability.json` (NTS0205 England 2023 and 2024); `devolved_bus_finance.json` gains the DfI concession journeys. The NTS0705a selection in `dft_bus_value_anchors.json` is pinned to its household-income-quintile groupby because the new NTS packages reuse the two trip-rate concepts.
1 change: 1 addition & 0 deletions changelog.d/930-nts-bus-travel-stage.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A person-grain `nts_bus_travel` stage joins the UK spine between `was_wealth` and `lcfs_consumption` (microcosm#930, the structural fix María ruled on 2026-09-15 for microcosm#890's rake-then-bind bus fares). It reads the National Travel Survey microdata (UKDS SN 5340, End User Licence; Household, Individual, Trip, Stage and Ticket tables pinned like the other licensed donors; England residents only since 2013) through a declared codebook (`clean_nts_travel_tables`: column names, region, income-band, sex, main-mode and frequency codes, survey years, banded ages), fits one regime-gated QRF on the interview frequency-of-use band (the variable behind NTS0313; 0 is the non-user band) conditioned on age band, sex, cars, household size, the three-band gross household income and region (`impute_bus_use_band`, identity-keyed uniforms, rounded to the nearest band, devolved recipients on a declared proxy region), assigns each person the diary's weighted mean annual local-bus trips for their band and residence group split into the bus-in-London and other-local-bus series (`assign_trips_from_band_means`, W5 x JJXSC over W2 persons annualised by 52.14 weeks; a household sum `household_local_bus_trips`), and emits the statutory concessionary eligibility of the person's area (`assign_bus_pass_eligibility`: England outside London at 66, London under 18 or 60+, Scotland under 22 or 60+, Wales 60+, Northern Ireland 60+, and under-5s free everywhere). If the extract carries no frequency column the band is drawn from the vendored NTS0313/NTS0621 shares and declared band midpoints are scaled to the vendored NTS0303 rate, receipted as such. Stage-time gates: a support clip on the band and trips, and `bus_travel_facts`, a population fact check that recomputes the NTS0313 user share and the NTS0303 trips per person from the vendored rows; the frame's car availability against NTS0205 is a receipt line. The five tab artifacts are pinned by size and sha256 (a zero placeholder pin is refused at runtime); the H2 fixture drives the stage with synthetic tabs (32 stages), and the graph, kernel registry, spine tool (`--nts-household-tab`, `--nts-individual-tab`, `--nts-trip-tab`, `--nts-stage-tab`, `--nts-ticket-tab`), coverage manifest, export surface and gate digests carry the stage.
1 change: 1 addition & 0 deletions changelog.d/930-nts-single-fare-share.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The `nts_bus_travel` stage reads the National Travel Survey stage and ticket tables (two more pinned SN 5340 artifacts) and gives every person `local_bus_single_fare_share`, the share of their fare-paying local-bus boardings paid at the point of use rather than covered by a season ticket or non-concessionary pass: the boardings a per-journey fare cap binds on (microcosm#930, María's ask of 2026-09-23; the parameter side is policyengine-uk#1871). A diary bus stage is a boarding (`NumBoardings` counts the vehicles) classed by how it was paid for: no ticket record and a positive boarding cost is a fare paid at the point of use, a ticket record with a concessionary code (`SpecialTicket_B01ID` 7 to 11) a concessionary pass, any other ticket record a season ticket or pass, no record and zero cost free travel. Per band and residence group the share is the boarding-weighted ratio of point-of-use to all fare-paying boardings, assigned per person as the trips-weighted combination of the two series' cell shares; the fare paid per boarding by residence group and survey year, the boarding-class shares and the NTS boardings per bus trip are receipted beside it, nothing derived from the licensed rows committed. The column joins the export surface and the stage's E6 support bounds (0 to 1); the spine tool takes `--nts-stage-tab` and `--nts-ticket-tab`, and the H2 fixture's synthetic tabs gain stages and tickets.
1 change: 1 addition & 0 deletions changelog.d/930-nts-tabs-pinned.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The `nts_bus_travel` stage now reads the licensed National Travel Survey extract (UKDS SN 5340, 19th edition, November 2025): the Household, Individual and Trip tabs are pinned by size and digest and verified at runtime, and the declared codebook is verified against the deposited lookup tables and the data extract user guide (microcosm#930). Three corrections from that verification: the frequency-of-use question is `OrdBus2Freq_B01ID` (ten codes since 2019, folded onto the seven NTS0313 bands; code -9, not applicable, is a declared non-user because the published shares reproduce only with those persons in the base, and -8 is dropped and receipted); `Age_B01ID` carries 21 bands, so the codebook maps each code to its lower age before the declared edges band donor and recipient alike (the earlier one-to-one assumption would have misaligned the two); and the trip weight is `W5`, which already carries the diary household weight, so a person's counted trips are divided by W2 before the W2-weighted mean, exactly the user guide's 52.14 × Σ(JJXSC × W5) / Σ W2 (`trip_weight_basis: household_and_trip`, a declared and receipted basis). Interview-only households (W2 of zero) leave the donor and are receipted. The disclosure-safe E6 support bounds for the stage's band and trip columns (`uk/nts_bus_travel_support_bounds.json`, outward-rounded) join the terminal `uk_support` gate, and the H2 fixture's synthetic tabs follow the verified codebook.
1 change: 1 addition & 0 deletions changelog.d/930-target-support-anatomy.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A UK national calibration attempt now writes its compiled constraint system and both household weight vectors beside the diagnostics before the terminal battery runs (`target_support_matrix.npz`, `target_support_vectors.npz`, `target_support_manifest.json`; `uk_runtime/target_support.py`), so an attempt the battery blocks keeps its per-target weight-stretch anatomy readable; the staging H5 posture is unchanged and the sidecars are non-release evidence. `tools/diagnose_uk_target_support.py` decomposes any compiled target from them: target, design and final aggregates, carrier count, top-carrier concentration, the carrier weight-ratio distribution, the share of the target's final mass on households stretched beyond declared multiples of their design weight (3x and 5x by default, each beside the frame-wide share above the same multiple) and the near-cap fraction, with the recomputed final estimates verified against the attempt's diagnostics. This is the instrument behind microcosm#890's acceptance line (the share of England bus-fare mass on households stretched more than 3x) and microcosm#930's measurement.
1 change: 1 addition & 0 deletions docs/uk-chronicle-feed-repin.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ for England, Wales and Scotland (266,390 rows); the `ec20085` re-pin (#890 PR-S,
The `c5e5bf8` re-pin (microcosm#725, chronicle #273, on top of `ec20085`) then brought the HMRC CGT
Tables 7, 8 and 9 (asset type, residential property, carried interest), 276,205 rows, with no
compiled value moving on either surface.
The `7846605` re-pin (microcosm#930, chronicle #274 via PR #275, on top of `c5e5bf8`) brought the DfT BUS01 passenger and concessionary journeys by area, the BUS05i operating-revenue and support components, the NTS0303/NTS0601 trip rates by mode and age and the DfI full-fare concession journeys (277,183 rows), with the NTS0705a selection pinned to its quintile groupby because the new packages reuse the trip-rate concepts.
6 changes: 3 additions & 3 deletions experiments/890-fuel-bus-energy-receipts.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ checks the column again with a zero clipped-row allowance. spine-s4
`b899f40a…`): the clip receipt shows 0 rows clipped low and 0 high over 16,288 households
(every draw is a donor value, positive-regime fills included), the payload is identical to
spine-s3, and the three transferred-phase stage gates pass (15 columns checked on the lcfs
support gate). `45aef087` also moved the UK `spec_sha256` (`d2e82feb…` → `08fbe013…`, the declaration
support gate). `713b5064` (pre-rebase `45aef087`) also moved the UK `spec_sha256` (`d2e82feb…` → `08fbe013…`, the declaration
changed) and the gate digests, re-pinned in the same commit but unmentioned in its message; the H2
fixture was regenerated separately at `10d85464`.

Expand Down Expand Up @@ -630,7 +630,7 @@ lockstep claim had gone stale. Fixes:
`applied_to` (schema `required`, runtime refusal, no defaults).
- The crosswalk's `area_definitions_url` is Ofgem's regional cap page (the fourteen regions
with their standing charges and unit rates), with a note on the dominant-area basis.
- Attribution corrections: the UK `spec_sha256` moved at `45aef087` (Part R), the fixture was
- Attribution corrections: the UK `spec_sha256` moved at `713b5064` (pre-rebase `45aef087`; Part R), the fixture was
regenerated at `12628088` and `10d85464`, not `47ea5a03` (PR body).

On the spine-s4 build record the reworked gate passes with 46 cells fact-checked and the
Expand Down Expand Up @@ -679,7 +679,7 @@ the coicop dimension; census central-heating tables (TS046, UV407; not consumed,
counts carry the connection). Vendored: need_energy_facts.json (456 rows, 2023 and 2024),
ons_household_expenditure_facts.json (42), desnz_domestic_energy_facts.json (155: Energy Trends
plus the sixteen region/country subnational areas), qep_energy_prices.json (1,465). National
surface 614 active (613 + 04.5.1 + 04.5.2 − 04.5 signed out `superseded_by_component_targets`),
surface 614 active (613 + 04.5.1 + 04.5.2 − 04.5 signed out `superseded_by_component_targets`; ONS 04.5.3 liquid fuels, GBP 1.20bn in 2024, and 04.5.4 solid fuels, GBP 0.35bn, are vendored in `ons_household_expenditure_facts.json` and unbound because the frame models neither fuel, so the sign-out leaves about GBP 1.57bn of household fuel spend outside the bound rows; the sign-out's `approved_by juaristi22`, 2026-09-16, was confirmed by María on 2026-09-17 at the #930 plan review),
local surface unchanged (20,885), compile-parity receipts rebuilt.

The published facts (FY2024-25 unless stated):
Expand Down
Loading
Loading