walkerke / tidycensus

Load US Census boundary and attribute data as 'tidyverse' and 'sf'-ready data frames in R
https://walker-data.com/tidycensus
Other
638 stars 99 forks source link

Mapping between FIPS and ZIP #427

Closed PursuitOfDataScience closed 2 years ago

PursuitOfDataScience commented 2 years ago

Hi Dr. Walker,

Thanks for tidycensus an amazing R package. I've been looking inside the package to see if it provides the crosswalk between county FIPS code and zipcode across the U.S. I haven't found any, but out of curiosity, does the package provide such information? If no, could you tell me where I can find it? It would be great to have a tibble or csv file, etc. I do have the crosswalk file, but a lot of county FIPS codes are missing. Hope you can shed some light in this regard. Thanks!

szimmer commented 2 years ago

ZIP codes in the United States are NOT geographic areas. They are instead a set of addresses. They are roughly approximated by zip code tabulation areas (ZCTAs). ZIP codes can cross county and even state boundaries.

https://www.census.gov/programs-surveys/geography/guidance/geo-areas/zctas.html

I sometimes make crosswalks between areas using this tool: https://mcdc.missouri.edu/applications/geocorr2014.html

PursuitOfDataScience commented 2 years ago

Thanks for the input, but I still want to have a rough connection between them. Otherwise, the data aggregation work would be tricky, as some data is on county level, others associate with ZIP code.

szimmer commented 2 years ago

You could try using that crosswalk but it isn't a 1:1 match. Best of luck!

RickPack commented 2 years ago

@PursuitOfDataScience - are you using the COUNTY-ZIP crosswalk at https://www.huduser.gov/portal/datasets/usps_crosswalk.html or another one?

PursuitOfDataScience commented 2 years ago

Thanks @RickPack This is perfect.

image

walkerke commented 2 years ago

Thanks all for the discussion! There is also the zipcodeR R package, which may have some of this functionality built-in.