Tax Graph II
Choice of Model
Wheaton provides an overview, analysis, and evaluation of four commonly used different tax models: the Census Bureau CPS Tax Model, the Transfer Income Model (TRIM3), TAXSIM, and the Bakija Model. Here are some brief notes:
Census | TRIM3 | TAXSIM | Bakija | Tax-Calculator | |
Language | SAS | C++ | FORTRAN | SAS | ? |
Organization | Census Bureau | Urban Institute | NBER | Dr. Bakija | Policy Simulation Library |
Covered Years | ? | ? | 1960 - Now | 1913 - Now | ? |
API | ? | ? | https://users.nber.org/~taxsim/taxsim32/low-level-remote.html | ? | ? |
Website Form | ? | ? | Internet TAXSIM | ? | ? |
Python Module | ? | ? | ? | ? | taxcalc 0.7.82 |
Due to the availability of documentation and resources, I'm partial to TAXSIM and Tax-Calculator. I'm (possibly unfairly) suspicious of the Policy Simulation Library as an organization since it appears to consist three people. For this reason, I've chosen to use TAXSIM.
TAXSIM also includes a binary so you can run it locally, but I haven't tried that Installation of Taxsim32.
TAXSIM
TAXSIM provides a HTTP API https://users.nber.org/~taxsim/taxsim32/low-level-remote.html. First you construct a csv
file and then you run
curl -u taxsim:02138 -T data.csv ftp://taxsimftp.nber.org/tmp/userid
curl -u taxsim:02138 ftp://taxsimftp.nber.org/tmp/userid.txm32
As an aside, taxsim
and 02138
are the publicly provided username and password, respectively.
The response to the second request will be a new csv
file with the same number of rows as data.csv
. The documentation for the columns of both csv
files can be found here Internet TAXSIM.
For our purposes, we could arguably care about any of the 26 supported input variables, but really the ones that we care most about are tax year, state, martial status, and the primary taxpayer's wage and salary income.
I modified the Go server responsible for redding.dev
to forward requests to the taxsimftp.nber.org
server. Then this webpage displays the nifty graph above.
For my own future reference, if you have issues doing any of this on Windows, see Common problems ftp in Windows.
TAXSIM Details
todo