Replaces historical district names with their current canonical names (as of 2025 NM PED data). This ensures consistent district identification across years when tracking by district_name rather than district_id.
Details
Several NM districts changed names between 2019 and 2025:
CENTRAL CONS. / CENTRAL CONSOLIDATED -> CENTRAL
HATCH -> HATCH VALLEY
FT SUMNER -> FORT SUMNER
and 20+ others (see
get_district_name_mapfor the full list)
This function is applied automatically during process_enr, so
fetch_enr output already uses canonical names. You only need to
call this directly if working with raw data from get_raw_enr.
Examples
if (FALSE) { # \dontrun{
# Applied automatically by fetch_enr, but can be used manually:
raw <- get_raw_enr(2019)
processed <- process_enr(raw, 2019)
# district names are already normalized
# Or normalize manually:
df <- data.frame(district_name = c("CENTRAL CONS.", "HATCH", "ALBUQUERQUE"))
normalize_district_names(df)
# district_name
# 1 CENTRAL
# 2 HATCH VALLEY
# 3 ALBUQUERQUE
} # }