Skip to content

Give each US geography one label across target sources #1335

Closed

Description

@anth-volk

The US release populace-us-2024-buildo-acs-local-766b7c7-20261017T030317Z (public: policyengine/populace-us, releases/<release>/calibration_diagnostics.json, schema 8, built from branch us-acs-local-live-inputs-1263 at 766b7c7, merged as #1309) gives each of its 51 state geographies two labels. For example, 0400000US23 is "Maine" on 84 IRS SOI, SNAP and Medicaid targets and "ME" on the state population target pop_state_23@2024.

Cause

  • population_target_specs in tools/build_us_acs_local_release.py labels the Census population targets' state geographies with US_STATE_FIPS_TO_POSTAL.get(fips, f"State {fips}"), a postal code. It labels congressional districts the same way ("ME congressional district 1").
  • Ledger targets (packages/microcosm-build/src/microcosm/build/ledger_targets.py) take the label from the source facts' geography name, which is the full state name. Their fallback, _geography_fallback_label, reads UK_GEOGRAPHY_ID_TO_LABEL only.
  • microcosm.calibrate.geography_constants has US FIPS-to-postal tables but no FIPS-to-name table.
  • Nothing checks that one geography ID has one label in a target registry or diagnostics file. The dashboard reports such variants but does not refuse them.

Wanted

  1. The population targets label each state with the same full name the ledger targets use for that ID, from one shared US state FIPS-to-name table; congressional district labels follow the same rule.
  2. A check where targets are assembled into a registry, before calibration, refuses a geography ID that carries more than one label, naming the ID and the labels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions