Skip to content

LCFS consumption with NEED raking, ETB VAT, and ETB services/NHS stages #682

Description

@juaristi22

Workstream E6 of the UK-migration master epic #665; child of #145. May split into consumption / VAT+services children at review time (they share only the ETB artifact pins).

Scope

  • LCFS consumption QRF (18 outputs: 12 COICOP divisions, petrol/diesel, bus fares, domestic/electricity/gas energy); the has_fuel seeded flag plus the WAS-bridge QRF; petrol/diesel zeroed for non-ICE households.
  • NEED energy raking: 50-iteration iterative proportional fitting over four margins (gross-income band, tenure, accommodation type, region), run on the training frame and again post-imputation — as a generic iterative_proportional_fit operation. The NEED 2023 kWh tables and Ofgem unit rates become declared anchors with citations (today they are hardcoded literals in the incumbent's consumption.py), each flagged chronicle_candidate where a future fact family could carry them.
  • ETB VAT QRF (full_rate_vat_expenditure_rate; VAT rates read from the parameter tree, not literals).
  • ETB services QRF (education / rail-subsidy / bus-subsidy spending) + NHS person-level allocation from the age-gender table + the rail_usage derivation (subsidy ÷ fare index, so reforms can move the index independently).
  • The incumbent's post-calibration rail/bus/fuel aggregate scalers are explicitly out of scope here — they run after weights exist and are adjudicated on Calibrate the UK national build from Ledger-backed targets #623 (re-express as calibration targets where chronicle families exist, else a D-side post-calibration stage with a mass-change record).

Acceptance

  • Weighted totals per output family within stage tolerance vs the licensed register; deltas published SDC-safely.
  • NEED/Ofgem anchors declared with citations in the manifest; aggregate_admin gate declared for the anchored families.
  • Determinism per the WS-E harness; declaration-lockstep tests.

UK-specificity note (required in the PR)

LCFS/ETB column semantics and the NEED margins are UK; QRF fitting, IPF raking, and support clips should be generic operations. List anything beyond that and why.

Depends on: E5 (num_vehicles predictor).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions