From 014c61ff78a660dcb426d79e35852d02c0652186 Mon Sep 17 00:00:00 2001 From: noman404 Date: Mon, 16 Dec 2024 19:07:38 +0800 Subject: [PATCH 1/4] updated readme, added inputs and outputs --- README.md | 61 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 9077bf9..e8bf1b9 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,13 @@ This project provides an emulator for TAXSIM-35, utilizing PolicyEngine's US fed ```bash pip install -e . --upgrade ``` +## Uninstall + +incase of any unexpected system error happens, you can uninstall the package + + ```bash + pip uninstall policyengine_taxsim + ``` ### From PyPI @@ -75,36 +82,42 @@ The output will be generated as `output.csv` in the same directory. The emulator accepts CSV files with the following variables: -### Demographics - -| Variable | Description | Notes | -|-----------|--------------------------------|---------------------------------------------| -| taxsimid | Unique identifier | | -| year | Tax year | | -| state | State code | | -| mstat | Marital status | Only supports: 1 (single), 2 (joint) | -| page | Primary taxpayer age | | -| sage | Spouse age | | -| depx | Number of dependents | | -| age1 | First dependent's age | | -| age2 | Second dependent's age | | -| ageN | Nth dependent's age | Taxsim only allow upto 8 children dependent | - -### Income +### Supported Inputs + +| Variable | Description | Notes | +|-----------|----------------------------------------------|-----------------------------------------| +| taxsimid | Unique identifier | | +| year | Tax year | | +| state | State code | | +| mstat | Marital status | Only supports: 1 (single), 2 (joint) | +| page | Primary taxpayer age | | +| sage | Spouse age | | +| depx | Number of dependents | | +| age1 | First dependent's age | | +| age2 | Second dependent's age | | +| ageN | Nth dependent's age | Taxsim only allow upto 8 children dependent | +| pwages | Primary taxpayer wages | | +| swages | Spouse wages | | +| psemp | Self-employment income of primary taxpayer | | +| ssemp | Self-employment income of secondary taxpayer | | +| dividends | Dividend Income | | +| intrec | Taxable Interest Received | | +| stcg | Short Term Capital Gains or losses | | +| ltcg | Long Term Capital Gains or losses | | +| gssi | Gross Social Security Benefits | | +| pensions | Taxable Pensions and IRA distributions | | +| rentpaid | Rent Paid | | -| Variable | Description | -|-----------|--------------------------------| -| pwages | Primary taxpayer wages | -| swages | Spouse wages | ### Output Types Depending on the idtl input value it can generate output types as following: -| idtl | Description | -|------|-----------------| -| 0 | Standard output | -| 2 | Full output | +| idtl | Description | +|------|------------------| +| 0 | Standard output | +| 2 | Full output | +| 5 | Full text output | ### Household Types From f9bd73b39eaceefbc285f9a5bce70e23975247e9 Mon Sep 17 00:00:00 2001 From: noman404 Date: Tue, 17 Dec 2024 17:28:03 +0800 Subject: [PATCH 2/4] updated sentence and table alignment in the readme --- README.md | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index e8bf1b9..3ee2d52 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ This project provides an emulator for TAXSIM-35, utilizing PolicyEngine's US fed ``` ## Uninstall -incase of any unexpected system error happens, you can uninstall the package +Incase of any unexpected system error happens, you can uninstall the package and reinstall it again ```bash pip uninstall policyengine_taxsim @@ -76,7 +76,7 @@ Run the simulation by providing your input CSV file: python policyengine_taxsim/cli.py your_input_file.csv ``` -The output will be generated as `output.csv` in the same directory. +The output will be generated as `output.txt` in the same directory. ## Input Variables @@ -84,29 +84,29 @@ The emulator accepts CSV files with the following variables: ### Supported Inputs -| Variable | Description | Notes | -|-----------|----------------------------------------------|-----------------------------------------| -| taxsimid | Unique identifier | | -| year | Tax year | | -| state | State code | | -| mstat | Marital status | Only supports: 1 (single), 2 (joint) | -| page | Primary taxpayer age | | -| sage | Spouse age | | -| depx | Number of dependents | | -| age1 | First dependent's age | | -| age2 | Second dependent's age | | -| ageN | Nth dependent's age | Taxsim only allow upto 8 children dependent | -| pwages | Primary taxpayer wages | | -| swages | Spouse wages | | -| psemp | Self-employment income of primary taxpayer | | -| ssemp | Self-employment income of secondary taxpayer | | -| dividends | Dividend Income | | -| intrec | Taxable Interest Received | | -| stcg | Short Term Capital Gains or losses | | -| ltcg | Long Term Capital Gains or losses | | -| gssi | Gross Social Security Benefits | | -| pensions | Taxable Pensions and IRA distributions | | -| rentpaid | Rent Paid | | +| Variable | Description | Notes | +|-----------|----------------------------------------------|-------------------------------------------| +| taxsimid | Unique identifier | | +| year | Tax year | | +| state | State code | | +| mstat | Marital status | Only supports: 1 (single), 2 (joint) | +| page | Primary taxpayer age | | +| sage | Spouse age | | +| depx | Number of dependents | | +| age1 | First dependent's age | | +| age2 | Second dependent's age | | +| ageN | Nth dependent's age | Taxsim only allow upto 8 child dependents | +| pwages | Primary taxpayer wages | | +| swages | Spouse wages | | +| psemp | Self-employment income of primary taxpayer | | +| ssemp | Self-employment income of secondary taxpayer | | +| dividends | Dividend Income | | +| intrec | Taxable Interest Received | | +| stcg | Short Term Capital Gains or losses | | +| ltcg | Long Term Capital Gains or losses | | +| gssi | Gross Social Security Benefits | | +| pensions | Taxable Pensions and IRA distributions | | +| rentpaid | Rent Paid | | ### Output Types @@ -121,8 +121,8 @@ Depending on the idtl input value it can generate output types as following: ### Household Types -| Supported household types | -|----------------------------------------| +| Supported household types | +|-----------------------------------------| | Single | | Joint | | Household with Dependent | From 22c5174c452167a538074fa26d7e5fd0a4416964 Mon Sep 17 00:00:00 2001 From: noman404 Date: Thu, 19 Dec 2024 21:23:06 +0800 Subject: [PATCH 3/4] updated suggestions, enhanced sentences, updated ToC mappings --- README.md | 67 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 3ee2d52..a80f2fa 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,11 @@ A TAXSIM emulator using the PolicyEngine US federal and state tax calculator. - [Installation](#installation) - [From Source](#from-source) - [From PyPI](#from-pypi) +- [Uninstall](#uninstall) - [Usage](#usage) + - [How to Run](#how-to-run) - [Input Variables](#input-variables) - - [Demographics](#demographics) - - [Income](#income) + - [Supported Inputs](#supported-inputs) - [Output Types](#output-types) - [Household Types](#household-types) - [Contributing](#contributing) @@ -56,7 +57,7 @@ This project provides an emulator for TAXSIM-35, utilizing PolicyEngine's US fed ``` ## Uninstall -Incase of any unexpected system error happens, you can uninstall the package and reinstall it again +If you encounter any unexpected system errors, you can uninstall the package and reinstall it ```bash pip uninstall policyengine_taxsim @@ -70,13 +71,15 @@ pip install git+https://github.com/PolicyEngine/policyengine-taxsim.git ## Usage +### How to Run + Run the simulation by providing your input CSV file: ```bash python policyengine_taxsim/cli.py your_input_file.csv ``` -The output will be generated as `output.txt` in the same directory. +The output will be generated as `output.txt` in the same directory. (Note that the file can be used as CSV when the output type is only `idtl = 0, 2`) ## Input Variables @@ -84,40 +87,40 @@ The emulator accepts CSV files with the following variables: ### Supported Inputs -| Variable | Description | Notes | -|-----------|----------------------------------------------|-------------------------------------------| -| taxsimid | Unique identifier | | -| year | Tax year | | -| state | State code | | -| mstat | Marital status | Only supports: 1 (single), 2 (joint) | -| page | Primary taxpayer age | | -| sage | Spouse age | | -| depx | Number of dependents | | -| age1 | First dependent's age | | -| age2 | Second dependent's age | | -| ageN | Nth dependent's age | Taxsim only allow upto 8 child dependents | -| pwages | Primary taxpayer wages | | -| swages | Spouse wages | | -| psemp | Self-employment income of primary taxpayer | | -| ssemp | Self-employment income of secondary taxpayer | | -| dividends | Dividend Income | | -| intrec | Taxable Interest Received | | -| stcg | Short Term Capital Gains or losses | | -| ltcg | Long Term Capital Gains or losses | | -| gssi | Gross Social Security Benefits | | -| pensions | Taxable Pensions and IRA distributions | | -| rentpaid | Rent Paid | | +| Variable | Description | Notes | +|-----------|------------------------------------------------------------|-----------------------------------------------------------------------------------| +| taxsimid | Unique identifier | | +| year | Tax year | | +| state | [State code (FIPS)](https://taxsim.nber.org/statesoi.html) | Two-digit code, e.g. 44 for Texas (Default is Texas if no state code is provided) | +| mstat | Marital status | Only supports: 1 (single), 2 (joint) | +| page | Primary taxpayer age | | +| sage | Spouse age | | +| depx | Number of dependents | | +| age1 | First dependent's age | | +| age2 | Second dependent's age | | +| ageN | Nth dependent's age | Taxsim only allows upto 8 child dependents | +| pwages | Primary taxpayer wages | | +| swages | Spouse wages | | +| psemp | Self-employment income of primary taxpayer | | +| ssemp | Self-employment income of secondary taxpayer | | +| dividends | Dividend Income | | +| intrec | Taxable Interest Received | | +| stcg | Short Term Capital Gains or losses | | +| ltcg | Long Term Capital Gains or losses | | +| gssi | Gross Social Security Benefits | | +| pensions | Taxable Pensions and IRA distributions | | +| rentpaid | Rent Paid | | ### Output Types Depending on the idtl input value it can generate output types as following: -| idtl | Description | -|------|------------------| -| 0 | Standard output | -| 2 | Full output | -| 5 | Full text output | +| idtl | Description | +|------|------------------------------------------------| +| 0 | Standard output (Outputs 10 result columns) | +| 2 | Full output (Outputs 45 result columns) | +| 5 | Full text output (human-readable explanations) | ### Household Types From b9d28d5a32a0d0e4baf08be95c88a7a3aaf85868 Mon Sep 17 00:00:00 2001 From: noman404 Date: Tue, 31 Dec 2024 01:44:10 +0800 Subject: [PATCH 4/4] readme updated and added mortgage in input list --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a80f2fa..770e5e3 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ The emulator accepts CSV files with the following variables: | gssi | Gross Social Security Benefits | | | pensions | Taxable Pensions and IRA distributions | | | rentpaid | Rent Paid | | +| mortgage | Mortgage Interest | | ### Output Types