Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reform documentation to standard output of Tax-Calculator CLI, tc #1567

Merged
merged 5 commits into from Sep 26, 2017
Merged

Add reform documentation to standard output of Tax-Calculator CLI, tc #1567

merged 5 commits into from Sep 26, 2017

Conversation

martinholmer
Copy link
Collaborator

@martinholmer martinholmer commented Sep 25, 2017

This pull request uses the capabilities added in pull request #1564 to have tc, the command-line interface (CLI) to Tax-Calculator, always output reform documentation in a file ending in -doc.text.

Here is an example of the documentation using the Brown-Khanna GAIN Act as the reform.

$ cat BK.json
// Title: Brown-Khanna Grow American Incomes Now (GAIN) Act of 2017
// Reform_File_Author: Matt Jensen
// Reform_Reference: https://khanna.house.gov/media/press-releases/release-sen-sherrod-brown-and-rep-ro-khanna-introduce-landmark-legislation
// Reform_Description:
// - Increase EITC maximum amounts (1)
// - Increase EITC phase-in rates (2)
// - Increase EITC phase-out rate for childless filing units (3)
// - Increase EITC phase-out start for childless filing units (4)
// - Lower EITC minimim eligibility age for childless f.units from 25 to 21 (5)
// Reform_Parameter_Map:
// - 1: _EITC_c
// - 2: _EITC_rt
// - 3: _EITC_prt
// - 4: _EITC_ps
// - 5: _EITC_MinEligAge
{
  "policy": {
      "_EITC_c": {"2017": [[3000, 6528, 10783, 12131]]},
      "_EITC_rt": {"2017": [[0.3, 0.6258, 0.768, 0.864]]},
      "_EITC_prt": {"2017": [[0.1598, 0.1598, 0.2106, 0.2106]]},
      "_EITC_ps": {"2017": [[18340, 18340, 18340, 18340]]},
      "_EITC_MinEligAge": {"2017": [21]}
    }
}

$ tc puf.csv 2017 --reform BK.json 
You loaded data for 2009.
Tax-Calculator startup automatically extrapolated your data to 2017.

$ ls -l puf-17-BK*
-rw-r--r--  1 mrh  staff     1533 Sep 25 15:44 puf-17-BK-#-doc.text
-rw-r--r--  1 mrh  staff  8823846 Sep 25 15:44 puf-17-BK-#.csv

$ cat puf-17-BK-#-doc.text
iMac2:tax-calculator mrh$ cat puf-17-BK-#-doc.text 
REFORM DOCUMENTATION
Baseline Growth-Difference Assumption Values by Year:
none: using default baseline growth assumptions
Policy Reform Parameter Values by Year:
2017:
 _EITC_MinEligAge : 21
  name: Minimum Age for Childless EITC Eligibility
  desc: For a childless filling unit, at least one individual's age needs to
        be no less than this age (but no greater than the EITC_MaxEligAge) in
        order to be eligible for an earned income tax credit.
  baseline_value: 25.0
 _EITC_c : [3000, 6528, 10783, 12131]
           ['0kids', '1kid', '2kids', '3+kids']
  name: Maximum earned income credit
  desc: This is the maximum amount of earned income credit taxpayers are
        eligible for; it depends on how many kids they have.
  baseline_value: [510.0, 3400.0, 5616.0, 6318.0]
 _EITC_prt : [0.1598, 0.1598, 0.2106, 0.2106]
             ['0kids', '1kid', '2kids', '3+kids']
  name: Earned income credit phaseout rate
  desc: Earned income credit begins to decrease at the this rate when AGI is
        higher than earned income credit phaseout start AGI.
  baseline_value: [0.0765, 0.1598, 0.2106, 0.2106]
 _EITC_ps : [18340, 18340, 18340, 18340]
            ['0kids', '1kid', '2kids', '3+kids']
  name: Earned income credit phaseout start AGI
  desc: If AGI is higher than this threshold, the amount of EITC will start to
        decrease at the phaseout rate.
  baseline_value: [8340.0, 18340.0, 18340.0, 18340.0]
 _EITC_rt : [0.3, 0.6258, 0.768, 0.864]
            ['0kids', '1kid', '2kids', '3+kids']
  name: Earned income credit phasein rate
  desc: Pre-phaseout credit is minimum of this rate times earnings and the
        maximum earned income credit.
  baseline_value: [0.0765, 0.34, 0.4, 0.45]

@MattHJensen @feenberg @Amy-Xu @andersonfrailey @hdoupe @GoFroggyRun @codykallen

@codecov-io
Copy link

codecov-io commented Sep 25, 2017

Codecov Report

Merging #1567 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1567   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          37      37           
  Lines        2722    2732   +10     
======================================
+ Hits         2722    2732   +10
Impacted Files Coverage Δ
taxcalc/calculate.py 100% <ø> (ø) ⬆️
taxcalc/taxcalcio.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0ff4a3...5210a6b. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants