Repository navigation
Rerun on policyengine 6.10.2 and certified Microcosm data; fix the intro's fare-reduction figure - #12
vahid-ahmadi wants to merge 2 commits into
Conversation
Make managed_microsimulation on the bundle-certified microcosm_uk_2024_25 build the only simulation path, holding the £3 cap all year because policyengine-uk 2.132.6 current law already applies the £2 cap from 2027. Drop the direct policyengine-uk pin, add uv.lock, record model and data provenance in the results JSON and on the page, regenerate results and update methodology text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The intro said the estimate applies DfT's observed 6.3% all-ticket reduction; the pipeline applies the derived 12.5% (range 10-15%), as the Announcement and Methodology tabs already say. Keep 6.3% as the observed evaluation figure the 12.5% is derived from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@vahid-ahmadi this re-runs the PR on the certified data and checks the fare base against the published receipts. The base is too high, but most of the +22% in "Against official benchmarks" comes from comparing different things. With matching cap rules, the model is 4.2% above the published receipts for the UK without Wales, and 6.8% above for England outside London. Reproduction. On Like-for-like comparisonModel year 2024 under current law applies the FY2024-25 cap schedule (£2 to 31 December 2024, then £3). That is the regime behind the published receipts.
Boardings match BUS01a: 1,844m against 1,851m outside London, and 1,850m against 1,821m on London buses. Subsidy and population also match. So the weights and the journeys are right, and the gap outside London is in the fare-paying share (2 below). Bridge from £4.02bn to £4.89bn
For the policy base outside London (£2,834m against £2,070m, +£764m):
Causes1. The £3-cap counterfactual is priced as no cap (policyengine-uk)
2. Two definitions of concessionary boardings outside London (Microcosm and policyengine-uk)
3. London bus trips in the policy base (this dashboard)
4. The trip floor (Microcosm
|
|
@vahid-ahmadi a follow-up to the comment above. Two of the five causes are already fixed upstream. Both fixes landed after the certified build, and the comment above describes the pinned versions without saying so.
No policyengine release certifies these yet: 6.10.2 still pins policyengine-uk 2.132.6. The same certified data on policyengine-uk 2.152.7, fares of residents of England outside London:
Causes 2 and 3 remain on 2.152.7. Fixing both gives a base of about £2,468m. At 12.5% that is about £309m, and against funding expiry about £462m. This replaces the indicative range in the comment above, which was at 2024-25 fares. Remaining fixes:
All figures are weighted totals at nation or region level. 🤖 Generated with Claude Code |
Summary
Reruns the analysis on the latest
policyenginerelease and its certified Microcosm UK dataset. Draft for review; not for merge until the open items below are settled.Versions
policyengine-ukdirectpolicyengine.pymanaged_microsimulationuv.lock)enhanced_frs_2024_25.h5@32543d45microcosm_uk_2024_25@microcosm-uk-2024-25-national-20261019T083323Z-6cba5d71(sha256810ba980…1ece)Two newer Microcosm UK national builds exist on Hugging Face (
…20261021T195620Z-a858c100,…20261023T075039Z-a133f37a) but are not certified by anypolicyenginerelease, so this PR uses the certified build. The results JSON and the methodology tab now state the policyengine and policyengine-uk versions and the dataset name, revision and SHA-256.What changed in the code
_load_sim()always usespe.uk.managed_microsimulation(); the Enhanced FRS andBUS_FARE_CAP_POPULACEpaths are removed. The token falls back to a saved Hugging Face login.gov.dft.bus.fares.cap), andperson_bus_fare_spendingprices imputed journeys (trips × boardings × DfT yield per boarding, single tickets at the cap in force). Running the pipeline unchanged would apply 12.5% to a base that already reflects the £2 cap. The simulation therefore holds the cap at £3 over the model's 2027 cap year (which runs to 5 April 2028). The model's representative uncapped single fare is £2.748, so a £3 cap does not bind and this base equals uncapped fares.sources.pydescriptions and the README now describe journey pricing rather than LCFS imputation calibrated to DfT, and label the DfT totals as benchmarks rather than calibration targets.Old vs new
Fare reduction cost by income quintile (£m): Q1 84→96, Q2 82→71, Q3 61→65, Q4 35→65, Q5 11→57.
By region (£m): North West 41→64, South East 63→64, West Midlands 31→59, Yorkshire 42→45, South West 25→36, East Midlands 25→30, East of England 19→30, North East 27→26.
By family type (£m): couple with children 54→123, single 109→110, couple no children 105→64, lone parent 5→57.
By age: 65+ share of baseline fares 20.6%→1.1%; 0–15 share 6.1%→12.3%.
Why the figures moved
Open items for review
Checks
pytest: 9 passed (adds a provenance test)ruff check/ruff format --check: cleanbun run build: succeededAlso in this PR: the intro's fare-reduction figure (was #11)
The live page's introduction said the estimate "applies DfT's observed 6.3% all-ticket reduction", while the methodology says "We apply a 12.5% all-ticket reduction (range 10–15%)". The pipeline applies 12.5% (
src/bus_fare_cap/sources.py:45-47, used atpipeline.py:196). The introduction now gives 12.5% and names DfT's 6.3% as the figure it is derived from. This text change moves no numbers and applies to the old and new data alike.Against official benchmarks
Sources:
The previous run sits closer to every benchmark:
gov.dft.bus.uncapped_single_fare).Recommendation: keep this PR in draft and do not publish it before the Budget. The fix belongs upstream: calibrate fare spending to DfT receipts in Microcosm or policyengine-uk, and drop the trip floor. Then rerun.
🤖 Generated with Claude Code