Skip to content

Instantly share code, notes, and snippets.

@walkerke
Created August 19, 2016 00:20
Show Gist options
  • Save walkerke/ee370bad8458631a37b01b1616b9e317 to your computer and use it in GitHub Desktop.
Save walkerke/ee370bad8458631a37b01b1616b9e317 to your computer and use it in GitHub Desktop.
library(tigris)
library(sp)
div <- divisions()
zips <- zctas(cb = TRUE)
ne <- div[div$NAME == "New England", ]
ne_over <- over(ne, zips, returnList = TRUE)[[1]]
ne_zips <- zips[zips$GEOID10 %in% ne_over$GEOID10, ]
plot(ne_zips)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment