Add county-level HUD utility allowance schedules for Texas and Kansas#8819
Open
hua7450 wants to merge 2 commits into
Open
Add county-level HUD utility allowance schedules for Texas and Kansas#8819hua7450 wants to merge 2 commits into
hua7450 wants to merge 2 commits into
Conversation
Move the utility allowance schedules from a hardcoded LA-only table in the formula into a parameter CSV keyed by county FIPS, bedroom count, and effective year, mirroring the fmr/ loader pattern. Adds the 28 Texas counties in the TDHCA HCV service area (2026 schedule) and four Kansas PHAs (Wichita/Sedgwick, Topeka/Shawnee, KCKHA/Wyandotte, and Johnson County), and updates LA County to the LACDA FY2025 schedule while preserving the 2023-vintage values. Each schedule is collapsed to one monthly value per bedroom size using a documented convention: Multi-Family (apartment) unit type, all- electric heating/cooking/water heating, summing every tenant-paid line item. SRO units use the published SRO row where one exists (LA), otherwise 75% of the zero-bedroom value per 24 CFR 982.604(b). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…into hud-utility-allowance-county
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8819 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 18 21 +3
=========================================
+ Hits 18 21 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PavelMakarchuk
requested changes
Jul 2, 2026
PavelMakarchuk
left a comment
Collaborator
There was a problem hiding this comment.
Review: County-level HUD utility allowance schedules (TX/KS)
Strong PR — SRO rule correct, LA backward-compat byte-for-byte, data spot-checks match, and good test coverage. Requesting changes on a few items; the first is a genuine microsim regression risk, the rest are verification/hardening.
Verified correct
- SRO = 75% of 0BR matches 24 CFR 982.604(b) exactly; published SRO rows take precedence (LA's real 179/194 used, not the 0.75× approximation).
- LA backward-compat is byte-for-byte — all 10 values for 06037/2023 reproduce the old hardcoded table; the old
default=719(bedrooms ≥8) is preserved vianp.clip(...,0,8). - Data spot-checks pass: Wichita KS 2025 (0/1/2BR = 210/224/266) exact against source; schema clean (33 counties = 1 CA + 28 TX + 4 KS, SRO as
bedrooms=-1, no duplicate merge keys). - Merge is order/length-safe; unset/unmatched
county_fips→ $0 (no NaN/crash);tenant_pays_utilitiesgate preserved; fall-forward year + bedroom capping vectorized and tested.
Requested changes
- LA detection is inconsistent across two HUD variables (please verify in microsim).
hud_utility_allowance.py:46keys LA offcounty_fips == "06037", butpha_payment_standard.py:19,37still keys LA offin_la. If the dataset storescountyfor LA households withoutcounty_fips, they'd get the LA payment standard but a $0 utility allowance — a silent regression. Likely safe (in the non-dataset pathin_laderives fromcounty_fips, and FMR already relies on it), but please confirm onenhanced_cpsor single-source the LA detection. - TX 2026 values are unverified against a source. The fetchable TDHCA schedule is the 2024 vintage (e.g. Atascosa 201/217/257); the CSV's 2026 values (206/222/265) are genuinely newer but unconfirmed — please attach/link the 2026 TDHCA schedule. Also KS counties are split across years (Sedgwick/Shawnee 2025, Johnson/Wyandotte 2026); confirm each PHA's effective date.
- Partner input-shape change (
in_la→county_fips): legacyin_la:truepayloads withoutcounty_fipsnow silently return $0. Graceful (no crash) and documented in the PR body — just confirm the API partner has been notified. - Hardcoded
0.75SRO factor (__init__.py:43) is a statutory value (24 CFR 982.604(b)) invisible to the reform/parameter system — prefer a YAML parameter applied post-lookup in the formula (FMR has the same0.15precedent, so not a hard blocker). - Add
validate="many_to_one"to the schedule merge (hud_utility_allowance.py:63) — safe today (keys are structurally unique) but fails loudly if a future CSV ever duplicates a key. - Test gaps: the non-LA
tenant_pays_utilities:trueintegration case stops athud_gross_rentand never assertshud_hap— that flow-through is the regression this PR is meant to guard, so please asserthud_haptoo. And add an unset-county_fips(microsim household) → $0 case.
Suggestions
- The loader's nearest-year logic (
_effective_year_by_county) duplicates the FMR loader's "latest ≤ target, else earliest" concept a second way — consider a shared helper. - Variable uses a
documentationfield wherereferenceis preferred (methodology already in README). - One agent saw reverse version-file diffs (
CHANGELOG.md/pyproject.toml); the GitHub file list looks clean, so likely a merge-commit artifact — worth a glance to be sure.
🤖 Reviewed with Claude Code
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
hud_utility_allowancepreviously hardcoded a Los Angeles County-only table inside the formula and returned $0 for every other county, even whentenant_pays_utilitieswas true. Sincehud_gross_rent = pre_subsidy_rent + hud_utility_allowancefeedshud_hap, this understated the Housing Choice Voucher subsidy whenever rent (not the payment standard) was the binding constraint.This PR moves the schedules into a parameter CSV keyed by county FIPS × bedroom count × effective year (mirroring the
parameters/gov/hud/fmr/loader pattern) and adds Texas and Kansas county-level schedules.Addresses the utility allowance portion of #8784.
Coverage
All other counties return $0 (documented limitation, unchanged from prior behavior).
Methodology (documented in README, loader, and variable)
Each PHA's HUD-52667 schedule is collapsed to one monthly value per bedroom size using a single convention, matching how LA County was originally modeled:
Other rules:
The formula now keys on
county_fipsinstead ofin_la. Payloads that set onlyin_la: true(withoutcounty_fips: "06037") will get a $0 utility allowance. Partner will be notified. Partner contract tests are unaffected (theirrentis an input, which cuts the affected chain, and no asserted output consumeshousing_assistance).Verification
Files
Test plan
tenant_pays_utilities: trueflowing intohud_gross_rent(this exact combination previously had zero test coverage)🤖 Generated with Claude Code