Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update zip code/congressional district relationships (fixes #29) #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

awallender
Copy link

Updated congressional districts using the Census' "National 2020 118th Congressional District to 2020 Zip Code Tabulation Area (ZCTA) Relationship File" (https://www2.census.gov/geo/docs/maps-data/data/rel2020/cd-sld/tab20_cd11820_zcta520_natl.txt) accessed on Sept. 19, 2023.

I obtained the updated listing using the following code to convert the downloaded relationship file to have the same structure as the existing zip_to_cd.rda file:

library(tidyverse)

zip_to_cd <- read_delim("./tab20_cd11820_zcta520_natl.txt") %>% 
  select(GEOID_ZCTA5_20, GEOID_CD118_20) %>% 
  rename(ZIP = GEOID_ZCTA5_20, CD = GEOID_CD118_20) %>% 
  filter(!is.na(ZIP))

This update fixes Issue #29 by utilizing updated congressional district mappings.

Updated congressional districts using the Census' "National 2020 118th Congressional District to 2020 Zip Code Tabulation Area (ZCTA) Relationship File" (https://www2.census.gov/geo/docs/maps-data/data/rel2020/cd-sld/tab20_cd11820_zcta520_natl.txt) accessed on Sept. 19, 2023.
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.

Outdated congressional districts in "data/zip_to_cd.rda"
1 participant