-
-
Notifications
You must be signed in to change notification settings - Fork 159
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 utility functions that generate a change-in-aftertax-income-by-decile graph #1606
Add utility functions that generate a change-in-aftertax-income-by-decile graph #1606
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1606 +/- ##
======================================
Coverage 100% 100%
======================================
Files 37 37
Lines 2786 2852 +66
======================================
+ Hits 2786 2852 +66
Continue to review full report at Codecov.
|
This is fantastic. Thanks @martinholmer! What do you think about calling it "income" instead of "expanded income" and then add an optional note(s) on the bottom that defines what "income" is? Could also have an optional source label that gives tax-calculator version. I don't see either of these possible enhancements as necessary for merging this PR, though. |
As part of an extensive discussion in issue #1592, @MattHJensen made an excellent suggestion about how to improve the proposed graph:
Pull request #1606 has been updated to change the graph along these lines. Here is the graph (without any axis labels) for the reform described here: Any suggestions about how to further improve the graph are welcome. @evtedeschi3 @feenberg @Amy-Xu @andersonfrailey @hdoupe @GoFroggyRun @codykallen @hayleefay |
@MattHJensen asked:
The default axis labels are meant for a technical audience, so I think it is appropriate to use the term "expanded income", which clarifies what income concept is being used. However, the proposed I don't know how to use bokeh to generate "note(s) on the bottom" or an "optional source label". |
This looks great. |
This pull request, which is built on pull request #1605, adds two new functions to the
utils.py
file:dec_graph_data
anddec_graph_plot
. Working together, these two functions generate a horizontal bar chart showing the percent change in after-tax expanded income induced by a tax reform for each of twelve expanded-income groups: the lower nine deciles plus the bottom half of the top decile, the next four percentiles, and the top percentile. The generated graph looks similar to the New York Times graph shown in issue #1592 except that only the total reform effect is shown (that is, there is no detail for any of the reform's component provisions). In other words, I don't get any "bonus points".Here is example that shows what the generated graph looks like. This example analyzes a revenue-neutral reform that broadens the OASDI FICA tax base and reduces the OASDI FICA tax rate beginning in 2020.
The functions can be used to generate a graph without labels on the axes (like in the New York Times) or with labels on the axes (which might be useful detail for a more technical audience). The no-axis-labels code and graph are shown first, then the other version after that.
No Axis Labels
With Axis Labels
Any comments or suggestions are welcome.
After an extended review period (and possible revisions to this graph), this graph will be added to the output generated by the
--graphs
option of the Tax-Calculator CLI,tc
, in another pull request.