policyengine-us icon indicating copy to clipboard operation
policyengine-us copied to clipboard

`sim.calc("household_income_decile", map_to="tax_unit").unique()` returns non-integer values

Open MaxGhenis opened this issue 1 year ago • 0 comments

See this notebook:

from policyengine_us import Microsimulation

sim = Microsimulation()

sim.calc("household_income_decile").unique()

returns ints from 1 to 10 (plus -1 for negative income) as expected, but:

sim.calc("household_income_decile", map_to="tax_unit").unique()

returns non-integer values between 1 and 10.

I would have expected it to just project the household attribute down to the tax unit. Does it instead divide by people and then aggregate to tax units? Should we define it as an enum instead if we want it projected? @nikhilwoodruff

MaxGhenis avatar Mar 29 '24 15:03 MaxGhenis