Drop prior-year ASEC earnings lookback; fall back to current earnings#204
Merged
Conversation
The EITC/CTC prior-year-earnings election (the COVID-era "lookback") expired after 2021, so employment_income_last_year / self_employment_income_last_year / previous_year_income_available feed no live PolicyEngine-US formula. Remove the prior-ASEC load + PERIDNUM panel-join (an extra survey-year dependency that only covered the ~50% rotation overlap) and set last-year income to current-year earnings (WSAL_VAL / SEMP_VAL) as a placeholder. previous_year_income_available now tracks whether the row has any earnings, keeping the export columns populated/varying until they are removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Drop the prior-year ASEC earnings lookback and fall back to current-year earnings.
The EITC/CTC prior-year-earnings election (the COVID-era "lookback") expired after 2021, so
employment_income_last_year,self_employment_income_last_year, andprevious_year_income_availablefeed no live PolicyEngine-US formula. They were recently added (export population) by loading andPERIDNUM-panel-joining the prior ASEC — an extra survey-year dependency that only covered the ~50% rotation overlap, churned the processed-cache version, and would require the build to fetch ASECyear-1in addition to the spine year.Changes
_load_previous_cps_asec_persons_rawand the panel-join in_attach_previous_year_income._attach_previous_year_incomenow sets*_income_last_yearto current-year earnings (WSAL_VAL/SEMP_VAL), andprevious_year_income_availableto whether the row has any earnings — keeping the three export columns populated and varying (no support-gate regression) without the prior ASEC.CPS_ASEC_PROCESSED_CACHE_VERSION(logic changed).These are placeholders to remove entirely once the export contract no longer requires the columns.
Blast radius
_load_previous_cps_asec_persons_rawand the 3-arg_attach_previous_year_incomehad a single call site each (both incps.py); no other references. Removes the ASECyear-1download/parse fromload_cps_asec.Tests
test_load_cps_asec_attaches_previous_year_income_from_prior_asecwithtest_load_cps_asec_falls_back_last_year_income_to_current_earnings(last-year income == currentWSAL_VAL/SEMP_VAL;available== has-earnings). Passes.test_cps_source_provider.py(…repeat_loads_are_deterministic…,…ssn_card_type…) are pre-existing onorigin/main— they need raw CPS ASEC data / a fixture predating the export-support columns, not affected by this change.Context: #200 (post-collapse calibration/target fixes). Surfaced while auditing why a prior-year ASEC was being loaded.