Skip to content

Add bus_fare_spending input variable#1780

Merged
vahid-ahmadi merged 3 commits into
mainfrom
add-bus-fare-spending-variable
Jun 17, 2026
Merged

Add bus_fare_spending input variable#1780
vahid-ahmadi merged 3 commits into
mainfrom
add-bus-fare-spending-variable

Conversation

@vahid-ahmadi

Copy link
Copy Markdown
Collaborator

What

Adds a Household input variable bus_fare_spending (COICOP 7.3.2 — bus & coach fares), the companion to the LCFS bus fare imputation in PolicyEngine/policyengine-uk-data#428.

Why

The data PR writes a bus_fare_spending column, but without a registered variable the model silently skips it on load (simulation.py ignores unknown columns). This variable lets the model consume it. bus_fare_spending is the passenger fare households pay, distinct from bus_subsidy_spending (the ETB government-subsidy benefit-in-kind) — the building block for modelling bus fare reforms (£2 cap, free travel for young people), as the bus analogue of the existing rail fare modelling.

Details

  • Mirrors petrol_spending / diesel_spending, which are likewise COICOP sub-components of transport_consumption.
  • CPI-uprated (gov.economic_assumptions.indices.obr.consumer_price_index), matching transport_consumption and the data-side uprating.
  • Not added into the consumption total — transport_consumption already includes bus fares, so adding it would double-count.

Verified: registers in the tax-benefit system and the uprating parameter resolves.

Resolves #1779. Companion to PolicyEngine/policyengine-uk-data#428 (tracked in PolicyEngine/policyengine-uk-data#427).

🤖 Generated with Claude Code

vahid-ahmadi and others added 2 commits June 16, 2026 14:25
Companion to the LCFS bus fare imputation in policyengine-uk-data (#428).
Household-level COICOP 7.3.2 (bus & coach fares), mirroring petrol_spending/
diesel_spending. CPI-uprated; not added into the consumption total, which
already counts bus fares via transport_consumption. Provides the passenger
fare households pay (vs the ETB-based bus_subsidy_spending) for modelling
bus fare reforms.

Resolves #1779.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copy link
Copy Markdown
Collaborator Author

I found one integration issue in the first pass: bus_fare_spending declared CPI uprating on the Variable, but extended datasets use policyengine_uk/data/uprating_indices.yaml for growth-factor uprating, so the new column stayed flat while transport_consumption CPI-uprated.

I pushed a420b3ea to this branch to add bus_fare_spending to the CPI growth-factor map and add a focused regression test. Verified locally:

uv run pytest policyengine_uk/tests/test_road_fuel_volume_uprating.py policyengine_uk/tests/test_no_economic_assumptions.py

Result: 4 passed.

@vahid-ahmadi vahid-ahmadi requested a review from MaxGhenis June 17, 2026 10:13
@vahid-ahmadi vahid-ahmadi self-assigned this Jun 17, 2026
@vahid-ahmadi vahid-ahmadi merged commit cd2cceb into main Jun 17, 2026
9 checks passed
@vahid-ahmadi vahid-ahmadi deleted the add-bus-fare-spending-variable branch June 17, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bus_fare_spending input variable (companion to policyengine-uk-data bus fare imputation)

1 participant