Repository navigation
Import logic from TaxData repo that creates and tests generation of growfactor.csv file - #543
Merged
Merged
Conversation
martinholmer
marked this pull request as draft
September 5, 2026 14:58
output/growfactor.csv file
output/growfactor.csv file
martinholmer
marked this pull request as ready for review
September 6, 2026 19:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this branch does
Brings the growth-factors generation logic into TMD from the TaxData repo
(
puf_stage1/), so that TMD produces its owngrowfactors.csvinstead ofvendoring a file generated elsewhere. Two commits: one preparing the
make datawiring, one importing the pipeline.make datachangestmd/create_raw_growth_factors.pyreadstmd/storage/input/taxdata<VINTAGE>_growfactors.csvand writestmd/storage/output/growfactors.csv.tmd/create_taxcalc_growth_factors.pynow reads that output file ratherthan reaching into
storage/inputitself; theTAXYEAR -> input filemap moved into the new script.
Makefile: thetmd_growfactors.csvrule runs the new script first;logs are split into
make_data_raw_growfactors.logandmake_data_tmd_growfactors.log;cleanremovesgrowfactors.csv; thedatatarget diffs both new/old growfactors files.Net effect on
make dataoutput: none. The committedtaxdata26_growfactors.csvchanges only in line endings (CRLF -> LF);values are byte-identical otherwise.
New pipeline:
tmd/growfactors/SOI_YRusing Censuspopulation, CBO baseline, and IRS return-projection growth rates, then
normalizes to a level index with 2011 = 1.
one-plus-annual-proportional-change factors, appends benefit growth
factors, and drops variables Tax-Calculator does not use. Takes
--vintageso a data refresh writes a new vintage file rather thanrewriting a frozen one.
tmd/growfactors/Makefilewires the stages:stage1,factors,test,all. Most users never run it.update/update_cbo.py,update/update_soi.py,update/cbo_chained_cpiu.pyrefresh the source data from live CBO/BLS/SSA/IRS sites. Never invoked by
make data,make all, or any test;gated behind the new
pip install -e ".[growfactors-update]"extra(
requests_html,jinja2) and run by hand viamake update-cbo/make update-soi.README.md(pipeline overview),docs/annual_update.md(refreshprocedure), plus the CBO/SOI updating instructions carried over from
TaxData.
.gitignorenow un-ignorestmd/growfactors/{data,docs}/*.csv.Tests
tests/test_growfactors.py— ported value/range checks on the rawgrowth factors file used for
TAXYEAR; runs in the normalmake test.tests/growfactors_pipeline/test_growfactors_pipeline.py—reproducibility tests that re-run each stage into a tmpdir and compare
against the committed artifact, catching source data edited without
regenerating downstream files.
Intentional differences from the TaxData original
Stage_II_targets.csvoutput dropped — it served only TaxData's stage-2weighting; TMD reweights against
tmd/storage/input/soi.csv. Thein-memory
aggregatesDataFrame (TaxData'sStage_II_targets) is keptbecause stage 1 factors are computed from it.
benefit_growth_rates.csv; TaxData silently writes empty values for2032-2036.
rewritten (see the
NOTEcomments).update_soi.pyno longer updates the CPS copy ofSOI_estimates.csv,which has no TMD counterpart.