From 2e0ff001db274c51448c378dee91daebb7856220 Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff <35577657+nikhilwoodruff@users.noreply.github.com> Date: Tue, 23 Apr 2024 13:05:38 +0100 Subject: [PATCH 1/3] Fix add_pt_w2_wages logic #48 --- tax_microdata_benchmarking/adjust_qbi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tax_microdata_benchmarking/adjust_qbi.py b/tax_microdata_benchmarking/adjust_qbi.py index f28b89f3..fe041c94 100644 --- a/tax_microdata_benchmarking/adjust_qbi.py +++ b/tax_microdata_benchmarking/adjust_qbi.py @@ -38,8 +38,8 @@ def add_pt_w2_wages(df, time_period: int, verbose: bool = True): target = ( QBID_TOTAL_21 * qbid_tax_expenditures[ - time_period + 1 - ] # JCT figures are one year behind TC + time_period + ] / qbid_tax_expenditures[2021] ) From 8b34cce06e053e8bcb212bc9710a69886e35d80d Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff <35577657+nikhilwoodruff@users.noreply.github.com> Date: Tue, 23 Apr 2024 13:09:07 +0100 Subject: [PATCH 2/3] Add new 31.4% W2 wages figure to main routine --- tax_microdata_benchmarking/create_flat_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tax_microdata_benchmarking/create_flat_file.py b/tax_microdata_benchmarking/create_flat_file.py index 373616c8..58254662 100644 --- a/tax_microdata_benchmarking/create_flat_file.py +++ b/tax_microdata_benchmarking/create_flat_file.py @@ -779,7 +779,7 @@ def create_stacked_flat_file( + stacked_file.e27200, ) stacked_file["PT_binc_w2_wages"] = ( - qbi * 0.357 + qbi * 0.314 # Solved in 2021 using adjust_qbi.py ) # Solved in 2021 using adjust_qbi.py input_data = tc.Records(data=stacked_file, start_year=target_year) policy = tc.Policy() From eb890f8125d1a5d1ab49308392ea50e6af89b7ef Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff <35577657+nikhilwoodruff@users.noreply.github.com> Date: Tue, 23 Apr 2024 13:10:24 +0100 Subject: [PATCH 3/3] Format --- tax_microdata_benchmarking/adjust_qbi.py | 4 +--- tax_microdata_benchmarking/create_flat_file.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tax_microdata_benchmarking/adjust_qbi.py b/tax_microdata_benchmarking/adjust_qbi.py index fe041c94..f2069fa8 100644 --- a/tax_microdata_benchmarking/adjust_qbi.py +++ b/tax_microdata_benchmarking/adjust_qbi.py @@ -37,9 +37,7 @@ def add_pt_w2_wages(df, time_period: int, verbose: bool = True): target = ( QBID_TOTAL_21 - * qbid_tax_expenditures[ - time_period - ] + * qbid_tax_expenditures[time_period] / qbid_tax_expenditures[2021] ) diff --git a/tax_microdata_benchmarking/create_flat_file.py b/tax_microdata_benchmarking/create_flat_file.py index 58254662..acb830cf 100644 --- a/tax_microdata_benchmarking/create_flat_file.py +++ b/tax_microdata_benchmarking/create_flat_file.py @@ -835,7 +835,7 @@ def summary_analytics(df): def create_all_files(): - PRIORITY_YEARS = [2021, 2015, 2026, 2023] + PRIORITY_YEARS = [2021, 2023, 2026, 2015] REMAINING_YEARS = [ year for year in range(2015, 2027) if year not in PRIORITY_YEARS ]