1313# extend to match — no hardcoded year constant to maintain.
1414CPI_U_PARAM_PATH = "gov.bls.cpi.cpi_u"
1515
16+ MICRODATA_UPRATING_OVERRIDES = {
17+ "employment_income" : "calibration.gov.irs.soi.employment_income" ,
18+ "employment_income_last_year" : "calibration.gov.irs.soi.employment_income" ,
19+ "long_term_capital_gains" : "calibration.gov.irs.soi.long_term_capital_gains" ,
20+ "person_weight" : "calibration.gov.census.populations.total" ,
21+ "rent" : "gov.bls.cpi.cpi_u" ,
22+ "self_employment_income" : "calibration.gov.irs.soi.self_employment_income" ,
23+ "social_security" : "calibration.gov.irs.soi.social_security" ,
24+ "spm_unit_weight" : "calibration.gov.census.populations.total" ,
25+ "sstb_self_employment_income" : "calibration.gov.irs.soi.self_employment_income" ,
26+ "taxable_pension_income" : "calibration.gov.irs.soi.taxable_pension_income" ,
27+ "tax_unit_weight" : "calibration.gov.census.populations.total" ,
28+ "total_self_employment_income" : "calibration.gov.irs.soi.self_employment_income" ,
29+ }
30+
1631
1732def get_parameter_last_year (parameter ) -> int :
1833 """Return the latest year explicitly defined in a parameter's YAML file.
@@ -100,11 +115,10 @@ def _apply_uprating(dataset: USMultiYearDataset, system=None) -> USMultiYearData
100115def _apply_single_year_uprating (current , previous , system ):
101116 """Apply multiplicative uprating from previous year to current year.
102117
103- For each variable column in each entity DataFrame, looks up the
104- variable's uprating parameter path in ``system.variables``. If the
105- variable has an uprating parameter, computes the growth factor as
106- ``param(current_year) / param(previous_year)`` and multiplies the
107- column by that factor.
118+ For each variable column in each entity DataFrame, looks up its
119+ dataset-extension uprating parameter path. Formula and adds/subtracts
120+ variables cannot use Core variable-level uprating, so their dataset-only
121+ upraters live in ``MICRODATA_UPRATING_OVERRIDES`` instead.
108122
109123 Variables without an uprating parameter (or whose uprating parameter
110124 evaluates to 0 for the previous year) are left unchanged — they were
@@ -122,7 +136,9 @@ def _apply_single_year_uprating(current, previous, system):
122136 if col not in system .variables :
123137 continue
124138 var = system .variables [col ]
125- uprating_path = getattr (var , "uprating" , None )
139+ uprating_path = MICRODATA_UPRATING_OVERRIDES .get (col ) or getattr (
140+ var , "uprating" , None
141+ )
126142 if uprating_path is None :
127143 continue
128144
0 commit comments