-
-
Notifications
You must be signed in to change notification settings - Fork 157
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 Calculator.pch_graph method and associated utility functions #1890
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1890 +/- ##
======================================
Coverage 100% 100%
======================================
Files 37 37
Lines 3301 3362 +61
======================================
+ Hits 3301 3362 +61
Continue to review full report at Codecov.
|
Given the extensive discussion in issue #1888, it would seem that the graph in pull request #1890 is consistent with a range of future changes in the handling of filing units with non-positive |
This pull request adds a new graph method to the Calculator class. The new
pch_graph
method generates a graph in which the percentage change in after-tax expanded income (cause by a policy reform) is plotted for each baseline expanded-income percentile except for percentiles that contain filing units with negative or zero baseline expanded income. This graph, therefore, avoids any distortions caused by some filing units having negative or zero baseline expanded income. These filing units are in the bottom several percentiles, but those percentiles are not shown in the graph.This pull request resolves the issue discussed in #1888 by using this graph in the
tc --graphs
output (instead of the decile or quintile graphs that include filing units with negative income) and by making several documentation changes that clarify whether a table or graph includes filing units with negative income.Here is an example of what the new graph looks like. The following graph is generated using
puf.csv
data and the reform from the basic recipe in the Cookbook of Tested Recipes for Python Programming with Tax-Calculator:Here is the new graph for this example: