@@ -444,7 +444,7 @@ def add_rent(self, cps: h5py.File, person: DataFrame, household: DataFrame):
444444 # Assume zero housing assistance since
445445 cps ["pre_subsidy_rent" ] = cps ["rent" ]
446446 cps ["housing_assistance" ] = np .zeros_like (
447- cps ["spm_unit_capped_housing_subsidy_reported " ]
447+ cps ["spm_unit_capped_housing_subsidy_data " ]
448448 )
449449 cps ["real_estate_taxes" ] = np .zeros (len (cps ["age" ]), dtype = float )
450450 cps ["real_estate_taxes" ][mask ] = imputed_values ["real_estate_taxes" ]
@@ -633,6 +633,9 @@ def add_takeup(self):
633633 data ["age" ],
634634 )
635635
636+ for source_anchor in ("snap_reported" , "ssi_reported" ):
637+ data .pop (source_anchor , None )
638+
636639 self .save_dataset (data )
637640
638641
@@ -1260,9 +1263,8 @@ def add_personal_income_variables(cps: h5py.File, person: DataFrame, year: int):
12601263 # The code for strike benefits is 12.
12611264 cps ["strike_benefits" ] = (person .OI_OFF == 12 ) * person .OI_VAL
12621265 cps ["child_support_received" ] = person .CSP_VAL
1263- # Assume all public assistance / welfare dollars (PAW_VAL) are TANF.
1264- # They could also include General Assistance.
1265- cps ["tanf_reported" ] = person .PAW_VAL
1266+ # CPS SSI receipt anchors SSI take-up and disability alignment inside
1267+ # add_takeup; it is dropped before the dataset is saved.
12661268 cps ["ssi_reported" ] = person .SSI_VAL
12671269 # Allocate CPS RETCB_VAL (a single bundled retirement contribution
12681270 # total) into account-type-specific variables using a proportional
@@ -1397,15 +1399,8 @@ def add_spm_variables(self, cps: h5py.File, spm_unit: DataFrame) -> None:
13971399 SPM_RENAMES = dict (
13981400 spm_unit_total_income_reported = "SPM_TOTVAL" ,
13991401 snap_reported = "SPM_SNAPSUB" ,
1400- spm_unit_capped_housing_subsidy_reported = "SPM_CAPHOUSESUB" ,
1401- free_school_meals_reported = "SPM_SCHLUNCH" ,
1402- spm_unit_energy_subsidy_reported = "SPM_ENGVAL" ,
1403- spm_unit_wic_reported = "SPM_WICVAL" ,
1404- spm_unit_broadband_subsidy_reported = "SPM_BBSUBVAL" ,
1405- spm_unit_payroll_tax_reported = "SPM_FICA" ,
1406- spm_unit_federal_tax_reported = "SPM_FEDTAX" ,
1407- # State tax includes refundable credits.
1408- spm_unit_state_tax_reported = "SPM_STTAX" ,
1402+ spm_unit_capped_housing_subsidy_data = "SPM_CAPHOUSESUB" ,
1403+ spm_unit_energy_subsidy_data = "SPM_ENGVAL" ,
14091404 spm_unit_capped_work_childcare_expenses = "SPM_CAPWKCCXPNS" ,
14101405 spm_unit_net_income_reported = "SPM_RESOURCES" ,
14111406 spm_unit_pre_subsidy_childcare_expenses = "SPM_CHILDCAREXPNS" ,
@@ -1425,8 +1420,6 @@ def add_spm_variables(self, cps: h5py.File, spm_unit: DataFrame) -> None:
14251420 spm_unit .SPM_TENMORTSTATUS .map (tenure_map ).fillna ("RENTER" ).astype ("S" )
14261421 )
14271422
1428- cps ["reduced_price_school_meals_reported" ] = cps ["free_school_meals_reported" ] * 0
1429-
14301423
14311424@pipeline_node (
14321425 PipelineNode (
0 commit comments