-
Notifications
You must be signed in to change notification settings - Fork 205
Description
Problem
When county is set to LOS_ANGELES_COUNTY_CA but three_digit_zip_code is empty (as in CPS data), aca_ptc evaluates to zero for all households. This affects 10 congressional districts that are entirely within LA County, representing ~$453M in ACA PTC.
Causal chain
county = LOS_ANGELES_COUNTY_CA→in_la = Trueslcsp_rating_arearoutes toslcsp_rating_area_la_county(instead ofslcsp_rating_area_default)slcsp_rating_area_la_countyneedsthree_digit_zip_codeto pick rating area 15 or 16- CPS has no zip codes → rating area = 0
slcsp_age_0treats rating_area == 0 as unknown → cost = 0 →aca_ptc = 0
Why the default path works
slcsp_rating_area_default looks up the rating area from aca_rating_areas.csv by county string. That file maps LA County to rating area 16 and works fine. But this path is bypassed whenever in_la = True.
Context
- PR Remove dead ZIP_CODE_DATASET infrastructure #7695 fixed the crash that occurred when the LA path was reached, but it returns 0 rather than falling back to a valid rating area
- Discovered while debugging county-correct
aca_ptcin calibration (Add calibration package checkpointing, target config, and hyperparameter CLI policyengine-us-data#538) - Affected CDs: CA-27, CA-28, CA-29, CA-30, CA-31, CA-32, CA-34, CA-36, CA-37, CA-42, CA-43, CA-44
Suggested fix
When slcsp_rating_area_la_county returns 0 (no zip code available), slcsp_rating_area should fall back to slcsp_rating_area_default, which correctly returns rating area 16 from aca_rating_areas.csv. This way CPS records get a valid rating area and records with zip codes still get the fine-grained 15/16 split.