Skip to content

Owner cost-burden measures, tenure-labeled renter measures, codebook universe statements#100

Merged
wcurrangroome merged 4 commits into
release-prep-0.1.0from
owner-cost-burden
Jul 10, 2026
Merged

Owner cost-burden measures, tenure-labeled renter measures, codebook universe statements#100
wcurrangroome merged 4 commits into
release-prep-0.1.0from
owner-cost-burden

Conversation

@wcurrangroome

Copy link
Copy Markdown
Collaborator

Stacked on #99 (retargets to main automatically when that merges). Implements the B25106 product decision (handoff item 6) plus the codebook universe request.

New measures

tenure_by_housing_costs (B25106) — previously raw counts only:

  • cost_burdened_owner_30percentormore_allincomes_percent
  • cost_burdened_owner_30percentormore_incomeslessthan35000_percent / ..._incomeslessthan50000_percent
  • cost_burdened_alltenures_30percentormore_allincomes_percent

owner_cost_burden (B25091, new table) — owner burden by mortgage status, including severe burden (B25106 tops out at 30%+, so 50%+ requires B25091):

  • cost_burdened_owner_withmortgage_30percentormore_percent / ..._50percentormore_percent
  • cost_burdened_owner_withoutmortgage_30percentormore_percent / ..._50percentormore_percent
  • cost_burdened_owner_50percentormore_allincomes_percent (combined)

Denominators exclude households with no computable cost ratio (zero/negative income; renters paying no cash rent; B25091 "not computed"), consistent with the existing B25074 renter measures. Breaking: the six existing renter measures gain an explicit tenure label — cost_burdened_*cost_burdened_renter_*.

Codebook universe statements

The codebook gains a universe column with the Census Bureau's published universe statement per variable ("Households", "Population 25 years and over", ...), fetched from the keyless groups.json endpoint via a new session-cached load_acs_groups(). Derived variables inherit their numerator's universe; complements inherit through their source; metadata fields read "Not applicable". Universes exist for 2020+ vintages; earlier years yield NA.

Verification

  • Live NJ-county compile: all nine measures bounded, non-missing, MOEs and codebook rows present; all-tenures rate falls between owner and renter rates in every county; magnitudes match expectations (owner 28% vs renter 52% burdened; with-mortgage 32% vs without 21%).
  • Universe spot checks match published Census statements exactly; pre-2020 vintages degrade to NA without error.
  • Fixtures regenerated (1,808 columns / 908 codebook rows); full suite: 1611 passed / 0 failed.

William Curran-groome added 4 commits July 4, 2026 23:09
…by tenure

- tenure_by_housing_costs (B25106) gains owner 30-percent-or-more burden
  shares (all incomes, incomes below $35k, below $50k) and an all-tenures
  headline share. Denominators exclude households with no computable cost
  ratio (zero/negative income; renters paying no cash rent), which B25106
  reports as standalone lines outside the cost bands.
- New owner_cost_burden table (B25091, selected monthly owner costs as a
  percentage of household income) adds 30- and 50-percent-or-more burden
  shares by mortgage status plus a combined all-owners severe-burden share;
  not-computed households are excluded from denominators, matching the
  B25074 renter measures.
- The six existing renter measures are renamed cost_burdened_* ->
  cost_burdened_renter_*, disambiguating them from the new owner measures.
- make_pretty_names() learns the new tokens and the 10.0-19.9 cost bands.
New universe column carries the Census Bureau's published universe
statement for each variable (e.g., "Households", "Population 25 years
and over"). Raw variables resolve via a new session-cached
load_acs_groups() fetch of the groups.json endpoint (keyless); derived
variables inherit their first numerator's universe, with a second pass so
complements inherit through their source variable; metadata fields read
"Not applicable". The API publishes universes for 2020+ vintages (the
field name carries a trailing space); earlier vintages yield NA.
@wcurrangroome wcurrangroome merged commit 24f7081 into release-prep-0.1.0 Jul 10, 2026
2 checks passed
@wcurrangroome wcurrangroome deleted the owner-cost-burden branch July 10, 2026 02:11
wcurrangroome added a commit that referenced this pull request Jul 10, 2026
Sync the renv library and lockfile: Rcpp, bit64, openssl, and rlang move
to current CRAN versions (exact pinned versions are no longer available
as binaries and source compilation fails locally); renv upgraded to
1.2.3 per the lockfile, which rewrites renv.lock in its slimmer record
format and updates renv/activate.R. Package set is unchanged (61
packages). Full test suite passes (1645 tests, 0 failures).

Also remove dev/release-decisions.md: every handoff item is resolved
now that PRs #99 and #100 are merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant