From 87bf4b8ff005f009e2542234ba93380d4c7df787 Mon Sep 17 00:00:00 2001 From: MarionetteSHF Date: Mon, 17 Jan 2022 09:47:20 -0500 Subject: [PATCH 1/4] add hello world --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 513b7a0..bbff6c9 100644 --- a/README.md +++ b/README.md @@ -116,3 +116,4 @@ class CustomDataset: ### ACS - OpenFisca-US-compatible - Contains OpenFisca-US-compatible input arrays. +###hello world \ No newline at end of file From dac5e16c390194edc1707f7f27dcfd392cb28104 Mon Sep 17 00:00:00 2001 From: MarionetteSHF Date: Mon, 17 Jan 2022 09:49:37 -0500 Subject: [PATCH 2/4] add hello world --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bbff6c9..ffbca91 100644 --- a/README.md +++ b/README.md @@ -116,4 +116,4 @@ class CustomDataset: ### ACS - OpenFisca-US-compatible - Contains OpenFisca-US-compatible input arrays. -###hello world \ No newline at end of file +### hello world \ No newline at end of file From 279368f72b72a6dc354089ea2c6db88599e5036c Mon Sep 17 00:00:00 2001 From: MarionetteSHF Date: Mon, 17 Jan 2022 09:52:42 -0500 Subject: [PATCH 3/4] Two hellow --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ffbca91..28e407b 100644 --- a/README.md +++ b/README.md @@ -116,4 +116,4 @@ class CustomDataset: ### ACS - OpenFisca-US-compatible - Contains OpenFisca-US-compatible input arrays. -### hello world \ No newline at end of file +### hello world hello \ No newline at end of file From c72f37642a5e2f9b0f4c953140d13ddef7888720 Mon Sep 17 00:00:00 2001 From: MarionetteSHF Date: Sat, 22 Jan 2022 20:51:53 -0500 Subject: [PATCH 4/4] define tax_unit_function --- openfisca_us_data/datasets/cps/cps.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openfisca_us_data/datasets/cps/cps.py b/openfisca_us_data/datasets/cps/cps.py index a5e9982..c3c9c5a 100644 --- a/openfisca_us_data/datasets/cps/cps.py +++ b/openfisca_us_data/datasets/cps/cps.py @@ -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) raw_data.close() cps.close() @@ -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): + 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