PolicyEngine / openfisca-us-data

Python package to standardise loading input datasets to OpenFisca-US.
4 stars 3 forks source link

Use file year of year+1 when loading raw CPS #34

Closed MaxGhenis closed 2 years ago

MaxGhenis commented 2 years ago

Fixes #25

nikhilwoodruff commented 2 years ago

@MaxGhenis looks good - think we just need to change the test year in the pytest file?

MaxGhenis commented 2 years ago

@MaxGhenis do you know which of these we could use to test 2019?

I think it should be the most recent, since the 2019 file was the latest available as of that June 2021 PR

MaxGhenis commented 2 years ago

When running openfisca-us-data raw_cps generate 2020 I'm getting:

File "/home/mghenis/PolicyEngine/openfisca-us-data/openfisca_us_data/datasets/cps/raw_cps.py", line 16, in generate file_year = year + 1 TypeError: can only concatenate str (not "int") to str

nikhilwoodruff commented 2 years ago

When running openfisca-us-data raw_cps generate 2020 I'm getting:

File "/home/mghenis/PolicyEngine/openfisca-us-data/openfisca_us_data/datasets/cps/raw_cps.py", line 16, in generate

file_year = year + 1

TypeError: can only concatenate str (not "int") to str

Ok this is because the CLI argument is read as a string- should just need to use int(year) instead of year.

nikhilwoodruff commented 2 years ago

@MaxGhenis do you know why the test now fails? Trying to work out if we're using the wrong year comparison with taxcalc, but I don't think we are...

MaxGhenis commented 2 years ago

@MaxGhenis do you know why the test now fails? Trying to work out if we're using the wrong year comparison with taxcalc, but I don't think we are...

Previously we were comparing 2020 taxcalc numbers against 2019 CPS numbers. We're now comparing 2020 with 2020. We shouldn't expect these to match since taxcalc is generating its own tax-unit-level weights, so I think we should just up the tolerance and investigate deltas separately.