From 9e759c5839d810e8dcb58edb3c3ba3dd0ec0e657 Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff Date: Fri, 23 Aug 2024 10:56:29 +0200 Subject: [PATCH] Add uprating --- .gitignore | 4 +- .../data_storage/uprating_factors.csv | 111 ++++++++++++++++ .../data_storage/uprating_growth_factors.csv | 111 ++++++++++++++++ policyengine_us_data/datasets/cps/__init__.py | 3 +- .../cps/{policyengine_cps.py => cps.py} | 9 +- .../datasets/cps/enhanced_cps.py | 3 +- .../datasets/cps/extended_cps.py | 125 ++++++++++++++++++ policyengine_us_data/datasets/puf/__init__.py | 2 +- .../puf/{policyengine_puf.py => puf.py} | 0 .../test_datasets/test_policyengine_cps.py | 4 +- 10 files changed, 360 insertions(+), 12 deletions(-) create mode 100644 policyengine_us_data/data_storage/uprating_factors.csv create mode 100644 policyengine_us_data/data_storage/uprating_growth_factors.csv rename policyengine_us_data/datasets/cps/{policyengine_cps.py => cps.py} (98%) create mode 100644 policyengine_us_data/datasets/cps/extended_cps.py rename policyengine_us_data/datasets/puf/{policyengine_puf.py => puf.py} (100%) diff --git a/.gitignore b/.gitignore index e81975a..a186ec8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ **/*.h5 *.ipynb **/*.csv -!soi.csv \ No newline at end of file +!soi.csv +!uprating_factors.csv +!uprating_growth_factors.csv diff --git a/policyengine_us_data/data_storage/uprating_factors.csv b/policyengine_us_data/data_storage/uprating_factors.csv new file mode 100644 index 0000000..b55182a --- /dev/null +++ b/policyengine_us_data/data_storage/uprating_factors.csv @@ -0,0 +1,111 @@ +Variable,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034 +alimony_expense,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +alimony_income,1.0,1.255,1.322,1.357,1.446,1.504,1.535,1.567,1.576,1.595,1.622,1.655,1.689,1.723,1.779 +american_opportunity_credit,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +amt_foreign_tax_credit,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +casualty_loss,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +cdcc_relevant_expenses,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +charitable_cash_donations,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +charitable_non_cash_donations,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +child_support_expense,1.0,1.011,1.083,1.142,1.164,1.161,1.18,1.198,1.219,1.238,1.26,1.282,1.305,1.329,1.353 +child_support_received,1.0,1.011,1.083,1.142,1.164,1.161,1.18,1.198,1.219,1.238,1.26,1.282,1.305,1.329,1.353 +disability_benefits,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +domestic_production_ald,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +early_withdrawal_penalty,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +educator_expense,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +employment_income,1.0,1.069,1.149,1.211,1.264,1.306,1.348,1.39,1.438,1.486,1.536,1.587,1.639,1.693,1.748 +employment_income_before_lsr,1.0,1.069,1.149,1.211,1.264,1.306,1.348,1.39,1.438,1.486,1.536,1.587,1.639,1.693,1.748 +employment_income_last_year,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +energy_efficient_home_improvement_credit,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +estate_income,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +excess_withheld_payroll_tax,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +family_weight,1.0,1.003,1.007,1.016,1.027,1.039,1.049,1.056,1.061,1.066,1.071,1.076,1.081,1.086,1.09 +farm_income,1.0,1.867,1.838,1.945,2.049,2.111,2.161,2.224,2.287,2.349,2.423,2.499,2.579,2.662,2.751 +farm_rent_income,1.0,1.357,1.335,1.413,1.489,1.534,1.571,1.616,1.662,1.707,1.76,1.816,1.874,1.935,1.999 +foreign_tax_credit,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +free_school_meals_reported,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +general_business_credit,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +health_insurance_premiums,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +health_savings_account_ald,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +household_weight,1.0,1.003,1.007,1.016,1.027,1.039,1.049,1.056,1.061,1.066,1.071,1.076,1.081,1.086,1.09 +interest_deduction,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +investment_income_elected_form_4952,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +keogh_distributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +long_term_capital_gains,1.0,1.824,1.11,1.195,1.244,1.195,1.14,1.122,1.126,1.145,1.173,1.206,1.243,1.283,1.326 +long_term_capital_gains_on_collectibles,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +medical_expense,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +medical_out_of_pocket_expenses,1.0,1.011,1.083,1.142,1.164,1.161,1.18,1.198,1.219,1.238,1.26,1.282,1.305,1.329,1.353 +misc_deduction,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +miscellaneous_income,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +non_qualified_dividend_income,1.0,1.2,1.269,1.283,1.325,1.376,1.414,1.445,1.483,1.533,1.624,1.714,1.801,1.885,1.966 +non_sch_d_capital_gains,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +other_credits,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +partnership_s_corp_income,1.0,0.997,1.542,1.581,1.685,1.753,1.789,1.827,1.837,1.859,1.891,1.929,1.969,2.009,2.074 +person_weight,1.0,1.003,1.007,1.016,1.027,1.039,1.049,1.056,1.061,1.066,1.071,1.076,1.081,1.086,1.09 +pre_tax_contributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +prior_year_minimum_tax_credit,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +qualified_dividend_income,1.0,1.2,1.269,1.283,1.325,1.376,1.414,1.445,1.483,1.533,1.624,1.714,1.801,1.885,1.966 +qualified_tuition_expenses,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +real_estate_taxes,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +recapture_of_investment_credit,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +rental_income,1.0,0.976,0.961,1.017,1.071,1.104,1.13,1.163,1.196,1.228,1.266,1.307,1.348,1.392,1.438 +roth_401k_contributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +roth_ira_contributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +salt_refund_income,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +savers_credit,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +self_employed_health_insurance_ald,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +self_employed_pension_contribution_ald,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +self_employed_pension_contributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +self_employment_income,1.0,1.255,1.322,1.357,1.446,1.504,1.535,1.567,1.576,1.595,1.622,1.655,1.689,1.723,1.779 +self_employment_income_before_lsr,1.0,1.255,1.322,1.357,1.446,1.504,1.535,1.567,1.576,1.595,1.622,1.655,1.689,1.723,1.779 +self_employment_income_last_year,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +short_term_capital_gains,1.0,0.997,1.59,1.711,1.781,1.711,1.633,1.607,1.612,1.639,1.68,1.727,1.781,1.838,1.898 +snap_reported,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +social_security,1.0,1.276,1.355,1.55,1.718,1.841,1.937,2.031,2.143,2.268,2.398,2.519,2.654,2.805,2.951 +social_security_dependents,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +social_security_disability,1.0,0.997,0.993,1.071,1.093,1.115,1.13,1.151,1.166,1.186,1.206,1.227,1.249,1.272,1.295 +social_security_retirement,1.0,0.997,0.993,1.071,1.093,1.115,1.13,1.151,1.166,1.186,1.206,1.227,1.249,1.272,1.295 +social_security_survivors,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +spm_unit_broadband_subsidy_reported,1.0,1.011,1.083,1.142,1.164,1.161,1.18,1.198,1.219,1.238,1.26,1.282,1.305,1.329,1.353 +spm_unit_capped_housing_subsidy_reported,1.0,1.011,1.083,1.142,1.164,1.161,1.18,1.198,1.219,1.238,1.26,1.282,1.305,1.329,1.353 +spm_unit_capped_work_childcare_expenses,1.0,1.011,1.083,1.142,1.164,1.161,1.18,1.198,1.219,1.238,1.26,1.282,1.305,1.329,1.353 +spm_unit_energy_subsidy_reported,1.0,1.011,1.083,1.142,1.164,1.161,1.18,1.198,1.219,1.238,1.26,1.282,1.305,1.329,1.353 +spm_unit_federal_tax_reported,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +spm_unit_medical_expenses,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +spm_unit_net_income_reported,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +spm_unit_payroll_tax_reported,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +spm_unit_pre_subsidy_childcare_expenses,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +spm_unit_spm_threshold,1.0,1.011,1.083,1.142,1.164,1.161,1.18,1.198,1.219,1.238,1.26,1.282,1.305,1.329,1.353 +spm_unit_state_tax_reported,1.0,1.011,1.083,1.142,1.164,1.161,1.18,1.198,1.219,1.238,1.26,1.282,1.305,1.329,1.353 +spm_unit_total_income_reported,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +spm_unit_weight,1.0,1.003,1.007,1.016,1.027,1.039,1.049,1.056,1.061,1.066,1.071,1.076,1.081,1.086,1.09 +spm_unit_wic_reported,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +ssi_reported,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +state_and_local_sales_or_income_tax,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +strike_benefits,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +student_loan_interest,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +tanf_reported,1.0,1.011,1.083,1.142,1.164,1.161,1.18,1.198,1.219,1.238,1.26,1.282,1.305,1.329,1.353 +tax_exempt_401k_distributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +tax_exempt_403b_distributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +tax_exempt_interest_income,1.0,0.805,0.892,0.97,1.128,1.292,1.369,1.4,1.458,1.514,1.541,1.573,1.616,1.647,1.683 +tax_exempt_ira_distributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +tax_exempt_pension_income,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +tax_exempt_private_pension_income,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +tax_exempt_sep_distributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +tax_unit_weight,1.0,1.003,1.007,1.016,1.027,1.039,1.049,1.056,1.061,1.066,1.071,1.076,1.081,1.086,1.09 +taxable_401k_distributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +taxable_403b_distributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +taxable_interest_income,1.0,0.805,0.892,0.97,1.128,1.292,1.369,1.4,1.458,1.514,1.541,1.573,1.616,1.647,1.683 +taxable_ira_distributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +taxable_pension_income,1.0,1.122,1.101,1.206,1.308,1.345,1.371,1.401,1.433,1.463,1.495,1.531,1.572,1.623,1.674 +taxable_private_pension_income,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +taxable_sep_distributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +taxable_unemployment_compensation,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +traditional_401k_contributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +traditional_ira_contributions,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +unemployment_compensation,1.0,0.512,0.544,0.622,0.689,0.739,0.777,0.815,0.86,0.91,0.962,1.011,1.065,1.126,1.184 +unrecaptured_section_1250_gain,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +unreported_payroll_tax,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +veterans_benefits,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +w2_wages_from_qualified_business,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 +workers_compensation,1.0,1.166,1.148,1.215,1.28,1.318,1.35,1.389,1.428,1.467,1.513,1.561,1.611,1.663,1.718 diff --git a/policyengine_us_data/data_storage/uprating_growth_factors.csv b/policyengine_us_data/data_storage/uprating_growth_factors.csv new file mode 100644 index 0000000..e2d1f93 --- /dev/null +++ b/policyengine_us_data/data_storage/uprating_growth_factors.csv @@ -0,0 +1,111 @@ +Variable,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034 +alimony_expense,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +alimony_income,0,0.2549999999999999,0.05338645418326715,0.02647503782148264,0.06558585114222537,0.04011065006915637,0.020611702127659504,0.02084690553745938,0.00574345883854499,0.012055837563451632,0.01692789968652053,0.020345252774352618,0.020543806646525775,0.02013025458851403,0.032501450957632017 +american_opportunity_credit,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +amt_foreign_tax_credit,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +casualty_loss,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +cdcc_relevant_expenses,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +charitable_cash_donations,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +charitable_non_cash_donations,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +child_support_expense,0,0.010999999999999899,0.07121661721068251,0.05447830101569706,0.019264448336252293,-0.002577319587628746,0.01636520241171402,0.015254237288135686,0.017529215358931705,0.015586546349466657,0.017770597738287597,0.0174603174603174,0.017940717628704972,0.01839080459770126,0.018058690744920947 +child_support_received,0,0.010999999999999899,0.07121661721068251,0.05447830101569706,0.019264448336252293,-0.002577319587628746,0.01636520241171402,0.015254237288135686,0.017529215358931705,0.015586546349466657,0.017770597738287597,0.0174603174603174,0.017940717628704972,0.01839080459770126,0.018058690744920947 +disability_benefits,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +domestic_production_ald,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +early_withdrawal_penalty,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +educator_expense,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +employment_income,0,0.06899999999999995,0.07483629560336769,0.05395996518711921,0.04376548307184147,0.03322784810126578,0.03215926493108734,0.03115727002967339,0.03453237410071952,0.033379694019471495,0.03364737550471064,0.033203125,0.032766225582860686,0.032946918852959195,0.03248670998227987 +employment_income_before_lsr,0,0.06899999999999995,0.07483629560336769,0.05395996518711921,0.04376548307184147,0.03322784810126578,0.03215926493108734,0.03115727002967339,0.03453237410071952,0.033379694019471495,0.03364737550471064,0.033203125,0.032766225582860686,0.032946918852959195,0.03248670998227987 +employment_income_last_year,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +energy_efficient_home_improvement_credit,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +estate_income,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +excess_withheld_payroll_tax,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +family_weight,0,0.0029999999999998916,0.003988035892322994,0.008937437934458892,0.010826771653543288,0.011684518013632017,0.009624639076034613,0.006673021925643674,0.004734848484848397,0.004712535344015167,0.004690431519699612,0.004668534080298992,0.004646840148698761,0.0046253469010177906,0.0036832412523020164 +farm_income,0,0.867,-0.01553294054633092,0.05821545157780195,0.05347043701799481,0.03025866276232314,0.023685457129322574,0.02915316982878302,0.02832733812949617,0.02710975076519473,0.03150276713495104,0.03136607511349565,0.03201280512204874,0.03218301667312895,0.03343350864012029 +farm_rent_income,0,0.357,-0.01621223286661755,0.05842696629213484,0.05378627034677996,0.030221625251846795,0.02411994784876126,0.028644175684277684,0.02846534653465338,0.027075812274368394,0.031048623315758528,0.031818181818181746,0.0319383259911894,0.03255069370330843,0.03307493540051687 +foreign_tax_credit,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +free_school_meals_reported,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +general_business_credit,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +health_insurance_premiums,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +health_savings_account_ald,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +household_weight,0,0.0029999999999998916,0.003988035892322994,0.008937437934458892,0.010826771653543288,0.011684518013632017,0.009624639076034613,0.006673021925643674,0.004734848484848397,0.004712535344015167,0.004690431519699612,0.004668534080298992,0.004646840148698761,0.0046253469010177906,0.0036832412523020164 +interest_deduction,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +investment_income_elected_form_4952,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +keogh_distributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +long_term_capital_gains,0,0.8240000000000001,-0.39144736842105265,0.07657657657657646,0.041004184100418284,-0.03938906752411575,-0.046025104602510636,-0.015789473684210353,0.0035650623885916666,0.01687388987566618,0.024454148471615644,0.028132992327365658,0.03067993366500832,0.03218020917135944,0.03351519875292297 +long_term_capital_gains_on_collectibles,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +medical_expense,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +medical_out_of_pocket_expenses,0,0.010999999999999899,0.07121661721068251,0.05447830101569706,0.019264448336252293,-0.002577319587628746,0.01636520241171402,0.015254237288135686,0.017529215358931705,0.015586546349466657,0.017770597738287597,0.0174603174603174,0.017940717628704972,0.01839080459770126,0.018058690744920947 +misc_deduction,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +miscellaneous_income,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +non_qualified_dividend_income,0,0.19999999999999996,0.057499999999999885,0.011032308904649346,0.03273577552611062,0.03849056603773571,0.02761627906976738,0.02192362093352207,0.02629757785467124,0.033715441672285795,0.05936073059360747,0.05541871921182251,0.05075845974329063,0.046640755136035494,0.04297082228116711 +non_sch_d_capital_gains,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +other_credits,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +partnership_s_corp_income,0,-0.0030000000000000027,0.546639919759278,0.02529182879377423,0.0657811511701456,0.04035608308605321,0.02053622361665708,0.02124091671324768,0.005473453749315738,0.011976047904191711,0.017213555675094083,0.0200951877313591,0.02073613271124941,0.02031488065007614,0.03235440517670485 +person_weight,0,0.0029999999999998916,0.003988035892322994,0.008937437934458892,0.010826771653543288,0.011684518013632017,0.009624639076034613,0.006673021925643674,0.004734848484848397,0.004712535344015167,0.004690431519699612,0.004668534080298992,0.004646840148698761,0.0046253469010177906,0.0036832412523020164 +pre_tax_contributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +prior_year_minimum_tax_credit,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +qualified_dividend_income,0,0.19999999999999996,0.057499999999999885,0.011032308904649346,0.03273577552611062,0.03849056603773571,0.02761627906976738,0.02192362093352207,0.02629757785467124,0.033715441672285795,0.05936073059360747,0.05541871921182251,0.05075845974329063,0.046640755136035494,0.04297082228116711 +qualified_tuition_expenses,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +real_estate_taxes,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +recapture_of_investment_credit,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +rental_income,0,-0.02400000000000002,-0.015368852459016424,0.0582726326742975,0.053097345132743445,0.0308123249299721,0.02355072463768093,0.02920353982300905,0.02837489251934655,0.026755852842809347,0.030944625407166138,0.03238546603475512,0.03136954858454488,0.03264094955489605,0.033045977011494365 +roth_401k_contributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +roth_ira_contributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +salt_refund_income,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +savers_credit,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +self_employed_health_insurance_ald,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +self_employed_pension_contribution_ald,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +self_employed_pension_contributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +self_employment_income,0,0.2549999999999999,0.05338645418326715,0.02647503782148264,0.06558585114222537,0.04011065006915637,0.020611702127659504,0.02084690553745938,0.00574345883854499,0.012055837563451632,0.01692789968652053,0.020345252774352618,0.020543806646525775,0.02013025458851403,0.032501450957632017 +self_employment_income_before_lsr,0,0.2549999999999999,0.05338645418326715,0.02647503782148264,0.06558585114222537,0.04011065006915637,0.020611702127659504,0.02084690553745938,0.00574345883854499,0.012055837563451632,0.01692789968652053,0.020345252774352618,0.020543806646525775,0.02013025458851403,0.032501450957632017 +self_employment_income_last_year,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +short_term_capital_gains,0,-0.0030000000000000027,0.5947843530591777,0.0761006289308177,0.040911747516072294,-0.03930376193149909,-0.0455873758036236,-0.015921616656460524,0.0031113876789048422,0.01674937965260548,0.02501525320317266,0.0279761904761906,0.03126809496236227,0.03200449185850651,0.03264417845484213 +snap_reported,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +social_security,0,0.276,0.06191222570532906,0.1439114391143912,0.10838709677419356,0.07159487776484275,0.05214557305812062,0.04852865255549821,0.05514524864598713,0.058329444703686395,0.057319223985890844,0.050458715596330306,0.05359269551409285,0.056895252449133515,0.05204991087344024 +social_security_dependents,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +social_security_disability,0,-0.0030000000000000027,-0.004012036108325012,0.0785498489425982,0.020541549953314586,0.020128087831656094,0.013452914798206095,0.018584070796460184,0.013032145960034658,0.0171526586620927,0.01686340640809436,0.017412935323383172,0.01792991035044822,0.018414731785428184,0.018081761006289332 +social_security_retirement,0,-0.0030000000000000027,-0.004012036108325012,0.0785498489425982,0.020541549953314586,0.020128087831656094,0.013452914798206095,0.018584070796460184,0.013032145960034658,0.0171526586620927,0.01686340640809436,0.017412935323383172,0.01792991035044822,0.018414731785428184,0.018081761006289332 +social_security_survivors,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +spm_unit_broadband_subsidy_reported,0,0.010999999999999899,0.07121661721068251,0.05447830101569706,0.019264448336252293,-0.002577319587628746,0.01636520241171402,0.015254237288135686,0.017529215358931705,0.015586546349466657,0.017770597738287597,0.0174603174603174,0.017940717628704972,0.01839080459770126,0.018058690744920947 +spm_unit_capped_housing_subsidy_reported,0,0.010999999999999899,0.07121661721068251,0.05447830101569706,0.019264448336252293,-0.002577319587628746,0.01636520241171402,0.015254237288135686,0.017529215358931705,0.015586546349466657,0.017770597738287597,0.0174603174603174,0.017940717628704972,0.01839080459770126,0.018058690744920947 +spm_unit_capped_work_childcare_expenses,0,0.010999999999999899,0.07121661721068251,0.05447830101569706,0.019264448336252293,-0.002577319587628746,0.01636520241171402,0.015254237288135686,0.017529215358931705,0.015586546349466657,0.017770597738287597,0.0174603174603174,0.017940717628704972,0.01839080459770126,0.018058690744920947 +spm_unit_energy_subsidy_reported,0,0.010999999999999899,0.07121661721068251,0.05447830101569706,0.019264448336252293,-0.002577319587628746,0.01636520241171402,0.015254237288135686,0.017529215358931705,0.015586546349466657,0.017770597738287597,0.0174603174603174,0.017940717628704972,0.01839080459770126,0.018058690744920947 +spm_unit_federal_tax_reported,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +spm_unit_medical_expenses,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +spm_unit_net_income_reported,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +spm_unit_payroll_tax_reported,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +spm_unit_pre_subsidy_childcare_expenses,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +spm_unit_spm_threshold,0,0.010999999999999899,0.07121661721068251,0.05447830101569706,0.019264448336252293,-0.002577319587628746,0.01636520241171402,0.015254237288135686,0.017529215358931705,0.015586546349466657,0.017770597738287597,0.0174603174603174,0.017940717628704972,0.01839080459770126,0.018058690744920947 +spm_unit_state_tax_reported,0,0.010999999999999899,0.07121661721068251,0.05447830101569706,0.019264448336252293,-0.002577319587628746,0.01636520241171402,0.015254237288135686,0.017529215358931705,0.015586546349466657,0.017770597738287597,0.0174603174603174,0.017940717628704972,0.01839080459770126,0.018058690744920947 +spm_unit_total_income_reported,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +spm_unit_weight,0,0.0029999999999998916,0.003988035892322994,0.008937437934458892,0.010826771653543288,0.011684518013632017,0.009624639076034613,0.006673021925643674,0.004734848484848397,0.004712535344015167,0.004690431519699612,0.004668534080298992,0.004646840148698761,0.0046253469010177906,0.0036832412523020164 +spm_unit_wic_reported,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +ssi_reported,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +state_and_local_sales_or_income_tax,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +strike_benefits,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +student_loan_interest,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +tanf_reported,0,0.010999999999999899,0.07121661721068251,0.05447830101569706,0.019264448336252293,-0.002577319587628746,0.01636520241171402,0.015254237288135686,0.017529215358931705,0.015586546349466657,0.017770597738287597,0.0174603174603174,0.017940717628704972,0.01839080459770126,0.018058690744920947 +tax_exempt_401k_distributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +tax_exempt_403b_distributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +tax_exempt_interest_income,0,-0.19499999999999995,0.1080745341614906,0.08744394618834073,0.1628865979381442,0.14539007092198597,0.059597523219814263,0.022644265887509007,0.04142857142857137,0.03840877914952001,0.017833553500660404,0.020765736534717805,0.027336300063572905,0.019183168316831534,0.021857923497267784 +tax_exempt_ira_distributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +tax_exempt_pension_income,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +tax_exempt_private_pension_income,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +tax_exempt_sep_distributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +tax_unit_weight,0,0.0029999999999998916,0.003988035892322994,0.008937437934458892,0.010826771653543288,0.011684518013632017,0.009624639076034613,0.006673021925643674,0.004734848484848397,0.004712535344015167,0.004690431519699612,0.004668534080298992,0.004646840148698761,0.0046253469010177906,0.0036832412523020164 +taxable_401k_distributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +taxable_403b_distributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +taxable_interest_income,0,-0.19499999999999995,0.1080745341614906,0.08744394618834073,0.1628865979381442,0.14539007092198597,0.059597523219814263,0.022644265887509007,0.04142857142857137,0.03840877914952001,0.017833553500660404,0.020765736534717805,0.027336300063572905,0.019183168316831534,0.021857923497267784 +taxable_ira_distributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +taxable_pension_income,0,0.12200000000000011,-0.018716577540107027,0.0953678474114441,0.08457711442786087,0.02828746177370034,0.019330855018587334,0.021881838074398363,0.0228408279800143,0.020935101186322358,0.021872863978127155,0.024080267558528323,0.026779882429784463,0.03244274809160297,0.031423290203327126 +taxable_private_pension_income,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +taxable_sep_distributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +taxable_unemployment_compensation,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +traditional_401k_contributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +traditional_ira_contributions,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +unemployment_compensation,0,-0.488,0.0625,0.1433823529411764,0.10771704180064301,0.07256894049346885,0.05142083897158334,0.04890604890604888,0.05521472392638049,0.058139534883721034,0.05714285714285716,0.05093555093555091,0.05341246290801194,0.05727699530516417,0.051509769094138624 +unrecaptured_section_1250_gain,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +unreported_payroll_tax,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +veterans_benefits,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +w2_wages_from_qualified_business,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 +workers_compensation,0,0.16599999999999993,-0.015437392795883409,0.058362369337979336,0.05349794238683114,0.02968750000000009,0.02427921092564489,0.028888888888888742,0.02807775377969768,0.027310924369748024,0.03135650988411709,0.03172504957039002,0.03203074951953888,0.0322780881440099,0.03307276007215876 diff --git a/policyengine_us_data/datasets/cps/__init__.py b/policyengine_us_data/datasets/cps/__init__.py index 91a485f..213a613 100644 --- a/policyengine_us_data/datasets/cps/__init__.py +++ b/policyengine_us_data/datasets/cps/__init__.py @@ -1 +1,2 @@ -from .policyengine_cps import * +from .cps import * +from .extended_cps import * diff --git a/policyengine_us_data/datasets/cps/policyengine_cps.py b/policyengine_us_data/datasets/cps/cps.py similarity index 98% rename from policyengine_us_data/datasets/cps/policyengine_cps.py rename to policyengine_us_data/datasets/cps/cps.py index 2a57886..5d87f29 100644 --- a/policyengine_us_data/datasets/cps/policyengine_cps.py +++ b/policyengine_us_data/datasets/cps/cps.py @@ -32,12 +32,12 @@ def generate(self): print("Creating uprating factors table...") uprating = create_policyengine_uprating_factors_table() arrays = cps_2022.load_dataset() - for variable in uprating: + for variable in uprating.index.unique(): if variable in arrays: - current_index = uprating[uprating.Variable == variable][ + current_index = uprating[uprating.index == variable][ self.time_period ].values[0] - start_index = uprating[uprating.Variable == variable][ + start_index = uprating[uprating.index == variable][ 2021 ].values[0] growth = current_index / start_index @@ -65,9 +65,6 @@ def generate(self): raw_data.close() cps.close() - cps = h5py.File(self.file_path, mode="a") - cps.close() - def add_id_variables( cps: h5py.File, diff --git a/policyengine_us_data/datasets/cps/enhanced_cps.py b/policyengine_us_data/datasets/cps/enhanced_cps.py index 952db7f..572824c 100644 --- a/policyengine_us_data/datasets/cps/enhanced_cps.py +++ b/policyengine_us_data/datasets/cps/enhanced_cps.py @@ -1,4 +1,5 @@ from policyengine_core.data import Dataset + class EnhancedCPS(Dataset): - pass \ No newline at end of file + pass diff --git a/policyengine_us_data/datasets/cps/extended_cps.py b/policyengine_us_data/datasets/cps/extended_cps.py new file mode 100644 index 0000000..f84ee7b --- /dev/null +++ b/policyengine_us_data/datasets/cps/extended_cps.py @@ -0,0 +1,125 @@ +from policyengine_core.data import Dataset +from policyengine_us_data.data_storage import STORAGE_FOLDER +from typing import Type +from .cps import * +from ..puf import * +import pandas as pd + +IMPUTED_VARIABLES = [ + "alimony_expense", + "alimony_income", + "american_opportunity_credit", + "amt_foreign_tax_credit", + "casualty_loss", + "cdcc_relevant_expenses", + "charitable_cash_donations", + "charitable_non_cash_donations", + "domestic_production_ald", + "early_withdrawal_penalty", + "educator_expense", + "employment_income", + "energy_efficient_home_improvement_credit", + "estate_income", + "excess_withheld_payroll_tax", + "farm_income", + "farm_rent_income", + "foreign_tax_credit", + "general_business_credit", + "health_savings_account_ald", + "interest_deduction", + "investment_income_elected_form_4952", + "long_term_capital_gains", + "long_term_capital_gains_on_collectibles", + "medical_expense", + "misc_deduction", + "miscellaneous_income", + "non_qualified_dividend_income", + "non_sch_d_capital_gains", + "other_credits", + "partnership_s_corp_income", + "pre_tax_contributions", + "prior_year_minimum_tax_credit", + "qualified_dividend_income", + "qualified_tuition_expenses", + "real_estate_taxes", + "recapture_of_investment_credit", + "rental_income", + "salt_refund_income", + "savers_credit", + "self_employed_health_insurance_ald", + "self_employed_pension_contribution_ald", + "self_employment_income", + "short_term_capital_gains", + "social_security", + "state_and_local_sales_or_income_tax", + "student_loan_interest", + "tax_exempt_interest_income", + "tax_exempt_pension_income", + "taxable_interest_income", + "taxable_ira_distributions", + "taxable_pension_income", + "taxable_unemployment_compensation", + "traditional_ira_contributions", + "unrecaptured_section_1250_gain", + "unreported_payroll_tax", + "w2_wages_from_qualified_business", +] + +IMPUTED_VARIABLES = ["employment_income"] + + +class ExtendedCPS(Dataset): + cps: Type[CPS] + puf: Type[PUF] + data_format = Dataset.FLAT_FILE + + def generate(self): + from policyengine_us import Microsimulation + from survey_enhance import Imputation + + cps_sim = Microsimulation(dataset=self.cps) + puf_sim = Microsimulation(dataset=self.puf) + + INPUTS = [ + "age", + "is_male", + "tax_unit_is_joint", + "tax_unit_count_dependents", + "is_tax_unit_head", + "is_tax_unit_spouse", + "is_tax_unit_dependent", + ] + + X_train = puf_sim.calculate_dataframe(INPUTS) + y_train = puf_sim.calculate_dataframe(IMPUTED_VARIABLES) + + model = Imputation() + + model.train(X_train, y_train, verbose=True) + + X = cps_sim.calculate_dataframe(INPUTS) + y = model.predict(X, verbose=True) + + original_dataset = cps_sim.to_input_dataframe() + original_dataset["employment_income"] = ( + original_dataset.employment_income_before_lsr + ) + original_dataset["self_employment_income"] = ( + original_dataset.self_employment_income_before_lsr + ) + imputed_dataset = original_dataset.copy().reset_index() + + imputed_dataset[IMPUTED_VARIABLES] = y + original_dataset["data_source"] = "cps" + imputed_dataset["data_source"] = "puf_imputed" + combined = pd.concat([original_dataset, imputed_dataset]) + + self.save_dataset(combined) + + +class ExtendedCPS_2024(ExtendedCPS): + cps = CPS_2024 + puf = PUF_2024 + name = "extended_cps_2024" + label = "Extended CPS (2024)" + file_path = STORAGE_FOLDER / "extended_cps_2024.csv" diff --git a/policyengine_us_data/datasets/puf/__init__.py b/policyengine_us_data/datasets/puf/__init__.py index e431685..2866243 100644 --- a/policyengine_us_data/datasets/puf/__init__.py +++ b/policyengine_us_data/datasets/puf/__init__.py @@ -1 +1 @@ -from .policyengine_puf import * +from .puf import * diff --git a/policyengine_us_data/datasets/puf/policyengine_puf.py b/policyengine_us_data/datasets/puf/puf.py similarity index 100% rename from policyengine_us_data/datasets/puf/policyengine_puf.py rename to policyengine_us_data/datasets/puf/puf.py diff --git a/policyengine_us_data/tests/test_datasets/test_policyengine_cps.py b/policyengine_us_data/tests/test_datasets/test_policyengine_cps.py index 291edbb..0cf2bba 100644 --- a/policyengine_us_data/tests/test_datasets/test_policyengine_cps.py +++ b/policyengine_us_data/tests/test_datasets/test_policyengine_cps.py @@ -3,7 +3,7 @@ @pytest.mark.parametrize("year", [2022]) def test_policyengine_cps_generates(year: int): - from policyengine_us_data.datasets.cps.policyengine_cps import CPS_2022 + from policyengine_us_data.datasets.cps.cps import CPS_2022 dataset_by_year = { 2022: CPS_2022, @@ -14,7 +14,7 @@ def test_policyengine_cps_generates(year: int): @pytest.mark.parametrize("year", [2022]) def test_policyengine_cps_loads(year: int): - from policyengine_us_data.datasets.cps.policyengine_cps import CPS_2022 + from policyengine_us_data.datasets.cps.cps import CPS_2022 dataset_by_year = { 2022: CPS_2022,