Skip to content

Fix ESA calibration target entity mapping#278

Draft
nwoodruff-co wants to merge 1 commit intomainfrom
fix/esa-calibration-entity-mapping
Draft

Fix ESA calibration target entity mapping#278
nwoodruff-co wants to merge 1 commit intomainfrom
fix/esa-calibration-entity-mapping

Conversation

@nwoodruff-co
Copy link
Collaborator

Summary

  • esa_income is a BenUnit-level variable, but compute_esa was passing it to household_from_person(), which expects person-level arrays
  • This caused a size mismatch (61,858 benunit rows vs 115,612 person count), silently skipping the obr/esa calibration target on every build
  • Fix: use household_from_family() for esa_income; esa_contrib is Person-level so remains unchanged

Changes

  • policyengine_uk_data/targets/compute/income.py: household_from_personhousehold_from_family for esa_income

esa_income is a BenUnit variable, so must be aggregated to household
using household_from_family() not household_from_person(). The size
mismatch (benunit count vs person count) caused the obr/esa target to
be skipped during calibration.
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.

1 participant

Comments