# NOT RUN {
# Example: get ZCTAs that intersect the Memphis, TN urbanized area
library(tigris)
zcta1 <- zctas(cb = TRUE, starts_with = c("37", "38", "72"))
uas <- urban_areas()
memphis_ua <- uas[grep("Memphis", uas$NAME10), ]
mem_zcta <- zcta1[memphis_ua, ]
plot(mem_zcta$geometry)
# }
Run the code above in your browser using DataLab