Skip to content

Commit

Permalink
Use utils/trace.py capability in datasets/tmd.py module
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholmer committed Jun 26, 2024
1 parent f55778b commit f4438d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tax_microdata_benchmarking/datasets/tmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from tax_microdata_benchmarking.datasets.taxcalc_dataset import (
create_tc_dataset,
)
from tax_microdata_benchmarking.utils.trace import trace1
from tax_microdata_benchmarking.utils.taxcalc_utils import add_taxcalc_outputs
from tax_microdata_benchmarking.utils.reweight import reweight
from tax_microdata_benchmarking.storage import STORAGE_FOLDER
Expand Down Expand Up @@ -33,13 +34,20 @@ def create_tmd_2021():

combined = pd.concat([tc_puf_21, tc_cps_21], ignore_index=True)

trace1("A", combined)

# Add Tax-Calculator outputs
print("Adding Tax-Calculator outputs...")
combined = add_taxcalc_outputs(combined, 2021)
combined["s006_original"] = combined.s006.values

trace1("B", combined)

print("Reweighting...")
combined = reweight(combined, 2021, weight_deviation_penalty=0)

trace1("C", combined)

return combined


Expand Down

0 comments on commit f4438d3

Please sign in to comment.