PolicyEngine / policyengine-us

The PolicyEngine US Python package contains a rules engine of the US tax-benefit system, and microdata generation for microsimulation analysis.
https://policyengine.org/us
GNU Affero General Public License v3.0
103 stars 176 forks source link

Don't compute variables for years we haven't implemented yet #934

Open MaxGhenis opened 2 years ago

MaxGhenis commented 2 years ago

Currently you can specify years we haven't implemented for many tax and benefit programs. I think the simplest way to avoid this is to replace def formula with def formula_2021 or whatever the first year we have that's vetted. It's also possible to return NaNs.

Thanks @martinholmer for the tip.

nikhilwoodruff commented 2 years ago

Yes, I'd favour setting the default value to np.nan (with a constant named NULL or something), and using dated formulas.