You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Place filtering incorrectly filters at person level instead of household level #224
The _filter_us_simulation_by_place() method in simulation.py filters the dataset at the person level instead of the household level, causing incorrect results in economy comparisons.
Actual Decile 10 average: ~$-15,889 (from app using place filtering)
Budgetary impact matches (~$8.87B), confirming the filtering captures the right population but calculates averages incorrectly
Root Cause
to_input_dataframe() maps all variables to person level (line 1516 in policyengine-core). When you filter this person-level dataframe directly and create a new simulation, household-level variable calculations become incorrect.
Note
The UK country filtering (country/ regions) has the same issue - it also uses map_to="person" and filters at person level.
Activity
anth-volk commentedon Feb 6, 2026
Fixed by #225.