taxcalc 4.4.1__tar.gz → 4.6.0__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 (249) hide show
  1. {taxcalc-4.4.1/taxcalc.egg-info → taxcalc-4.6.0}/PKG-INFO +3 -2
  2. {taxcalc-4.4.1 → taxcalc-4.6.0}/conda.recipe/meta.yaml +2 -2
  3. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/about/releases.md +37 -0
  4. taxcalc-4.6.0/docs/guide/cli.md +531 -0
  5. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/input_vars.md +2 -2
  6. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/output_vars.md +3 -3
  7. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/index.md +23 -23
  8. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/usage/starting.md +1 -1
  9. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/usage/tcja_after_2025.md +5 -8
  10. {taxcalc-4.4.1 → taxcalc-4.6.0}/environment.yml +3 -2
  11. {taxcalc-4.4.1 → taxcalc-4.6.0}/extend_tcja.py +2 -2
  12. {taxcalc-4.4.1 → taxcalc-4.6.0}/setup.py +1 -1
  13. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/__init__.py +1 -1
  14. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/calcfunctions.py +2 -6
  15. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/calculator.py +15 -15
  16. taxcalc-4.6.0/taxcalc/cli/tc.py +359 -0
  17. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/consumption.json +1 -1
  18. taxcalc-4.4.1/taxcalc/puf_weights.csv.gz → taxcalc-4.6.0/taxcalc/cps_weights.csv.gz +0 -0
  19. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/growdiff.json +1 -1
  20. taxcalc-4.6.0/taxcalc/growfactors.csv +26 -0
  21. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/policy.py +4 -13
  22. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/policy_current_law.json +90 -90
  23. taxcalc-4.6.0/taxcalc/puf_ratios.csv +26 -0
  24. taxcalc-4.4.1/taxcalc/cps_weights.csv.gz → taxcalc-4.6.0/taxcalc/puf_weights.csv.gz +0 -0
  25. taxcalc-4.6.0/taxcalc/reforms/ext.json +62 -0
  26. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/taxcalcio.py +285 -298
  27. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/conftest.py +1 -1
  28. taxcalc-4.6.0/taxcalc/tests/cpscsv_agg_expect.csv +26 -0
  29. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/puf_var_wght_means_by_year.csv +70 -70
  30. taxcalc-4.6.0/taxcalc/tests/pufcsv_agg_expect.csv +26 -0
  31. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_4package.py +1 -0
  32. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_calculator.py +2 -2
  33. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_compare.py +1 -1
  34. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_parameters.py +1 -1
  35. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_reforms.py +1 -1
  36. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_taxcalcio.py +86 -107
  37. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/utils.py +4 -10
  38. {taxcalc-4.4.1 → taxcalc-4.6.0/taxcalc.egg-info}/PKG-INFO +3 -2
  39. taxcalc-4.4.1/docs/guide/cli.md +0 -641
  40. taxcalc-4.4.1/taxcalc/cli/tc.py +0 -276
  41. taxcalc-4.4.1/taxcalc/growfactors.csv +0 -25
  42. taxcalc-4.4.1/taxcalc/puf_ratios.csv +0 -25
  43. taxcalc-4.4.1/taxcalc/reforms/ext.json +0 -59
  44. taxcalc-4.4.1/taxcalc/tests/cpscsv_agg_expect.csv +0 -26
  45. taxcalc-4.4.1/taxcalc/tests/pufcsv_agg_expect.csv +0 -26
  46. {taxcalc-4.4.1 → taxcalc-4.6.0}/.coveragerc +0 -0
  47. {taxcalc-4.4.1 → taxcalc-4.6.0}/.github/FUNDING.yml +0 -0
  48. {taxcalc-4.4.1 → taxcalc-4.6.0}/.github/workflows/build_and_test.yml +0 -0
  49. {taxcalc-4.4.1 → taxcalc-4.6.0}/.github/workflows/check_jupyterbook.yml +0 -0
  50. {taxcalc-4.4.1 → taxcalc-4.6.0}/.github/workflows/deploy_jupyterbook.yml +0 -0
  51. {taxcalc-4.4.1 → taxcalc-4.6.0}/.github/workflows/deploy_parameters_docs.yml +0 -0
  52. {taxcalc-4.4.1 → taxcalc-4.6.0}/.gitignore +0 -0
  53. {taxcalc-4.4.1 → taxcalc-4.6.0}/LICENSE +0 -0
  54. {taxcalc-4.4.1 → taxcalc-4.6.0}/MANIFEST.in +0 -0
  55. {taxcalc-4.4.1 → taxcalc-4.6.0}/Makefile +0 -0
  56. {taxcalc-4.4.1 → taxcalc-4.6.0}/PSL_catalog.json +0 -0
  57. {taxcalc-4.4.1 → taxcalc-4.6.0}/README.md +0 -0
  58. {taxcalc-4.4.1 → taxcalc-4.6.0}/codecov.yml +0 -0
  59. {taxcalc-4.4.1 → taxcalc-4.6.0}/conda.recipe/bld.bat +0 -0
  60. {taxcalc-4.4.1 → taxcalc-4.6.0}/conda.recipe/build.sh +0 -0
  61. {taxcalc-4.4.1 → taxcalc-4.6.0}/csv_show.sh +0 -0
  62. {taxcalc-4.4.1 → taxcalc-4.6.0}/csv_vars.sh +0 -0
  63. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/PSL.svg +0 -0
  64. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/_config.yml +0 -0
  65. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/_static/atr.png +0 -0
  66. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/_static/mtr.png +0 -0
  67. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/_static/pch.png +0 -0
  68. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/_toc.yml +0 -0
  69. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/about/LICENSE.md +0 -0
  70. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/about/history.md +0 -0
  71. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/about/roadmap.md +0 -0
  72. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/calcfunctions.rst +0 -0
  73. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/calculator.rst +0 -0
  74. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/consumption.rst +0 -0
  75. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/data.rst +0 -0
  76. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/decorators.rst +0 -0
  77. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/growdiff.rst +0 -0
  78. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/growfactors.rst +0 -0
  79. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/parameters.rst +0 -0
  80. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/policy.rst +0 -0
  81. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/public_api.rst +0 -0
  82. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/records.rst +0 -0
  83. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/taxcalcio.rst +0 -0
  84. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/utils.rst +0 -0
  85. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/api/utilsprvt.rst +0 -0
  86. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/contributing/RELEASING.md +0 -0
  87. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/contributing/contributor_guide.md +0 -0
  88. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/contributing/param_naming.md +0 -0
  89. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/contributing/pr_workflow.md +0 -0
  90. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/contributing/testing.md +0 -0
  91. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/README.md +0 -0
  92. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/assumption_params.md +0 -0
  93. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/index.md +0 -0
  94. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/make/make_io_vars.py +0 -0
  95. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/make/make_params.py +0 -0
  96. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/make/make_uguide.py +0 -0
  97. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/policy_params.md +0 -0
  98. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/python_interface.md +0 -0
  99. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/templates/assumption_params_template.md +0 -0
  100. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/templates/input_vars_template.md +0 -0
  101. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/templates/output_vars_template.md +0 -0
  102. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/guide/templates/policy_params_template.md +0 -0
  103. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/README.md +0 -0
  104. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/_static/reformA.json +0 -0
  105. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/_static/reformB.json +0 -0
  106. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/_static/reformC.json +0 -0
  107. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/convert_all.sh +0 -0
  108. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/index.md +0 -0
  109. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/md_src/recipe00.md +0 -0
  110. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/md_src/recipe01.md +0 -0
  111. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/md_src/recipe02.md +0 -0
  112. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/md_src/recipe03.md +0 -0
  113. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/md_src/recipe04.md +0 -0
  114. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/md_src/recipe04_pandas.md +0 -0
  115. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/md_src/recipe05.md +0 -0
  116. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/md_src/recipe06.md +0 -0
  117. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/recipe00.ipynb +0 -0
  118. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/recipe01.ipynb +0 -0
  119. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/recipe02.ipynb +0 -0
  120. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/recipe03.ipynb +0 -0
  121. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/recipe04.ipynb +0 -0
  122. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/recipe04_pandas.ipynb +0 -0
  123. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/recipe05.ipynb +0 -0
  124. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/recipes/recipe06.ipynb +0 -0
  125. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/usage/data.md +0 -0
  126. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/usage/overview.md +0 -0
  127. {taxcalc-4.4.1 → taxcalc-4.6.0}/docs/use_cases.md +0 -0
  128. {taxcalc-4.4.1 → taxcalc-4.6.0}/gitpr +0 -0
  129. {taxcalc-4.4.1 → taxcalc-4.6.0}/gitpr.bat +0 -0
  130. {taxcalc-4.4.1 → taxcalc-4.6.0}/gitsync +0 -0
  131. {taxcalc-4.4.1 → taxcalc-4.6.0}/gitsync.bat +0 -0
  132. {taxcalc-4.4.1 → taxcalc-4.6.0}/ppp.py +0 -0
  133. {taxcalc-4.4.1 → taxcalc-4.6.0}/pyproject.toml +0 -0
  134. {taxcalc-4.4.1 → taxcalc-4.6.0}/pytest.ini +0 -0
  135. {taxcalc-4.4.1 → taxcalc-4.6.0}/setup.cfg +0 -0
  136. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/assumptions/ASSUMPTIONS.md +0 -0
  137. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/assumptions/README.md +0 -0
  138. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/assumptions/economic_assumptions_template.json +0 -0
  139. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/cli/__init__.py +0 -0
  140. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/conftest.py +0 -0
  141. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/consumption.py +0 -0
  142. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/cps.csv.gz +0 -0
  143. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/data.py +0 -0
  144. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/decorators.py +0 -0
  145. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/growdiff.py +0 -0
  146. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/growfactors.py +0 -0
  147. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/parameters.py +0 -0
  148. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/records.py +0 -0
  149. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/records_variables.json +0 -0
  150. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/2017_law.json +0 -0
  151. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/2017_law.out.csv +0 -0
  152. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ARPA.json +0 -0
  153. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ARPA.out.csv +0 -0
  154. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/BrownKhanna.json +0 -0
  155. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/BrownKhanna.out.csv +0 -0
  156. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/CARES.json +0 -0
  157. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/CARES.out.csv +0 -0
  158. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ConsolidatedAppropriationsAct2021.json +0 -0
  159. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ConsolidatedAppropriationsAct2021.out.csv +0 -0
  160. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/Larson2019.json +0 -0
  161. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/Larson2019.out.csv +0 -0
  162. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/README.md +0 -0
  163. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/REFORMS.md +0 -0
  164. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/Renacci.json +0 -0
  165. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/Renacci.out.csv +0 -0
  166. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/SandersDeFazio.json +0 -0
  167. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/SandersDeFazio.out.csv +0 -0
  168. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/TCJA.json +0 -0
  169. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/TCJA.md +0 -0
  170. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/TCJA.out.csv +0 -0
  171. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/Trump2016.json +0 -0
  172. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/Trump2016.out.csv +0 -0
  173. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/Trump2017.json +0 -0
  174. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/Trump2017.out.csv +0 -0
  175. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/archive/Clinton2016.json +0 -0
  176. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/archive/RyanBrady.json +0 -0
  177. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/archive/TCJA_House.json +0 -0
  178. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/archive/TCJA_House_Amended.json +0 -0
  179. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/archive/TCJA_Reconciliation.json +0 -0
  180. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/archive/TCJA_Senate.json +0 -0
  181. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/archive/TCJA_Senate_111417.json +0 -0
  182. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/archive/TCJA_Senate_120117.json +0 -0
  183. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/cases.csv +0 -0
  184. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/clp.out.csv +0 -0
  185. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/growfactors_ext.csv +0 -0
  186. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ptaxes0.json +0 -0
  187. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ptaxes0.out.csv +0 -0
  188. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ptaxes1.json +0 -0
  189. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ptaxes1.out.csv +0 -0
  190. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ptaxes2.json +0 -0
  191. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ptaxes2.out.csv +0 -0
  192. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ptaxes3.json +0 -0
  193. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/reforms/ptaxes3.out.csv +0 -0
  194. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/benefits_expect.csv +0 -0
  195. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/cmpi_cps_expect.txt +0 -0
  196. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/cmpi_puf_expect.txt +0 -0
  197. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/puf_var_correl_coeffs_2016.csv +0 -0
  198. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/pufcsv_mtr_expect.txt +0 -0
  199. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/reforms.json +0 -0
  200. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/reforms_expect.csv +0 -0
  201. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_benefits.py +0 -0
  202. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_calcfunctions.py +0 -0
  203. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_compatible_data.py +0 -0
  204. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_consumption.py +0 -0
  205. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_cpscsv.py +0 -0
  206. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_data.py +0 -0
  207. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_decorators.py +0 -0
  208. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_growdiff.py +0 -0
  209. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_growfactors.py +0 -0
  210. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_policy.py +0 -0
  211. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_puf_var_stats.py +0 -0
  212. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_pufcsv.py +0 -0
  213. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_records.py +0 -0
  214. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_responses.py +0 -0
  215. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/tests/test_utils.py +0 -0
  216. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/utilsprvt.py +0 -0
  217. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/CSV_INPUT_VARS.md +0 -0
  218. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/CSV_OUTPUT_VARS.md +0 -0
  219. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/README.md +0 -0
  220. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/Differences_Explained.md +0 -0
  221. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/README.md +0 -0
  222. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/a17-taxdiffs-expect.csv +0 -0
  223. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/a18-taxdiffs-expect.csv +0 -0
  224. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/a19-taxdiffs-expect.csv +0 -0
  225. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/a20-taxdiffs-expect.csv +0 -0
  226. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/a21-taxdiffs-expect.csv +0 -0
  227. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/b17-taxdiffs-expect.csv +0 -0
  228. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/b18-taxdiffs-expect.csv +0 -0
  229. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/b19-taxdiffs-expect.csv +0 -0
  230. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/b20-taxdiffs-expect.csv +0 -0
  231. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/b21-taxdiffs-expect.csv +0 -0
  232. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/c17-taxdiffs-expect.csv +0 -0
  233. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/c18-taxdiffs-expect.csv +0 -0
  234. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/expected_differences/c19-taxdiffs-expect.csv +0 -0
  235. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/input_setup.py +0 -0
  236. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/main_comparison.py +0 -0
  237. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/prepare_taxcalc_input.py +0 -0
  238. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/process_taxcalc_output.py +0 -0
  239. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/taxsim_emulation.json +0 -0
  240. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/taxsim_input.py +0 -0
  241. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/tc_sims.py +0 -0
  242. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/taxsim35/tests_35.py +0 -0
  243. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc/validation/tests_35.sh +0 -0
  244. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc.egg-info/SOURCES.txt +0 -0
  245. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc.egg-info/dependency_links.txt +0 -0
  246. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc.egg-info/entry_points.txt +0 -0
  247. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc.egg-info/requires.txt +0 -0
  248. {taxcalc-4.4.1 → taxcalc-4.6.0}/taxcalc.egg-info/top_level.txt +0 -0
  249. {taxcalc-4.4.1 → taxcalc-4.6.0}/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.4.1
3
+ Version: 4.6.0
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,43 @@ 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-04-30 Release 4.6.0
8
+ ------------------------
9
+ (last merged pull request is
10
+ [#2893](https://github.com/PSLmodels/Tax-Calculator/pull/2893))
11
+
12
+ **This is an enhancement and bug-fix release.**
13
+
14
+ **API Changes**
15
+
16
+ **New Features**
17
+ - Several enhancements to Tax-Calculator CLI program, `tc`
18
+ [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]
19
+
20
+ **Bug Fixes**
21
+ - Update required `bokeh` version
22
+ [[#2882](https://github.com/PSLmodels/Tax-Calculator/pull/2882) by Bodi Yang]
23
+ - Make ACTC_c parameter be inflation indexed in the TCJA-extension reform
24
+ [[#2883](https://github.com/PSLmodels/Tax-Calculator/pull/2883) by Martin Holmer]
25
+ - Avoid `marshmallow` version 4.0.0 until `paramtools` is fixed
26
+ [[#2885](https://github.com/PSLmodels/Tax-Calculator/pull/2885) by Martin Holmer]
27
+
28
+
29
+ 2025-03-11 Release 4.5.0
30
+ ------------------------
31
+ (last merged pull request is
32
+ [#2878](https://github.com/PSLmodels/Tax-Calculator/pull/2878))
33
+
34
+ **This is an enhancement release.**
35
+
36
+ **API Changes**
37
+
38
+ **New Features**
39
+ - Updates for CBO January 2025 baseline projection
40
+ [[#2874](https://github.com/PSLmodels/Tax-Calculator/pull/2874) by Bodi Yang]
41
+ - Fixes to deprecation and code style warnings [PRs [#2876](https://github.com/PSLmodels/Tax-Calculator/pull/2876), [#2877](https://github.com/PSLmodels/Tax-Calculator/pull/2877), [#2878](https://github.com/PSLmodels/Tax-Calculator/pull/2878), by Martin Holmer]
42
+
43
+
7
44
  2025-02-13 Release 4.4.1
8
45
  ------------------------
9
46
  (last merged pull request is
@@ -0,0 +1,531 @@
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
+ Unless you are asking for an enormous dump database, a single `tc` run
379
+ should take no more than one minute on your computer. The easiest way
380
+ to speed up the execution of many `tc` runs is to split them into
381
+ groups of runs and execute each group of runs in a different
382
+ command-prompt window. On most modern computers that have four or
383
+ more CPU cores, at least eight gigabytes of memory, and fast disk
384
+ storage, executing four or five runs in different windows will take
385
+ only a little more time than executing a single `tc` run. If you have
386
+ more than one run in each group, put them in a Unix/Mac bash script or
387
+ a Windows batch file, and execute one script in each command-prompt
388
+ window. If it still takes too long, consider splitting the `tc` runs
389
+ across more than one computer.
390
+
391
+ ## Tabulate reform results
392
+
393
+ Given the [prevalence](https://sqlite.org/mostdeployed.html) of
394
+ SQLite, `tc` dump output can be tabulated using a wide range of
395
+ statistical software tools. For example, a dump database file
396
+ can be directly manipulated in R or Python.
397
+
398
+ Here we give some examples of using the `sqlite3` command-line program
399
+ that is part of the Anaconda distribution (so it is always available
400
+ when using Tax-Calculator). The first step, of course, is to use the
401
+ `--dumpdb` option when running `tc`. Then you can use the `sqlite3`
402
+ tool interactively or use it to execute SQL scripts you have saved in
403
+ a text file. We'll provide examples of both those approaches. There
404
+ are many online tutorials on the SQL select command; if you want to
405
+ learn more, search the Internet.
406
+
407
+ First, we provide a simple example of using `sqlite3` interactively.
408
+ This approach is ideal for exploratory data analysis. Our example
409
+ uses the `cps.csv` file as input, but you can do the following with
410
+ the output from any input file that has weights (`s006`). Also, we
411
+ specify no policy reform file, so the output is for current-law
412
+ policy. What you cannot see from the following record of the analysis
413
+ is that the `sqlite3` tool keeps a command history, so pressing the
414
+ up-arrow key will bring up the prior command for editing. This
415
+ feature reduces substantially the amount of typing required to conduct
416
+ exploratory data analysis.
417
+
418
+ ```
419
+ % tc cps.csv 2024 --reform ref3.json --dumpdb
420
+ Read input data for 2014; input data were extrapolated to 2024
421
+ Write dump output to sqlite3 database file cps-24-#-ref3-#.db
422
+ Execution time is 35.8 seconds
423
+ Read input data for 2014; input data were extrapolated to 2025
424
+ Write dump output to sqlite3 database file cps-25-#-ref3-#.db
425
+ Execution time is 35.1 seconds
426
+
427
+ % sqlite3 cps-24-#-ref3-#.db
428
+ SQLite version 3.39.5 2022-10-14 20:58:05
429
+ Enter ".help" for usage hints.
430
+ sqlite> YOUR FIRST SQL COMMAND GOES HERE
431
+ sqlite> YOUR SECOND SQL COMMAND GOES HERE
432
+ sqlite> ...
433
+ sqlite> YOUR FINAL SQL COMMAND GOES HERE
434
+ sqlite> .quit
435
+ ```
436
+
437
+ Second, we provide a simple example of using `sqlite3` with SQL
438
+ commands stored in a text file. This approach is useful if you want
439
+ to tabulate many different output files in the same way. This second
440
+ example assumes that the first example has already been done.
441
+
442
+ ```
443
+ % cat tab.sql
444
+ .mode column
445
+
446
+ .print *** unweighted and weighted tax unit counts:
447
+ SELECT
448
+ COUNT(*) AS raw_count, -- unweighted count of tax units (#)
449
+ ROUND(SUM(s006)*1e-6, 3) AS wgh_count -- weighted count of tax units (#M)
450
+ from base;
451
+
452
+ .print *** weighted tax unit counts by filing status (MARS):
453
+ .width 4 -9
454
+ SELECT
455
+ MARS, -- tax filing status
456
+ ROUND(SUM(s006)*1e-6, 3) AS wgh_count -- weighted count of tax units (#M)
457
+ FROM base
458
+ GROUP BY MARS;
459
+ .headers off
460
+ SELECT
461
+ 'A', -- tax filing status
462
+ ROUND(SUM(s006)*1e-6, 3) AS wgh_count -- weighted count of tax units (#M)
463
+ FROM base;
464
+ .headers on
465
+
466
+ .print *** specify base.income_group
467
+ UPDATE base SET income_group =
468
+ CASE -- specify the income_group brackets as desired
469
+ WHEN expanded_income < 0.0 THEN 0
470
+ WHEN expanded_income < 50.0e3 THEN 1
471
+ WHEN expanded_income < 100.0e3 THEN 2
472
+ WHEN expanded_income < 500.0e3 THEN 3
473
+ WHEN expanded_income < 1.0e6 THEN 4
474
+ ELSE 5
475
+ END;
476
+
477
+ .print *** tabulate weighted tax units and baseline.iitax by income_group:
478
+ .width 1 -9 -9 -9 -9
479
+ SELECT
480
+ income_group AS g, -- income_group
481
+ ROUND(SUM(s006)*1e-6, 3) AS units, -- tax units (#M)
482
+ ROUND(SUM(s006*b.iitax)*1e-9, 3) AS b_iitax, -- baseline iitax ($B)
483
+ ROUND(SUM(s006*r.iitax)*1e-9, 3) AS r_iitax, -- reform iitax ($B)
484
+ ROUND(SUM(s006*(r.iitax-b.iitax))*1e-9, 3) AS r_b_diff -- reform-baseline diff
485
+ FROM base JOIN baseline AS b USING(RECID) JOIN reform AS r USING(RECID)
486
+ GROUP BY income_group;
487
+ .headers off
488
+ SELECT
489
+ 'A' AS g, -- all income groups
490
+ ROUND(SUM(s006)*1e-6, 3) AS units, -- tax units (#M)
491
+ ROUND(SUM(s006*b.iitax)*1e-9, 3) AS b_iitax, -- baseline iitax ($B)
492
+ ROUND(SUM(s006*r.iitax)*1e-9, 3) AS r_iitax, -- reform iitax ($B)
493
+ ROUND(SUM(s006*(r.iitax-b.iitax))*1e-9, 3) AS r_b_diff -- reform-baseline diff
494
+ FROM base JOIN baseline AS b USING(RECID) JOIN reform AS r USING(RECID);
495
+ .headers on
496
+ ```
497
+
498
+ Using this `tab.sql` script to tabulate the `cps-24-#-ref3-#.db`
499
+ database produces these results in about 1.3 seconds:
500
+
501
+ ```
502
+ % sqlite3 cps-24-#-ref3-#.db < tab.sql
503
+ *** unweighted and weighted tax unit counts:
504
+ raw_count wgh_count
505
+ --------- ---------
506
+ 280005 214.876
507
+ *** weighted tax unit counts by filing status (MARS):
508
+ MARS wgh_count
509
+ ---- ---------
510
+ 1 120.117
511
+ 2 71.899
512
+ 3 4.191
513
+ 4 18.67
514
+ A 214.876
515
+ *** specify base.income_group
516
+ *** tabulate weighted tax units and baseline.iitax by income_group:
517
+ g units b_iitax r_iitax r_b_diff
518
+ - --------- --------- --------- ---------
519
+ 0 0.105 0.0 0.0 0.0
520
+ 1 88.203 -5.16 -26.722 -21.563
521
+ 2 62.213 121.065 52.266 -68.798
522
+ 3 61.721 1043.226 823.515 -219.711
523
+ 4 1.85 261.946 247.438 -14.508
524
+ 5 0.784 499.231 492.709 -6.521
525
+ A 214.876 1920.308 1589.207 -331.101
526
+ ```
527
+
528
+ Notice the -331.101 aggregate change in income tax liability induced
529
+ by the reform is essentially the same as the -331.1 amount in the
530
+ --tables output above, although the income subgroups amounts differ
531
+ because the income groups are defined in different ways.
@@ -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:_
@@ -100,7 +100,7 @@ _IRS Form Location:_
100
100
 
101
101
 
102
102
  ## `iitax`
103
- _Description_: Total federal individual income tax liability; appears as INCTAX variable in tc CLI minimal output
103
+ _Description_: Total federal individual income tax liability
104
104
  _Datatype_: float
105
105
  _IRS Form Location:_
106
106
  2013-2013: 1040 line 61 minus line 56 minus line 60a
@@ -123,7 +123,7 @@ _IRS Form Location:_
123
123
 
124
124
 
125
125
  ## `payrolltax`
126
- _Description_: Total (employee + employer) payroll tax liability; appears as PAYTAX variable in tc CLI minimal output (payrolltax = ptax_was + setax + ptax_amc)
126
+ _Description_: Total (employee + employer) payroll tax liability (payrolltax = ptax_was + setax + ptax_amc)
127
127
  _Datatype_: float
128
128
  _IRS Form Location:_
129
129
  2013-2013: OASDI+HI FICA plus 1040 lines 56 and 60a
@@ -622,7 +622,7 @@ _IRS Form Location:_
622
622
 
623
623
 
624
624
  ## `lumpsum_tax`
625
- _Description_: Lumpsum (or head) tax; appears as LSTAX variable in tc CLI minimal output
625
+ _Description_: Lumpsum (or head) tax
626
626
  _Datatype_: float
627
627
  _IRS Form Location:_
628
628
  2013-20??: calculated variable