Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,4 @@ class CustomDataset:
### ACS
- OpenFisca-US-compatible
- Contains OpenFisca-US-compatible input arrays.
### hello world hello
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### hello world hello

10 changes: 9 additions & 1 deletion openfisca_us_data/datasets/cps/cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def generate(year: int) -> None:
add_personal_variables(cps, person)
add_personal_income_variables(cps, person)
add_SPM_variables(cps, spm_unit)

add_tax_unit_variables(cps, tax_unit)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
add_tax_unit_variables(cps, tax_unit)

raw_data.close()
cps.close()

Expand Down Expand Up @@ -147,3 +147,11 @@ def add_SPM_variables(cps: h5py.File, spm_unit: DataFrame):

for openfisca_variable, asec_variable in SPM_RENAMES.items():
cps[openfisca_variable] = spm_unit[asec_variable]


def add_tax_unit_variables(cps: h5py.File, tax_unit: DataFrame):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this bit from this PR since it's done in OpenFisca-US.

cps["e00200p"] = tax_unit.ACTC_CRD
cps["e00200s"] = tax_unit.AGI
cps["e00900s"] = tax_unit.CTC_CRD
cps["pencon_p"] = tax_unit.FED_RET
cps["pencon_s"] = tax_unit.MARG_TAX