PolicyEngine / openfisca-tools

Python tools for enhancing OpenFisca country packages.
1 stars 1 forks source link

Various fixes #63

Closed nikhilwoodruff closed 2 years ago

nikhilwoodruff commented 2 years ago

Fixes #57

nikhilwoodruff commented 2 years ago

@MaxGhenis switched as discussed to an index_ helper function, how does this look? On the SLSPC issue in openfisca-us, the usage looks like:

...
eligible = person.tax_unit("is_ptc_eligible", period)
per_person_cost = index_(
    parameter=slspc,
    indices=[state, area, age_code],
    where=eligible,
)
return tax_unit.sum(per_person_cost)