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 175 forks source link

create tax form taxonomy #1051

Open fedderw opened 2 years ago

fedderw commented 2 years ago

Working through the web of references from the state to the IRS & cross-checking openfisca-us and taxcalc variables is super time-consuming, I've come up with an informal system based on lines in the tax form, which I think should be the primary unit to organizing those reference. Would make it possible to generate graphs like the below.

image

My personal taxonomy is something like state: md form: 502 line: 27 md502_27

fedderw commented 2 years ago

tax-onomy

fedderw commented 2 years ago

I have a skeleton for this already but I'll post a yaml structure later

fedderw commented 2 years ago

related to #1013 also. Here is an example of the taxonomy + tax_calc input variables. These are the old line numbers from pre-TCJA

e09900:
    desc: Penalty tax on qualified retirement plans
    datatype: float
    availability: taxdata_puf
    irs_form_location:
      2013-01-01: us1040_line58
      2014-01-01: us1040_line59
      2016-01-01: us1040_line59
e17500:
    desc: "Itemizable medical and dental expenses.  WARNING: this variable is zero below the floor in PUF data. "
    datatype: float
    availability: taxdata_puf, taxdata_cps
    irs_form_location:
      2013-01-01: us1040_schA_line1
      2016-01-01: us1040_schA_line1

Obviously, a little long winded, but should legible,in many different contexts & a valid python variablename.

Other options

US1040L58
US1040_L58
US1040_SCHA_L1
US1040_SCHAL01