PSLmodels / Tax-Calculator

USA Federal Individual Income and Payroll Tax Microsimulation Model
https://taxcalc.pslmodels.org
Other
262 stars 157 forks source link

Add weights_scale attribute to the Records and Data classes #2828

Closed martinholmer closed 2 days ago

martinholmer commented 5 days ago

Provides flexibility in converting weights in the *_weights.csv.gz files into s006 values.

This flexibility is essential when using tax-microdata area weights as described in TMD PR #264.

codecov[bot] commented 5 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.42%. Comparing base (cfca1d5) to head (163d040). Report is 8 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2828/graphs/tree.svg?width=650&height=150&src=pr&token=KqtTvRSNjQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2828?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #2828 +/- ## ======================================= Coverage 99.42% 99.42% ======================================= Files 13 13 Lines 2615 2616 +1 ======================================= + Hits 2600 2601 +1 Misses 15 15 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2828/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/Tax-Calculator/pull/2828/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `99.42% <100.00%> (+<0.01%)` | :arrow_up: | 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 with missing lines](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2828?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [taxcalc/\_\_init\_\_.py](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2828?src=pr&el=tree&filepath=taxcalc%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-dGF4Y2FsYy9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [taxcalc/data.py](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2828?src=pr&el=tree&filepath=taxcalc%2Fdata.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-dGF4Y2FsYy9kYXRhLnB5) | `99.25% <100.00%> (+<0.01%)` | :arrow_up: | | [taxcalc/records.py](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2828?src=pr&el=tree&filepath=taxcalc%2Frecords.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-dGF4Y2FsYy9yZWNvcmRzLnB5) | `100.00% <100.00%> (ø)` | | | [taxcalc/taxcalcio.py](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2828?src=pr&el=tree&filepath=taxcalc%2Ftaxcalcio.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#diff-dGF4Y2FsYy90YXhjYWxjaW8ucHk=) | `100.00% <100.00%> (ø)` | |