-
-
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
Refactor functions in the taxcalc.tbi subpackage and elsewhere #2087
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #2087 +/- ##
==========================================
+ Coverage 99.91% 99.91% +<.01%
==========================================
Files 16 16
Lines 3467 3518 +51
==========================================
+ Hits 3464 3515 +51
Misses 3 3
Continue to review full report at Codecov.
|
martinholmer
changed the title
Refactor functions in the taxcalc.tbi subpackage
Refactor functions in the taxcalc.tbi subpackage and elsewhere
Oct 19, 2018
Thanks for these changes @martinholmer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors functions in the taxcalc/tbi directory so that other models in the Policy Simulation Library (PSL) collection of USA tax models can easily produce the aggregate and distributional tables expected by the TaxBrain web application. It also adds several new tests; the old test results are unchanged. It contains no changes in tax logic or tax results (but see the bottom of this comment).
In the course of this work, the logic of the functions that create the (distribution, difference, aggregate, and diagnostic) results tables has been modified so that the table entries are scaled. Count variables are expressed in millions of filing units and amount variables are expressed in billions of dollars. These scaling changes, which were agreed to in the discussion of #2043, relieves TaxBrain developers of the tedious task of scaling each column of each table in TaxBrain code.
Also, a bug was fixed in commit 425a38f. Ever since the
ubi
,benefit_cost_total
, andbenefit_value_total
variables were added to the difference table (in PR #1919, which was merged on 2018-03-14, and in PR #1925, which was merged on 2018-03-15), they have been incorrect. Since March they have not been reform-baseline differences (which is what should be in the difference table), but rather reform levels (which are appropriate only for the distribution table). This problem, which has never been reported by any users of Tax-Calculator or TaxBrain, has now been fixed. The fact that no users of Tax-Calculator or TaxBrain reported this bug over a seven month period of time is an interesting observation about how people use the model and what results they look at.