Skip to content

Commit

Permalink
Merge pull request #137 from PSLmodels/more-tracing
Browse files Browse the repository at this point in the history
Improve CTC tracing output
  • Loading branch information
martinholmer authored Jul 11, 2024
2 parents 06b707d + f9d36b2 commit 9a58034
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tax_microdata_benchmarking/storage/output/tax_expenditures
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
YEAR,KIND,ESTIMATE= 2023 iitax 2306.3
YEAR,KIND,ESTIMATE= 2023 ctc 96.6
YEAR,KIND,ESTIMATE= 2023 eitc 77.4
YEAR,KIND,ESTIMATE= 2023 social_security_partial_taxability 53.2
YEAR,KIND,ESTIMATE= 2023 social_security_partial_taxability 53.3
YEAR,KIND,ESTIMATE= 2023 niit -56.7
YEAR,KIND,ESTIMATE= 2023 cgqd_tax_preference 223.2
YEAR,KIND,ESTIMATE= 2023 qbid 56.4
YEAR,KIND,ESTIMATE= 2023 qbid 56.5
YEAR,KIND,ESTIMATE= 2023 salt 11.4
6 changes: 5 additions & 1 deletion tax_microdata_benchmarking/utils/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ def trace1(loc: str, vdf: pd.DataFrame) -> None:
if "ctc_total" in vdf:
ctc = vdf.ctc_total * filer
ctc_wtot = (wght * ctc).sum() * 1e-9
print(f">{loc} weighted puf CTC ($B)= {ctc_wtot:.3f}")
ctc_num = (wght * (ctc > 0)).sum() * 1e-6
print(f">{loc} weighted puf CTC ($B)= {ctc_wtot:.3f} [124.6]")
print(f">{loc} weighted puf CTC (#M)= {ctc_num:.3f} [36.5...47.4]")
else:
print(f">{loc} CTC not in DataFrame")
# SALT tabulations
# TODO: add code here
# PT_binc_w2_wages tabulations
w2wages = vdf.PT_binc_w2_wages * filer
wages_min = w2wages.min()
Expand Down

0 comments on commit 9a58034

Please sign in to comment.