PSLmodels / OG-USA

Overlapping-generations macroeconomic model for evaluating fiscal policy in the United States
https://pslmodels.github.io/OG-USA/
Creative Commons Zero v1.0 Universal
19 stars 34 forks source link

Add more flexibility in data for use with Tax-Calculator #114

Closed jdebacker closed 1 month ago

jdebacker commented 1 month ago

This PR updates OG-USA to use the TMD datafile for Tax-Calculator -- and allows users to import a custom datafile with associated growth factors and weights.

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 82.35294% with 3 lines in your changes missing coverage. Please review.

Project coverage is 73.15%. Comparing base (29acbee) to head (60a8920).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/114/graphs/tree.svg?width=650&height=150&src=pr&token=XOLXIKEL86&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/114?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #114 +/- ## ========================================== - Coverage 73.29% 73.15% -0.14% ========================================== Files 11 11 Lines 865 868 +3 ========================================== + Hits 634 635 +1 - Misses 231 233 +2 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/114/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/114/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `73.15% <82.35%> (-0.14%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/114?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [ogusa/calibrate.py](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/114?src=pr&el=tree&filepath=ogusa%2Fcalibrate.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2d1c2EvY2FsaWJyYXRlLnB5) | `37.76% <100.00%> (+0.43%)` | :arrow_up: | | [ogusa/constants.py](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/114?src=pr&el=tree&filepath=ogusa%2Fconstants.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2d1c2EvY29uc3RhbnRzLnB5) | `100.00% <ø> (ø)` | | | [ogusa/get\_micro\_data.py](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/114?src=pr&el=tree&filepath=ogusa%2Fget_micro_data.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-b2d1c2EvZ2V0X21pY3JvX2RhdGEucHk=) | `94.02% <81.25%> (-2.80%)` | :arrow_down: |
rickecon commented 1 month ago

@jdebacker. There another place where you might want to update the version to 0.1.9.

I went ahead and committed this change.

jdebacker commented 1 month ago

@jdebacker. There another place where you might want to update the version to 0.1.9. in lines 80-81 of ./cs-config/cs_config/functions.py, it looks like the get_version() function is calling an old version of OG-USA (v. 0.1.2). I went ahead and committed this change.

Ok - I noticed that, but decided to ignore since (1) it should read the version from the ogusa package and not be hardcoded like that and (2) I'm now convinced these cs-config files should be removed from the repo (but that will be done in a future PR).

rickecon commented 1 month ago

@jdebacker. This looks great and all tests have passed. Merging.