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

Correct build table names for "Copy", "CSV" and "Excel" #675

Merged
merged 3 commits into from
Oct 30, 2017

Conversation

GoFroggyRun
Copy link
Contributor

@GoFroggyRun GoFroggyRun commented Oct 2, 2017

Per @martinholmer's finding in #629, the regular expression doesn't exactly match, and, as a result, the title name produced for "CSV", "Copy" and "Excel" buttons are not correct for distribution tables. This PR fixes this bug by modifying and matching the regular expression. After the fix, the output generated by the "Print" button would be:

BASE PLAN TAX VARS, WEIGHTED TOTAL BY EXPANDED INCOME BIN (2017)
    Returns AGI Standard Deduction Filers   Standard Deduction  Itemizers   Itemized Deduction  Personal Exemption  Taxable Income  AMT Individual Income Tax Liabilities   Payroll Tax Liablities  Combined Payroll and Individual Income Tax Liabilities
    Thousands   Billions    Thousands   Billions    Thousands   Billions    Billions    Billions    Billions    Billions    Billions    Billions
Less than 10    23,157  89.6    21,147  145.9   21  0.1 92.8    3.3 0.0 -8.2    12.3    4.1
10-20   24,467  237.4   19,341  189.0   397 4.5 154.5   35.7    0.0 -33.6   33.5    -0.1
20-30   18,943  321.4   16,568  152.7   929 13.2    131.7   96.9    0.1 -16.6   42.4    25.8
30-40   16,372  423.7   14,106  132.8   1,834   27.7    120.0   183.5   0.0 2.7 52.9    55.6
40-50   13,283  484.3   10,748  103.3   2,465   39.5    98.1    261.8   0.0 22.2    58.0    80.3
50-75   22,758  1,216.4 15,426  160.8   7,299   133.3   179.9   752.8   0.1 88.8    136.1   224.9
75-100  13,548  1,070.8 7,137   80.5    6,406   129.1   118.6   743.8   0.1 102.0   120.7   222.7
100-200 23,024  2,964.9 6,621   80.7    16,399  413.4   243.9   2,228.5 1.6 367.0   359.9   726.9
200-500 7,922   2,148.3 648 7.9 7,270   305.6   80.5    1,755.4 21.5    409.2   200.7   609.9
500-1000    1,179   772.0   101 1.2 1,076   81.1    0.1 691.3   7.9 202.5   38.1    240.6
1000+   636 1,867.9 88  1.1 544 121.9   0.0 1,748.9 14.3    564.7   32.9    597.6
All 170,055 11,445.6    111,948 1,091.8 44,641  1,269.7 1,248.8 8,502.5 45.7    1,700.2 1,089.9 2,790.1
Source: http://127.0.0.1:8000/taxbrain/43/                                              

for distribution table,

COMBINED PAYROLL AND INDIVIDUAL INCOME TAX: DIFFERENCE BETWEEN BASE AND USER PLANS BY EXPANDED INCOME BIN (2017)
    Tax Units with Tax Cut  Tax Units with Tax Increase Count   Average Tax Change  Total Tax Difference    Percent with Tax Increase   Percent with Tax Decrease   Share of Overall Change
    Thousands   Thousands   Thousands       Billions            
Less than 10    17,423  0   23,170  -7  -0.2    0.0 75.2    1.2
10-20   16,263  0   24,458  -18 -0.4    0.0 66.5    3.2
20-30   13,070  0   19,064  -29 -0.6    0.0 68.6    4.1
30-40   11,659  0   16,252  -42 -0.7    0.0 71.7    5.0
40-50   10,082  0   13,300  -57 -0.8    0.0 75.8    5.6
50-75   17,910  0   22,762  -78 -1.8    0.0 78.7    13.1
75-100  11,494  0   13,551  -116    -1.6    0.0 84.8    11.6
100-200 21,209  0   23,009  -202    -4.6    0.0 92.2    34.5
200-500 7,453   0   7,911   -303    -2.4    0.0 94.2    17.8
500-1000    1,061   0   1,178   -294    -0.3    0.0 90.0    2.6
1000+   536 0   635 -245    -0.2    0.0 84.4    1.2
All 128,713 0   170,055 0   -13.5   0   0   100.0
Source: http://127.0.0.1:8000/taxbrain/43/                              

for difference table, and

TOTAL LIABILITIES BY CALENDAR YEAR (CHANGE)
    2017    2018    2019    2020    2021    2022    2023    2024    2025    2026    Total
    Billions    Billions    Billions    Billions    Billions    Billions    Billions    Billions    Billions    Billions    Billions
Individual Income Tax Liability Change  0.0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.6
Payroll Tax Liability Change    -13.5   -14.1   -14.6   -15.2   -15.7   -16.3   -17.0   -17.7   -18.4   -19.1   -161.6
Combined Payroll and Individual Income Tax Liability Change -13.5   -14.1   -14.6   -15.1   -15.7   -16.3   -16.9   -17.6   -18.3   -19.0   -161.0
Source: http://127.0.0.1:8000/taxbrain/43/                                          

for liability table.

"Excel" outputs and "CSV" outputs have been modified in the same way to produce consistent tables.

cc @brittainhard @martinholmer @MattHJensen

@GoFroggyRun
Copy link
Contributor Author

@hdoupe I have fixed the conflicts in this PR, and we might want to include this in 1.1.0 release.

@hdoupe
Copy link
Collaborator

hdoupe commented Oct 30, 2017

@GoFroggyRun This looks good. Are you going to fix the extra print page in another PR?

@GoFroggyRun
Copy link
Contributor Author

@hdoupe probably not. My approaches aren't working for some reason.

@hdoupe
Copy link
Collaborator

hdoupe commented Oct 30, 2017

@GoFroggyRun Ok, we can table the extra print page portion of #629 for a future PR and merge this now.

@hdoupe hdoupe merged commit 6abbc7f into ospc-org:master Oct 30, 2017
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.

2 participants