taxcalc 4.5.0__tar.gz → 4.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. {taxcalc-4.5.0/taxcalc.egg-info → taxcalc-4.6.1}/PKG-INFO +3 -2
  2. {taxcalc-4.5.0 → taxcalc-4.6.1}/conda.recipe/meta.yaml +2 -2
  3. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/about/releases.md +45 -0
  4. taxcalc-4.6.1/docs/guide/cli.md +562 -0
  5. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/input_vars.md +2 -2
  6. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/output_vars.md +3 -3
  7. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/index.md +30 -36
  8. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/usage/starting.md +1 -1
  9. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/usage/tcja_after_2025.md +5 -8
  10. {taxcalc-4.5.0 → taxcalc-4.6.1}/environment.yml +3 -2
  11. {taxcalc-4.5.0 → taxcalc-4.6.1}/extend_tcja.py +1 -1
  12. {taxcalc-4.5.0 → taxcalc-4.6.1}/setup.py +1 -1
  13. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/__init__.py +1 -1
  14. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/calcfunctions.py +2 -6
  15. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/calculator.py +18 -18
  16. taxcalc-4.6.1/taxcalc/cli/tc.py +409 -0
  17. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/data.py +2 -2
  18. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/parameters.py +0 -5
  19. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/policy.py +3 -12
  20. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/policy_current_law.json +7 -3
  21. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ext.json +5 -2
  22. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/taxcalcio.py +350 -325
  23. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_4package.py +1 -0
  24. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_calculator.py +3 -3
  25. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_reforms.py +8 -8
  26. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_taxcalcio.py +78 -120
  27. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/utils.py +4 -10
  28. {taxcalc-4.5.0 → taxcalc-4.6.1/taxcalc.egg-info}/PKG-INFO +3 -2
  29. taxcalc-4.5.0/docs/guide/cli.md +0 -641
  30. taxcalc-4.5.0/taxcalc/cli/tc.py +0 -276
  31. {taxcalc-4.5.0 → taxcalc-4.6.1}/.coveragerc +0 -0
  32. {taxcalc-4.5.0 → taxcalc-4.6.1}/.github/FUNDING.yml +0 -0
  33. {taxcalc-4.5.0 → taxcalc-4.6.1}/.github/workflows/build_and_test.yml +0 -0
  34. {taxcalc-4.5.0 → taxcalc-4.6.1}/.github/workflows/check_jupyterbook.yml +0 -0
  35. {taxcalc-4.5.0 → taxcalc-4.6.1}/.github/workflows/deploy_jupyterbook.yml +0 -0
  36. {taxcalc-4.5.0 → taxcalc-4.6.1}/.github/workflows/deploy_parameters_docs.yml +0 -0
  37. {taxcalc-4.5.0 → taxcalc-4.6.1}/.gitignore +0 -0
  38. {taxcalc-4.5.0 → taxcalc-4.6.1}/LICENSE +0 -0
  39. {taxcalc-4.5.0 → taxcalc-4.6.1}/MANIFEST.in +0 -0
  40. {taxcalc-4.5.0 → taxcalc-4.6.1}/Makefile +0 -0
  41. {taxcalc-4.5.0 → taxcalc-4.6.1}/PSL_catalog.json +0 -0
  42. {taxcalc-4.5.0 → taxcalc-4.6.1}/README.md +0 -0
  43. {taxcalc-4.5.0 → taxcalc-4.6.1}/codecov.yml +0 -0
  44. {taxcalc-4.5.0 → taxcalc-4.6.1}/conda.recipe/bld.bat +0 -0
  45. {taxcalc-4.5.0 → taxcalc-4.6.1}/conda.recipe/build.sh +0 -0
  46. {taxcalc-4.5.0 → taxcalc-4.6.1}/csv_show.sh +0 -0
  47. {taxcalc-4.5.0 → taxcalc-4.6.1}/csv_vars.sh +0 -0
  48. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/PSL.svg +0 -0
  49. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/_config.yml +0 -0
  50. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/_static/atr.png +0 -0
  51. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/_static/mtr.png +0 -0
  52. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/_static/pch.png +0 -0
  53. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/_toc.yml +0 -0
  54. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/about/LICENSE.md +0 -0
  55. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/about/history.md +0 -0
  56. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/about/roadmap.md +0 -0
  57. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/calcfunctions.rst +0 -0
  58. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/calculator.rst +0 -0
  59. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/consumption.rst +0 -0
  60. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/data.rst +0 -0
  61. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/decorators.rst +0 -0
  62. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/growdiff.rst +0 -0
  63. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/growfactors.rst +0 -0
  64. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/parameters.rst +0 -0
  65. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/policy.rst +0 -0
  66. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/public_api.rst +0 -0
  67. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/records.rst +0 -0
  68. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/taxcalcio.rst +0 -0
  69. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/utils.rst +0 -0
  70. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/api/utilsprvt.rst +0 -0
  71. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/contributing/RELEASING.md +0 -0
  72. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/contributing/contributor_guide.md +0 -0
  73. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/contributing/param_naming.md +0 -0
  74. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/contributing/pr_workflow.md +0 -0
  75. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/contributing/testing.md +0 -0
  76. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/README.md +0 -0
  77. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/assumption_params.md +0 -0
  78. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/index.md +0 -0
  79. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/make/make_io_vars.py +0 -0
  80. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/make/make_params.py +0 -0
  81. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/make/make_uguide.py +0 -0
  82. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/policy_params.md +0 -0
  83. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/python_interface.md +0 -0
  84. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/templates/assumption_params_template.md +0 -0
  85. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/templates/input_vars_template.md +0 -0
  86. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/templates/output_vars_template.md +0 -0
  87. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/guide/templates/policy_params_template.md +0 -0
  88. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/README.md +0 -0
  89. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/_static/reformA.json +0 -0
  90. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/_static/reformB.json +0 -0
  91. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/_static/reformC.json +0 -0
  92. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/convert_all.sh +0 -0
  93. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/index.md +0 -0
  94. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/md_src/recipe00.md +0 -0
  95. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/md_src/recipe01.md +0 -0
  96. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/md_src/recipe02.md +0 -0
  97. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/md_src/recipe03.md +0 -0
  98. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/md_src/recipe04.md +0 -0
  99. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/md_src/recipe04_pandas.md +0 -0
  100. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/md_src/recipe05.md +0 -0
  101. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/md_src/recipe06.md +0 -0
  102. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/recipe00.ipynb +0 -0
  103. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/recipe01.ipynb +0 -0
  104. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/recipe02.ipynb +0 -0
  105. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/recipe03.ipynb +0 -0
  106. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/recipe04.ipynb +0 -0
  107. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/recipe04_pandas.ipynb +0 -0
  108. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/recipe05.ipynb +0 -0
  109. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/recipes/recipe06.ipynb +0 -0
  110. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/usage/data.md +0 -0
  111. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/usage/overview.md +0 -0
  112. {taxcalc-4.5.0 → taxcalc-4.6.1}/docs/use_cases.md +0 -0
  113. {taxcalc-4.5.0 → taxcalc-4.6.1}/gitpr +0 -0
  114. {taxcalc-4.5.0 → taxcalc-4.6.1}/gitpr.bat +0 -0
  115. {taxcalc-4.5.0 → taxcalc-4.6.1}/gitsync +0 -0
  116. {taxcalc-4.5.0 → taxcalc-4.6.1}/gitsync.bat +0 -0
  117. {taxcalc-4.5.0 → taxcalc-4.6.1}/ppp.py +0 -0
  118. {taxcalc-4.5.0 → taxcalc-4.6.1}/pyproject.toml +0 -0
  119. {taxcalc-4.5.0 → taxcalc-4.6.1}/pytest.ini +0 -0
  120. {taxcalc-4.5.0 → taxcalc-4.6.1}/setup.cfg +0 -0
  121. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/assumptions/ASSUMPTIONS.md +0 -0
  122. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/assumptions/README.md +0 -0
  123. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/assumptions/economic_assumptions_template.json +0 -0
  124. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/cli/__init__.py +0 -0
  125. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/conftest.py +0 -0
  126. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/consumption.json +0 -0
  127. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/consumption.py +0 -0
  128. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/cps.csv.gz +0 -0
  129. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/cps_weights.csv.gz +0 -0
  130. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/decorators.py +0 -0
  131. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/growdiff.json +0 -0
  132. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/growdiff.py +0 -0
  133. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/growfactors.csv +0 -0
  134. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/growfactors.py +0 -0
  135. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/puf_ratios.csv +0 -0
  136. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/puf_weights.csv.gz +0 -0
  137. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/records.py +0 -0
  138. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/records_variables.json +0 -0
  139. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/2017_law.json +0 -0
  140. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/2017_law.out.csv +0 -0
  141. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ARPA.json +0 -0
  142. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ARPA.out.csv +0 -0
  143. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/BrownKhanna.json +0 -0
  144. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/BrownKhanna.out.csv +0 -0
  145. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/CARES.json +0 -0
  146. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/CARES.out.csv +0 -0
  147. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ConsolidatedAppropriationsAct2021.json +0 -0
  148. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ConsolidatedAppropriationsAct2021.out.csv +0 -0
  149. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/Larson2019.json +0 -0
  150. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/Larson2019.out.csv +0 -0
  151. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/README.md +0 -0
  152. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/REFORMS.md +0 -0
  153. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/Renacci.json +0 -0
  154. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/Renacci.out.csv +0 -0
  155. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/SandersDeFazio.json +0 -0
  156. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/SandersDeFazio.out.csv +0 -0
  157. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/TCJA.json +0 -0
  158. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/TCJA.md +0 -0
  159. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/TCJA.out.csv +0 -0
  160. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/Trump2016.json +0 -0
  161. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/Trump2016.out.csv +0 -0
  162. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/Trump2017.json +0 -0
  163. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/Trump2017.out.csv +0 -0
  164. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/archive/Clinton2016.json +0 -0
  165. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/archive/RyanBrady.json +0 -0
  166. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/archive/TCJA_House.json +0 -0
  167. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/archive/TCJA_House_Amended.json +0 -0
  168. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/archive/TCJA_Reconciliation.json +0 -0
  169. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/archive/TCJA_Senate.json +0 -0
  170. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/archive/TCJA_Senate_111417.json +0 -0
  171. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/archive/TCJA_Senate_120117.json +0 -0
  172. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/cases.csv +0 -0
  173. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/clp.out.csv +0 -0
  174. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/growfactors_ext.csv +0 -0
  175. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ptaxes0.json +0 -0
  176. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ptaxes0.out.csv +0 -0
  177. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ptaxes1.json +0 -0
  178. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ptaxes1.out.csv +0 -0
  179. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ptaxes2.json +0 -0
  180. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ptaxes2.out.csv +0 -0
  181. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ptaxes3.json +0 -0
  182. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/reforms/ptaxes3.out.csv +0 -0
  183. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/benefits_expect.csv +0 -0
  184. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/cmpi_cps_expect.txt +0 -0
  185. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/cmpi_puf_expect.txt +0 -0
  186. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/conftest.py +0 -0
  187. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/cpscsv_agg_expect.csv +0 -0
  188. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/puf_var_correl_coeffs_2016.csv +0 -0
  189. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/puf_var_wght_means_by_year.csv +0 -0
  190. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/pufcsv_agg_expect.csv +0 -0
  191. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/pufcsv_mtr_expect.txt +0 -0
  192. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/reforms.json +0 -0
  193. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/reforms_expect.csv +0 -0
  194. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_benefits.py +0 -0
  195. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_calcfunctions.py +0 -0
  196. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_compare.py +0 -0
  197. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_compatible_data.py +0 -0
  198. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_consumption.py +0 -0
  199. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_cpscsv.py +0 -0
  200. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_data.py +0 -0
  201. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_decorators.py +0 -0
  202. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_growdiff.py +0 -0
  203. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_growfactors.py +0 -0
  204. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_parameters.py +0 -0
  205. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_policy.py +0 -0
  206. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_puf_var_stats.py +0 -0
  207. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_pufcsv.py +0 -0
  208. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_records.py +0 -0
  209. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_responses.py +0 -0
  210. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/tests/test_utils.py +0 -0
  211. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/utilsprvt.py +0 -0
  212. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/CSV_INPUT_VARS.md +0 -0
  213. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/CSV_OUTPUT_VARS.md +0 -0
  214. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/README.md +0 -0
  215. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/Differences_Explained.md +0 -0
  216. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/README.md +0 -0
  217. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/a17-taxdiffs-expect.csv +0 -0
  218. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/a18-taxdiffs-expect.csv +0 -0
  219. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/a19-taxdiffs-expect.csv +0 -0
  220. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/a20-taxdiffs-expect.csv +0 -0
  221. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/a21-taxdiffs-expect.csv +0 -0
  222. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/b17-taxdiffs-expect.csv +0 -0
  223. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/b18-taxdiffs-expect.csv +0 -0
  224. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/b19-taxdiffs-expect.csv +0 -0
  225. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/b20-taxdiffs-expect.csv +0 -0
  226. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/b21-taxdiffs-expect.csv +0 -0
  227. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/c17-taxdiffs-expect.csv +0 -0
  228. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/c18-taxdiffs-expect.csv +0 -0
  229. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/expected_differences/c19-taxdiffs-expect.csv +0 -0
  230. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/input_setup.py +0 -0
  231. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/main_comparison.py +0 -0
  232. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/prepare_taxcalc_input.py +0 -0
  233. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/process_taxcalc_output.py +0 -0
  234. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/taxsim_emulation.json +0 -0
  235. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/taxsim_input.py +0 -0
  236. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/tc_sims.py +0 -0
  237. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/taxsim35/tests_35.py +0 -0
  238. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc/validation/tests_35.sh +0 -0
  239. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc.egg-info/SOURCES.txt +0 -0
  240. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc.egg-info/dependency_links.txt +0 -0
  241. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc.egg-info/entry_points.txt +0 -0
  242. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc.egg-info/requires.txt +0 -0
  243. {taxcalc-4.5.0 → taxcalc-4.6.1}/taxcalc.egg-info/top_level.txt +0 -0
  244. {taxcalc-4.5.0 → taxcalc-4.6.1}/tctest-nojit.sh +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: taxcalc
3
- Version: 4.5.0
3
+ Version: 4.6.1
4
4
  Summary: Tax-Calculator
5
5
  Home-page: https://github.com/PSLmodels/Tax-Calculator
6
6
  Download-URL: https://github.com/PSLmodels/Tax-Calculator
@@ -29,6 +29,7 @@ Dynamic: description-content-type
29
29
  Dynamic: download-url
30
30
  Dynamic: home-page
31
31
  Dynamic: license
32
+ Dynamic: license-file
32
33
  Dynamic: requires-dist
33
34
  Dynamic: summary
34
35
 
@@ -11,7 +11,7 @@ requirements:
11
11
  - "python>=3.10, <3.13"
12
12
  - "numpy>=1.26"
13
13
  - "pandas>=2.2"
14
- - "bokeh>=2.4"
14
+ - "bokeh>=3.7"
15
15
  - "paramtools>=0.19.0"
16
16
  - numba
17
17
  - curl
@@ -22,7 +22,7 @@ requirements:
22
22
  - "python>=3.10, <3.13"
23
23
  - "numpy>=1.26"
24
24
  - "pandas>=2.2"
25
- - "bokeh>=2.4"
25
+ - "bokeh>=3.7"
26
26
  - "paramtools>=0.19.0"
27
27
  - numba
28
28
  - curl
@@ -4,6 +4,51 @@ Go [here](https://github.com/PSLmodels/Tax-Calculator/pulls?q=is%3Apr+is%3Aclose
4
4
  for a complete commit history.
5
5
 
6
6
 
7
+ 2025-05-09 Release 4.6.1
8
+ ------------------------
9
+ (last merged pull request is
10
+ [#2900](https://github.com/PSLmodels/Tax-Calculator/pull/2900))
11
+
12
+ **This is a minor enhancement and bug-fix release.**
13
+
14
+ **API Changes**
15
+
16
+ **New Features**
17
+ - Add ability to specify compound reforms when using the CLI tool's
18
+ `--baseline` option
19
+ [[#2896](https://github.com/PSLmodels/Tax-Calculator/pull/2896) by Martin Holmer]
20
+ - Improve documentation of the `parameter_indexing_CPI_offset` policy parameter
21
+ [[#2897](https://github.com/PSLmodels/Tax-Calculator/pull/2897) by Martin Holmer]
22
+ - Add CLI `--numyears N` option that allows faster multiple-year runs with `tc`
23
+ [[#2900](https://github.com/PSLmodels/Tax-Calculator/pull/2900) by Martin Holmer]
24
+
25
+ **Bug Fixes**
26
+ - Remove redundant Parameters class property
27
+ [[#2898](https://github.com/PSLmodels/Tax-Calculator/pull/2898) by Martin Holmer]
28
+
29
+
30
+ 2025-04-30 Release 4.6.0
31
+ ------------------------
32
+ (last merged pull request is
33
+ [#2893](https://github.com/PSLmodels/Tax-Calculator/pull/2893))
34
+
35
+ **This is an enhancement and bug-fix release.**
36
+
37
+ **API Changes**
38
+
39
+ **New Features**
40
+ - Several enhancements to Tax-Calculator CLI program, `tc`
41
+ [PRs [#2886](https://github.com/PSLmodels/Tax-Calculator/pull/2886), [#2888](https://github.com/PSLmodels/Tax-Calculator/pull/2888), [#2889](https://github.com/PSLmodels/Tax-Calculator/pull/2889), [#2890](https://github.com/PSLmodels/Tax-Calculator/pull/2890), [#2891](https://github.com/PSLmodels/Tax-Calculator/pull/2891), and [#2893](https://github.com/PSLmodels/Tax-Calculator/pull/2893) by Martin Holmer]
42
+
43
+ **Bug Fixes**
44
+ - Update required `bokeh` version
45
+ [[#2882](https://github.com/PSLmodels/Tax-Calculator/pull/2882) by Bodi Yang]
46
+ - Make ACTC_c parameter be inflation indexed in the TCJA-extension reform
47
+ [[#2883](https://github.com/PSLmodels/Tax-Calculator/pull/2883) by Martin Holmer]
48
+ - Avoid `marshmallow` version 4.0.0 until `paramtools` is fixed
49
+ [[#2885](https://github.com/PSLmodels/Tax-Calculator/pull/2885) by Martin Holmer]
50
+
51
+
7
52
  2025-03-11 Release 4.5.0
8
53
  ------------------------
9
54
  (last merged pull request is
@@ -0,0 +1,562 @@
1
+ Command-line interface
2
+ ======================
3
+
4
+ You can use Tax-Calculator on your own computer via a command-line
5
+ interface (CLI) called `tc`. This approach requires the use of a text
6
+ editor to prepare simple files that are read by `tc`. Computer
7
+ programming knowledge is not required, but this approach to using
8
+ Tax-Calculator assumes you are willing to work at the command line
9
+ (Terminal on Mac or Anaconda Prompt on Windows) and to use a text
10
+ editor (for example, TextEdit on Mac or Notepad on Windows).
11
+
12
+ ## Test `tc` CLI
13
+
14
+ The `tc` CLI is part of the Tax-Calculator `taxcalc` package you
15
+ installed on your computer as part of {doc}`../usage/starting`.
16
+
17
+ To check your installation of `tc`, enter the following command:
18
+
19
+ ```
20
+ % tc --test
21
+ ```
22
+
23
+ Expected output (after several seconds) is `PASSED TEST`. If you get
24
+ `FAILED TEST`, something went wrong in the installation process. If
25
+ the installation test fails, please report your experience by
26
+ [creating a new
27
+ issue](https://github.com/PSLmodels/Tax-Calculator/issues).
28
+
29
+ If your installation passes the test, you are ready to begin using
30
+ `tc` to analyze tax reforms. Continue reading this section for
31
+ information about how to do that. But if you want a quick hint about
32
+ the range of `tc` capabilities, enter the following:
33
+
34
+ ```
35
+ % tc --help
36
+ ```
37
+
38
+ The basic idea of `tc` tax analysis is that each tax reform is
39
+ specified in a text file using a simple method to describe the details
40
+ of the reform. Read the next part of this section to see how policy
41
+ reform files are formatted.
42
+
43
+ ## Specify tax reform
44
+
45
+ The details of a tax reform are contained in a text file that you
46
+ write with a text editor. The reform is expressed by specifying which
47
+ tax policy parameters are changed from their current-law values by the
48
+ reform. The current-law values of each policy parameter are documented
49
+ in [this
50
+ section](https://taxcalc.pslmodels.org/guide/policy_params.html#policy-parameters)
51
+ of the guide. The timing and magnitude of these policy parameter
52
+ changes are written in JSON, a simple and widely-used
53
+ data-specification language.
54
+
55
+ For several examples of reform files and the general rules for writing
56
+ JSON reform files, go to [this
57
+ page](https://github.com/PSLmodels/Tax-Calculator/blob/master/taxcalc/reforms/README.md#policy-reform-files).
58
+
59
+ ## Specify analysis assumptions
60
+
61
+ This part explains how to specify economic assumption files used in
62
+ static tax analysis. This is an advanced topic, so if you want to
63
+ start out using the default assumptions (which are documented in [this
64
+ section](https://taxcalc.pslmodels.org/guide/policy_params.html#policy-parameters))
65
+ of the guide), you can skip this part now and come back to read it
66
+ whenever you want to change the default assumptions. The [next
67
+ part](https://taxcalc.pslmodels.org/guide/cli.html#specify-filing-units)
68
+ of this section discusses filing-unit input files.
69
+
70
+ The details of analysis assumptions are contained in a text file that
71
+ you write with a text editor. The assumptions are expressed by
72
+ specifying which parameters are changed from their default values. The
73
+ timing and magnitude of these parameter changes are written in JSON, a
74
+ simple and widely-used data-specification language.
75
+
76
+ For examples of assumption files and the general rules for writing
77
+ JSON assumption files, go to [this
78
+ page](https://github.com/PSLmodels/Tax-Calculator/blob/master/taxcalc/assumptions/README.md#economic-assumption-files).
79
+
80
+ ## Specify filing units
81
+
82
+ The `taxcalc` package containing `tc` does not include an
83
+ IRS-SOI-PUF-derived microsimulation sample. This is because, unlike
84
+ Census public-use files, the IRS-SOI Public Use File is
85
+ proprietary. If you or your organization has paid IRS to use the PUF
86
+ version being by Tax-Calculator, then it may be possible for us to
87
+ share with you one of our PUF-derived samples: the 2011-based `puf.csv`
88
+ or the 2015-based `tmd.csv`, which are described in {doc}`../usage/data`.
89
+ Otherwise, you have two choices.
90
+
91
+ **First**, you can easily create with a text editor a CSV-formatted
92
+ file containing several filing units whose experience under your tax
93
+ reform is of interest to you. Much of the public discussion of tax
94
+ reforms is of this type: how is this family or that family affected by
95
+ a reform; how do they fare under different reforms; etc. The test
96
+ conducted to check the `tc` installation has left one such file. It is
97
+ called `test.csv` and contains two filing units: a lower income family
98
+ and a higher income family. You can use this `test.csv` file as `tc`
99
+ input to analyze your tax reforms. Before creating your own input
100
+ files be sure to read the short set of guidelines that appear after
101
+ this list of two choices. Some people pursue this approach using a
102
+ statistical pacakge like R or Stata, in which case the `tc` CLI
103
+ program can be invoked from within the statistical package. There may
104
+ be a need (especially on Windows) to [add to the system
105
+ PATH](https://github.com/PSLmodels/Tax-Calculator/issues/2273#issuecomment-479572287)
106
+ in order to do this.
107
+
108
+ **Second**, the `taxcalc` does include a freely available
109
+ microsimulation sample containing only filing units derived from a
110
+ recent March CPS survey. For several reasons, the results generated by
111
+ this `cps.csv` file are substantially different from the results
112
+ generated by the `puf.csv` or `tmd.csv` files. The `cps.csv` file
113
+ contains a sample of the population while the `puf.csv` and `tmd.csv`
114
+ files contain mostly a sample of income tax filers in which
115
+ high-income filing units are over represented. Also, the `cps.csv`
116
+ file has many income variables that are missing (and assumed to be
117
+ zero by Tax-Calculator), which causes an understating of total
118
+ incomes, especially for those with high incomes. All these differences
119
+ mean that the aggregate revenue and distributional results generated
120
+ when using the `cps.csv` file as input to Tax-Calculator can be
121
+ substantially different from the results generated when using the
122
+ `puf.csv` or `tmd.csv` file as input. And this is particularly true
123
+ when analyzing reforms that change the tax treatment of high-income
124
+ filers.
125
+
126
+ **Input-File-Preparation Guidelines**
127
+
128
+ The `tc` CLI to Tax-Calculator is flexible enough to read almost any
129
+ kind of CSV-formatted input data on filing units as long as the
130
+ variable names correspond to those expected by Tax-Calculator. The
131
+ only required input variables are `RECID` (a unique filing-unit record
132
+ identifier) and `MARS` (a positive-valued filing-status
133
+ indicator). Other variables in the input file must have variable names
134
+ that are listed in the [Input
135
+ Variables](https://taxcalc.pslmodels.org/guide/input_vars.html)
136
+ section for them to affect the tax calculations. Any variable listed
137
+ in Input Variables that is not in an input file is automatically set
138
+ to zero for every filing unit. Variables in the input file that are
139
+ not listed in Input Variables are ignored by Tax-Calculator.
140
+
141
+ However, there are important data-preparation issues related to the
142
+ fact that the payroll tax is a tax on individuals, not on income-tax
143
+ filing units. Tax-Calculator expects that the filing-unit total for
144
+ each of several earnings-related variables is split between the
145
+ taxpayer and the spouse. It is the responsibility of anyone preparing
146
+ data for Tax-Calculator input to do this earnings splitting. Here are
147
+ the relationships between the filing-unit variable and the taxpayer
148
+ (`p`) and spouse (`s`) variables expected by Tax-Calculator:
149
+
150
+ ```
151
+ e00200 = e00200p + e00200s
152
+ e00900 = e00900p + e00900s
153
+ e02100 = e02100p + e02100s
154
+ ```
155
+
156
+ Obviously, when `MARS` is not equal to 2 (married filing jointly), the
157
+ values of the three `s` variables are zero and the value of each `p`
158
+ variable is equal to the value of its corresponding filing-unit
159
+ variable. Note that the input file can omit any one, or all, of these
160
+ three sets variables. If the three variables in one of these sets are
161
+ omitted, the required relationship will be satisfied because zero
162
+ equals zero plus zero.
163
+
164
+ In addition to this earnings-splitting data-preparation issue,
165
+ Tax-Calculator expects that the value of ordinary dividends (`e00600`)
166
+ will be no less than the value of qualified dividends (`e00650`) for
167
+ each filing unit. And it also expects that the value of total pension
168
+ and annuity income (`e01500`) will be no less than the value of
169
+ taxable pension and annuity income (`e01700`) for each filing
170
+ unit. Tax-Calculator also expects the value of the required MARS
171
+ variable to be in the range from one to five, and the value of the EIC
172
+ variable to be in the range from zero to three. Again, it is your
173
+ responsibility to prepare input data for Tax-Calculator in a way that
174
+ ensures these relationships are true for each filing unit.
175
+
176
+ Here's an example of how to specify a few stylized filing units with
177
+ and without young children:
178
+
179
+ ```
180
+ RECID,MARS,XTOT,EIC,n24,...
181
+ 11 , 1 , 1 , 0 , 0 ,... <== single person with no kids
182
+ 12 , 4 , 2 , 1 , 1 ,... <== single person with a young kid
183
+ 13 , 2 , 4 , 2 , 2 ,... <== married couple with two young kids
184
+ ```
185
+
186
+ Be sure to read the documentation of the `MARS`, `XTOT`, `EIC`, and
187
+ `n24` input variables. Also, there may be a need to add other
188
+ child-age input variables if you want to simulate reforms like a child
189
+ credit bonus for young children. Also, the universal basic income
190
+ (UBI) reform is implemented using its own set of three age-group-count
191
+ input variables.
192
+
193
+ The name of your input data file is also relevant to how `tc` will
194
+ behave. If your file name ends with `cps.csv`, `puf.csv` or `tmd.csv`,
195
+ `tc` will automatically extrapolate your data from its base year to
196
+ the year you specify for tax calculations to be calculated using built
197
+ in growth factors, extrapolated weights, and other adjustment
198
+ factors. If you are not using the `cps.csv`, `puf.csv`, or `tmd.csv`
199
+ input, it is likely that your data will not be compatible with these
200
+ extrapolations and you should adopt filenames with alternative
201
+ endings.
202
+
203
+ ## Initiate reform analysis
204
+
205
+ Executing `tc` requires at least three command-line arguments: the
206
+ name of an input file containing one or more filing units, the year
207
+ for which the tax calculations are done, and an option specifying what
208
+ kind of output is to be generated. A baseline policy file is
209
+ optional; specifying no baseline file implies the baseline policy is
210
+ current-law policy. A policy reform file is optional; specifying no
211
+ reform file implies calculations are done for the baseline policy. An
212
+ economic assumption file is also optional; no assumption file implies
213
+ you want to use the default values of the assumption parameters. The
214
+ output files written by `tc` are built-up from the name of the input
215
+ file, tax year, baseline file, reform file, and assumption file using
216
+ a `#` character if an option is not specified.
217
+
218
+
219
+ Here we explain how to conduct tax analysis with `tc` by presenting a
220
+ series of examples and explaining what output is produced in each
221
+ example. There are several types of output that `tc` can generate so
222
+ there will be more than a few examples. All the examples assume that
223
+ the input file is the built-in `cps.csv` data sample and are conducted
224
+ on an old Mac with a slow Intel CPU chip.
225
+
226
+ ```
227
+ % tc cps.csv 2020 --dumpdb
228
+ Read input data for 2014; input data were extrapolated to 2020
229
+ Write dump output to sqlite3 database file cps-20-#-#-#.db
230
+ Execution time is 33.2 seconds
231
+ ```
232
+
233
+ The dump database contains 2020 income tax liabilities for each filing
234
+ unit under both baseline and reform policy regimes. The name of the
235
+ dump database file is `cps-20-#-#-#.db`. Because we did not use the
236
+ `--dumpvars` option, a minimal set of baseline/reform variables are
237
+ included in the dump database.
238
+
239
+ The main advantage of the SQLite3 database is that the
240
+ Anaconda Python distribution includes
241
+ [sqlite3](https://www.sqlite.org/cli.html) (or sqlite3.exe on
242
+ Windows), a command-line tool that can be used to tabulate dump output
243
+ using structured query language (SQL). SQL is a language that you use
244
+ to specify the tabulation you want and the SQL database figures out
245
+ the procedure for generating your tabulation and then executes that
246
+ procedure; there is no computer programming involved.
247
+
248
+ To manipulate the dump database file, use the SQLite command-line
249
+ program (called `sqlite3.exe` on Windows or` sqlite3` on other
250
+ operating systems), which is automatically installed as part of the
251
+ Anaconda Python distribution. Full `sqlite3` documentation is
252
+ [here](https://sqlite.org/cli.html).
253
+
254
+ Here is a quick way to see the structure of the dump database:
255
+
256
+ ```
257
+ % echo ".schema" | sqlite3 cps-20-#-#-#.db
258
+ CREATE TABLE IF NOT EXISTS "base" (
259
+ "RECID" INTEGER,
260
+ "s006" REAL,
261
+ "data_source" INTEGER,
262
+ "XTOT" INTEGER,
263
+ "MARS" INTEGER,
264
+ "expanded_income" REAL,
265
+ "income_group" INTEGER
266
+ );
267
+ CREATE TABLE IF NOT EXISTS "baseline" (
268
+ "RECID" INTEGER,
269
+ "iitax" REAL
270
+ );
271
+ CREATE TABLE IF NOT EXISTS "reform" (
272
+ "RECID" INTEGER,
273
+ "iitax" REAL
274
+ );
275
+ ```
276
+
277
+ Notice that the dump output includes three relational database tables:
278
+ `base`, `baseline`, and `reform`. The `base` tables contains baseline
279
+ values for variables that keep the same value when policy changes.
280
+ The `baseline` and `reform` tables can contain variables in addition
281
+ to `RECID` and `iitax` if the `--dumpvars` option is used. For a
282
+ complete list of input variables, see the [Input
283
+ Variables](https://taxcalc.pslmodels.org/guide/input_vars.html)
284
+ section. For a complete list of output variables, see the [Output
285
+ Variables](https://taxcalc.pslmodels.org/guide/output_vars.html)
286
+ section.
287
+
288
+ There are several advantages to using a database file for dump output:
289
+ the database is much smaller than the equivalent CSV-formatted files,
290
+ and dump output can be tabulated using structured query language
291
+ (SQL). SQL is a language that you use to specify the tabulation you
292
+ want and the SQL database figures out the procedure for generating
293
+ your tabulation and then executes that procedure; there is no computer
294
+ programming involved. We illustrate tabulation of dump output in a
295
+ [subsequent section](#cli-tab-results).
296
+
297
+ Next, we show how to generate tabular and graphical output for a
298
+ simple policy reform specified in the `ref3.json` file:
299
+
300
+ ```
301
+ // ref3.json raises personal exemption amount to 8000 in 2022,
302
+ // after which it continues to be indexed to price inflation.
303
+ {
304
+ "II_em": {"2022": 8000}
305
+ }
306
+ ```
307
+
308
+ To get both tabular and graphical output, and to check on the policy
309
+ reform, we execute the following commands (note that on Windows you
310
+ should replace `cat` with `type`):
311
+
312
+ ```
313
+ % tc cps.csv 2024 --reform ref3.json --params --tables --graphs
314
+ Read input data for 2014; input data were extrapolated to 2024
315
+ Write baseline policy parameter values to file cps-24-#-ref3-#-params.bas
316
+ Write reform policy parameter values to file cps-24-#-ref3-#-params.ref
317
+ Write tabular output to file cps-24-#-ref3-#-tables.text
318
+ Write graphical output to file cps-24-#-ref3-#-pch.html
319
+ Write graphical output to file cps-24-#-ref3-#-atr.html
320
+ Write graphical output to file cps-24-#-ref3-#-mtr.html
321
+ Execution time is 37.3 seconds
322
+
323
+ % diff cps-24-#-ref3-#-params.bas cps-24-#-ref3-#-params.ref
324
+ 34c34
325
+ < II_em 0.0
326
+ ---
327
+ > II_em 9059.7
328
+
329
+ % cat cps-24-#-ref3-#-tables.text
330
+ Weighted Tax Reform Totals by Baseline Expanded-Income Decile
331
+ Returns ExpInc IncTax PayTax LSTax AllTax
332
+ (#m) ($b) ($b) ($b) ($b) ($b)
333
+ 0 21.49 46.8 -1.0 3.6 0.0 2.6
334
+ 1 21.49 371.0 -11.5 31.8 0.0 20.4
335
+ 2 21.49 696.8 -12.3 49.9 0.0 37.6
336
+ 3 21.49 934.8 -1.9 55.4 0.0 53.5
337
+ 4 21.49 1177.8 4.8 78.4 0.0 83.2
338
+ 5 21.49 1486.0 15.3 105.4 0.0 120.6
339
+ 6 21.49 1893.5 32.0 136.6 0.0 168.7
340
+ 7 21.49 2465.2 74.8 194.6 0.0 269.4
341
+ 8 21.49 3392.4 176.0 295.6 0.0 471.6
342
+ 9 21.49 8037.6 1313.1 558.6 0.0 1871.7
343
+ A 214.88 20502.0 1589.2 1510.0 0.0 3099.2
344
+
345
+ Weighted Tax Differences by Baseline Expanded-Income Decile
346
+ Returns ExpInc IncTax PayTax LSTax AllTax
347
+ (#m) ($b) ($b) ($b) ($b) ($b)
348
+ 0 21.49 46.8 0.0 0.0 0.0 0.0
349
+ 1 21.49 371.0 -2.1 0.0 0.0 -2.1
350
+ 2 21.49 696.8 -8.3 0.0 0.0 -8.3
351
+ 3 21.49 934.8 -10.0 0.0 0.0 -10.0
352
+ 4 21.49 1177.8 -14.5 0.0 0.0 -14.5
353
+ 5 21.49 1486.0 -22.4 0.0 0.0 -22.4
354
+ 6 21.49 1893.5 -33.0 0.0 0.0 -33.0
355
+ 7 21.49 2465.2 -45.0 0.0 0.0 -45.0
356
+ 8 21.49 3392.4 -74.3 0.0 0.0 -74.3
357
+ 9 21.49 8037.6 -121.7 0.0 0.0 -121.7
358
+ A 214.88 20502.0 -331.1 0.0 0.0 -331.1
359
+ ```
360
+
361
+ The graphs in the three `.html` files can be viewed in your browser.
362
+
363
+ The `cps-24-#-ref3-#-pch.html` file looks something like this:
364
+
365
+ ![pch graph](../_static/pch.png)
366
+
367
+ The `cps-24-#-ref3-#-atr.html` file looks something like this:
368
+
369
+ ![atr graph](../_static/atr.png)
370
+
371
+ The `cps-24-#-ref3-#-mtr.html` file looks something like this:
372
+
373
+ ![mtr graph](../_static/mtr.png)
374
+
375
+ In all the examples in this section, we have executed one `tc` run at
376
+ at time. But **what if you want to execute many `tc` runs** because
377
+ you want results for many years and/or for several different reforms.
378
+ The best way to execute multiple-year runs (say, ten-year runs to
379
+ generate budget-window estimates) is to use the `--numyears N` option
380
+ as decribed
381
+ [here](https://github.com/PSLmodels/Tax-Calculator/pull/2900#issue-3047043290)
382
+ and below in the final section of this document.
383
+
384
+ ## Tabulate reform results
385
+
386
+ Given the [prevalence](https://sqlite.org/mostdeployed.html) of
387
+ SQLite, `tc` dump output can be tabulated using a wide range of
388
+ statistical software tools. For example, a dump database file
389
+ can be directly manipulated in R or Python.
390
+
391
+ Here we give some examples of using the `sqlite3` command-line program
392
+ that is part of the Anaconda distribution (so it is always available
393
+ when using Tax-Calculator). The first step, of course, is to use the
394
+ `--dumpdb` option when running `tc`. Then you can use the `sqlite3`
395
+ tool interactively or use it to execute SQL scripts you have saved in
396
+ a text file. We'll provide examples of both those approaches. There
397
+ are many online tutorials on the SQL select command; if you want to
398
+ learn more, search the Internet.
399
+
400
+ First, we provide a simple example of using `sqlite3` interactively.
401
+ This approach is ideal for exploratory data analysis. Our example
402
+ uses the `cps.csv` file as input, but you can do the following with
403
+ the output from any input file that has weights (`s006`). Also, we
404
+ specify no policy reform file, so the output is for current-law
405
+ policy. What you cannot see from the following record of the analysis
406
+ is that the `sqlite3` tool keeps a command history, so pressing the
407
+ up-arrow key will bring up the prior command for editing. This
408
+ feature reduces substantially the amount of typing required to conduct
409
+ exploratory data analysis.
410
+
411
+ ```
412
+ % tc cps.csv 2024 --reform ref3.json --dumpdb
413
+ Read input data for 2014; input data were extrapolated to 2024
414
+ Write dump output to sqlite3 database file cps-24-#-ref3-#.db
415
+ Execution time is 35.8 seconds
416
+ Read input data for 2014; input data were extrapolated to 2025
417
+ Write dump output to sqlite3 database file cps-25-#-ref3-#.db
418
+ Execution time is 35.1 seconds
419
+
420
+ % sqlite3 cps-24-#-ref3-#.db
421
+ SQLite version 3.39.5 2022-10-14 20:58:05
422
+ Enter ".help" for usage hints.
423
+ sqlite> YOUR FIRST SQL COMMAND GOES HERE
424
+ sqlite> YOUR SECOND SQL COMMAND GOES HERE
425
+ sqlite> ...
426
+ sqlite> YOUR FINAL SQL COMMAND GOES HERE
427
+ sqlite> .quit
428
+ ```
429
+
430
+ Second, we provide a simple example of using `sqlite3` with SQL
431
+ commands stored in a text file. This approach is useful if you want
432
+ to tabulate many different output files in the same way. This second
433
+ example assumes that the first example has already been done.
434
+
435
+ ```
436
+ % cat tab.sql
437
+ .mode column
438
+
439
+ .print *** unweighted and weighted tax unit counts:
440
+ SELECT
441
+ COUNT(*) AS raw_count, -- unweighted count of tax units (#)
442
+ ROUND(SUM(s006)*1e-6, 3) AS wgh_count -- weighted count of tax units (#M)
443
+ from base;
444
+
445
+ .print *** weighted tax unit counts by filing status (MARS):
446
+ .width 4 -9
447
+ SELECT
448
+ MARS, -- tax filing status
449
+ ROUND(SUM(s006)*1e-6, 3) AS wgh_count -- weighted count of tax units (#M)
450
+ FROM base
451
+ GROUP BY MARS;
452
+ .headers off
453
+ SELECT
454
+ 'A', -- tax filing status
455
+ ROUND(SUM(s006)*1e-6, 3) AS wgh_count -- weighted count of tax units (#M)
456
+ FROM base;
457
+ .headers on
458
+
459
+ .print *** specify base.income_group
460
+ UPDATE base SET income_group =
461
+ CASE -- specify the income_group brackets as desired
462
+ WHEN expanded_income < 0.0 THEN 0
463
+ WHEN expanded_income < 50.0e3 THEN 1
464
+ WHEN expanded_income < 100.0e3 THEN 2
465
+ WHEN expanded_income < 500.0e3 THEN 3
466
+ WHEN expanded_income < 1.0e6 THEN 4
467
+ ELSE 5
468
+ END;
469
+
470
+ .print *** tabulate weighted tax units and baseline.iitax by income_group:
471
+ .width 1 -9 -9 -9 -9
472
+ SELECT
473
+ income_group AS g, -- income_group
474
+ ROUND(SUM(s006)*1e-6, 3) AS units, -- tax units (#M)
475
+ ROUND(SUM(s006*b.iitax)*1e-9, 3) AS b_iitax, -- baseline iitax ($B)
476
+ ROUND(SUM(s006*r.iitax)*1e-9, 3) AS r_iitax, -- reform iitax ($B)
477
+ ROUND(SUM(s006*(r.iitax-b.iitax))*1e-9, 3) AS r_b_diff -- reform-baseline diff
478
+ FROM base JOIN baseline AS b USING(RECID) JOIN reform AS r USING(RECID)
479
+ GROUP BY income_group;
480
+ .headers off
481
+ SELECT
482
+ 'A' AS g, -- all income groups
483
+ ROUND(SUM(s006)*1e-6, 3) AS units, -- tax units (#M)
484
+ ROUND(SUM(s006*b.iitax)*1e-9, 3) AS b_iitax, -- baseline iitax ($B)
485
+ ROUND(SUM(s006*r.iitax)*1e-9, 3) AS r_iitax, -- reform iitax ($B)
486
+ ROUND(SUM(s006*(r.iitax-b.iitax))*1e-9, 3) AS r_b_diff -- reform-baseline diff
487
+ FROM base JOIN baseline AS b USING(RECID) JOIN reform AS r USING(RECID);
488
+ .headers on
489
+ ```
490
+
491
+ Using this `tab.sql` script to tabulate the `cps-24-#-ref3-#.db`
492
+ database produces these results in about 1.3 seconds:
493
+
494
+ ```
495
+ % sqlite3 cps-24-#-ref3-#.db < tab.sql
496
+ *** unweighted and weighted tax unit counts:
497
+ raw_count wgh_count
498
+ --------- ---------
499
+ 280005 214.876
500
+ *** weighted tax unit counts by filing status (MARS):
501
+ MARS wgh_count
502
+ ---- ---------
503
+ 1 120.117
504
+ 2 71.899
505
+ 3 4.191
506
+ 4 18.67
507
+ A 214.876
508
+ *** specify base.income_group
509
+ *** tabulate weighted tax units and baseline.iitax by income_group:
510
+ g units b_iitax r_iitax r_b_diff
511
+ - --------- --------- --------- ---------
512
+ 0 0.105 0.0 0.0 0.0
513
+ 1 88.203 -5.16 -26.722 -21.563
514
+ 2 62.213 121.065 52.266 -68.798
515
+ 3 61.721 1043.226 823.515 -219.711
516
+ 4 1.85 261.946 247.438 -14.508
517
+ 5 0.784 499.231 492.709 -6.521
518
+ A 214.876 1920.308 1589.207 -331.101
519
+ ```
520
+
521
+ Notice the -331.101 aggregate change in income tax liability induced
522
+ by the reform is essentially the same as the -331.1 amount in the
523
+ --tables output above, although the income subgroups amounts differ
524
+ because the income groups are defined in different ways.
525
+
526
+ ## Generate budget-window results
527
+
528
+ Sometimes ten-year results for a reform are needed. The easiest way
529
+ to generate such budget-window results is to use the CLI tool's
530
+ `--numyears N` option. If `ext.json` contains the
531
+ extend-TCJA-beyond-2025 reform, then we can execute the following run:
532
+
533
+ ```
534
+ % tc ../tmd.csv 2026 --numyears 10 --reform ext.json --tables
535
+ Read input data for 2021; input data were extrapolated to 2026
536
+ Write tabular output to file tmd-26-#-ext-#-tables.text
537
+ Advance input data and policy to 2027
538
+ Write tabular output to file tmd-27-#-ext-#-tables.text
539
+ Advance input data and policy to 2028
540
+ Write tabular output to file tmd-28-#-ext-#-tables.text
541
+ Advance input data and policy to 2029
542
+ Write tabular output to file tmd-29-#-ext-#-tables.text
543
+ Advance input data and policy to 2030
544
+ Write tabular output to file tmd-30-#-ext-#-tables.text
545
+ Advance input data and policy to 2031
546
+ Write tabular output to file tmd-31-#-ext-#-tables.text
547
+ Advance input data and policy to 2032
548
+ Write tabular output to file tmd-32-#-ext-#-tables.text
549
+ Advance input data and policy to 2033
550
+ Write tabular output to file tmd-33-#-ext-#-tables.text
551
+ Advance input data and policy to 2034
552
+ Write tabular output to file tmd-34-#-ext-#-tables.text
553
+ Advance input data and policy to 2035
554
+ Write tabular output to file tmd-35-#-ext-#-tables.text
555
+ Execution time is 60.9 seconds
556
+ ```
557
+
558
+ [PR
559
+ #2900](https://github.com/PSLmodels/Tax-Calculator/pull/2900#issue-3047043290)
560
+ discusses how much faster this is relative to executing ten separate
561
+ `tc` runs, and also shows how to tabulate the ten-year aggregate
562
+ reform result from the files generated by this run.
@@ -50,7 +50,7 @@ _IRS Form Location:_
50
50
 
51
51
  ## `RECID`
52
52
  **_Required Input Variable_**
53
- _Description_: Unique numeric identifier for filing unit; appears as RECID variable in tc CLI minimal output
53
+ _Description_: Unique numeric identifier for filing unit
54
54
  _Datatype_: int
55
55
  _Availability_: taxdata_puf, taxdata_cps
56
56
  _IRS Form Location:_
@@ -788,7 +788,7 @@ _IRS Form Location:_
788
788
 
789
789
 
790
790
  ## `s006`
791
- _Description_: Filing unit sampling weight; appears as WEIGHT variable in tc CLI minimal output
791
+ _Description_: Filing unit sampling weight
792
792
  _Datatype_: float
793
793
  _Availability_: taxdata_puf, taxdata_cps
794
794
  _IRS Form Location:_