Skip to content

Calculates federal tax liabilities from individual data under a range of policy scenarios

License

Notifications You must be signed in to change notification settings

PSLmodels/Tax-Cruncher

Repository files navigation

PSL cataloged Codecov

Tax-Cruncher

Tax-Cruncher calculates federal tax liabilities from individual data under different policy scenarios.

Tax-Cruncher accepts inputs similar to NBER's TAXSIM Version 27, converts those inputs to a format usable by Tax-Calculator, and uses Tax-Calculator capabilities to analyze the user-provided data under various tax policy proposals.

Tax-Cruncher's web application is hosted on Compute Studio. The code that powers the web application can be found in this repository in the cs-config directory.

How to use Tax-Cruncher

Tax-Cruncher can analyze individual data from one filer or multiple filers.

To analyze individual data from one filer:

  • The easiest way to analyze one tax filer is with the web application hosted on Compute Studio.

To analyze individual data from multiple filers:

For a more complete demo of Tax-Cruncher's multi-filer capabalities, explore this Jupyter Notebook.

  • First, follow these steps to format your data in a csv file. Each row of the file represents one filing unit and each column is an input variable.

  • Second, create a Batch object (the class can be found in taxcrunch/multi_cruncher.py). The Batch class takes one argument -- the file path to your input data.

  • Third, analyze your data. You can analyze your data under current law or under a policy reform using the create_table() method. If you do not pass an argument to the method, Tax-Cruncher will analyze your data under current law. To analyze your data under a policy reform, pass the file path to a JSON reform file, a reform dictionary, or the name of a preset reform from the Tax-Calculator reforms folder to the create_table() method.

# create Batch object
b = Batch('DATA_FILE_PATH')
# liabilities under current law
base_table = b.create_table()
# liabilities under reform 
reform_table = b.create_table(reform_file='REFORM_FILE_PATH')

How to install Tax-Cruncher

Install with conda:

conda install -c pslmodels taxcrunch

Install from source:

git clone https://github.com/PSLmodels/Tax-Cruncher
cd Tax-Cruncher
conda env create
conda activate taxcrunch-env
pip install -e .

How to cite Tax-Cruncher

Please cite the source of your analysis as "Tax-Cruncher release #.#.#, author's calculations." If you would like to link to Tax-Cruncher, please use https://github.com/PSLmodels/Tax-Cruncher.