PolicyEngine / policyengine-us

The PolicyEngine US Python package contains a rules engine of the US tax-benefit system, and microdata generation for microsimulation analysis.
https://policyengine.org/us
GNU Affero General Public License v3.0
95 stars 168 forks source link

Remove 2023 hard-coding from microdata generation #4108

Closed MaxGhenis closed 3 months ago

MaxGhenis commented 4 months ago

2023 shows up in a couple parts of the microdata generation, aside from #4032. 2023 has no significance: we should either use 2022 as the CPS base year (ideally storing this as a constant for the most recent CPS base year) or the existing CURRENT_YEAR constant (currently 2024) if needed.

https://github.com/PolicyEngine/policyengine-us/blob/df6565293d92a9c820652d9a5baeb182e21ae469/policyengine_us/data/datasets/cps/enhanced_cps/calibrate.py#L35

https://github.com/PolicyEngine/policyengine-us/blob/df6565293d92a9c820652d9a5baeb182e21ae469/policyengine_us/data/datasets/cps/enhanced_cps/loss.py#L14

https://github.com/PolicyEngine/policyengine-us/blob/df6565293d92a9c820652d9a5baeb182e21ae469/policyengine_us/data/datasets/cps/enhanced_cps/loss.py#L331

And this seems like these should start at 2022:

https://github.com/PolicyEngine/policyengine-us/blob/df6565293d92a9c820652d9a5baeb182e21ae469/policyengine_us/data/datasets/cps/enhanced_cps/update_dashboard.py#L9

https://github.com/PolicyEngine/policyengine-us/blob/df6565293d92a9c820652d9a5baeb182e21ae469/policyengine_us/data/datasets/cps/enhanced_cps/run_calibration.py#L20-L21

nikhilwoodruff commented 4 months ago

Confirmed that these are all defaults, and not affecting the 2022 Enhanced CPS

MaxGhenis commented 4 months ago

One more:

https://github.com/PolicyEngine/policyengine-us/blob/8baef633d23a923638d17dfb83f64b0e00083bda/policyengine_us/tests/microsimulation/calibration/test_calibration.py#L3-L10