Created
November 7, 2018 14:20
-
-
Save walkerke/050c9113fc2aabdd0d1c96bf7add606b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tigris) | |
library(tidyverse) | |
options(tigris_class = "sf") | |
# Get a vector of county codes | |
ia_counties <- counties("IA", cb = TRUE, resolution = "20m") %>% | |
pull(COUNTYFP) | |
# Iterate through the county codes and combine the result | |
ia_roads <- map(ia_counties, ~{ | |
roads(state = "IA", county = .x) | |
}) %>% | |
rbind_tigris() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment