From 5005b53801078ee5cbac902d18157114653b2cf2 Mon Sep 17 00:00:00 2001 From: "martin.holmer@gmail.com" Date: Tue, 1 Oct 2024 14:13:59 -0400 Subject: [PATCH 1/2] Use new Tax-Calculator Records.tmd_constructor in create_area_weights.py --- tmd/areas/create_area_weights.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tmd/areas/create_area_weights.py b/tmd/areas/create_area_weights.py index 8e5c7e45..c6d62088 100644 --- a/tmd/areas/create_area_weights.py +++ b/tmd/areas/create_area_weights.py @@ -173,12 +173,10 @@ def all_taxcalc_variables(write_cache): if TAXCALC_AGI_CACHE.exists(): vdf["c00100"] = np.load(TAXCALC_AGI_CACHE) else: - input_data = tc.Records( - data=vdf, - start_year=FIRST_YEAR, - weights=str(WTFILE_PATH), - gfactors=tc.GrowFactors(growfactors_filename=str(GFFILE_PATH)), - adjust_ratios=None, + input_data = tc.Records.tmd_constructor( + data_path=INFILE_PATH, + weights_path=WTFILE_PATH, + growfactors_path=GFFILE_PATH, exact_calculations=True, ) sim = tc.Calculator(records=input_data, policy=tc.Policy()) From a8c25b980073028cf301b4fecd6131db80505a35 Mon Sep 17 00:00:00 2001 From: "martin.holmer@gmail.com" Date: Tue, 1 Oct 2024 14:44:36 -0400 Subject: [PATCH 2/2] Update tests/expected_tax_expenditures for Tax-Calculator 4.3.0 version --- setup.py | 2 +- tests/expected_tax_expenditures | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/setup.py b/setup.py index 25589a53..e764e9ff 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ install_requires=[ "policyengine_us==1.55.0", "tables", # required by policyengine_us - "taxcalc>=4.2.2", + "taxcalc>=4.3.0", "scikit-learn", "torch", "tensorboard", diff --git a/tests/expected_tax_expenditures b/tests/expected_tax_expenditures index cb99ef95..bf774973 100644 --- a/tests/expected_tax_expenditures +++ b/tests/expected_tax_expenditures @@ -1,18 +1,18 @@ -YR,KIND,EST= 2023 paytax 1591.7 -YR,KIND,EST= 2023 iitax 2505.3 -YR,KIND,EST= 2023 ctc 130.1 -YR,KIND,EST= 2023 eitc 69.8 -YR,KIND,EST= 2023 social_security_partial_taxability 35.7 +YR,KIND,EST= 2023 paytax 1595.0 +YR,KIND,EST= 2023 iitax 2507.0 +YR,KIND,EST= 2023 ctc 130.2 +YR,KIND,EST= 2023 eitc 69.6 +YR,KIND,EST= 2023 social_security_partial_taxability 35.9 YR,KIND,EST= 2023 niit -54.0 YR,KIND,EST= 2023 cgqd_tax_preference 220.9 YR,KIND,EST= 2023 qbid 58.0 -YR,KIND,EST= 2023 salt 21.1 -YR,KIND,EST= 2026 paytax 1847.0 -YR,KIND,EST= 2026 iitax 3140.8 +YR,KIND,EST= 2023 salt 21.2 +YR,KIND,EST= 2026 paytax 1851.4 +YR,KIND,EST= 2026 iitax 3161.2 YR,KIND,EST= 2026 ctc 44.7 -YR,KIND,EST= 2026 eitc 78.0 -YR,KIND,EST= 2026 social_security_partial_taxability 47.6 -YR,KIND,EST= 2026 niit -52.3 -YR,KIND,EST= 2026 cgqd_tax_preference 218.4 +YR,KIND,EST= 2026 eitc 77.8 +YR,KIND,EST= 2026 social_security_partial_taxability 47.7 +YR,KIND,EST= 2026 niit -53.8 +YR,KIND,EST= 2026 cgqd_tax_preference 224.7 YR,KIND,EST= 2026 qbid -0.0 -YR,KIND,EST= 2026 salt 164.8 +YR,KIND,EST= 2026 salt 165.4