Created
November 16, 2022 00:04
-
-
Save walkerke/2d4785622ee1852edeca0c4890d344bd to your computer and use it in GitHub Desktop.
This file contains hidden or 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) | |
library(sf) | |
smallwood <- places("NY", cb = TRUE) %>% | |
filter(str_detect(NAME, "Smallwood")) | |
smallwood_roads <- roads("NY", "Sullivan") %>% | |
st_intersection(smallwood) %>% | |
filter(st_is(., "LINESTRING")) | |
ggplot(smallwood_roads) + | |
geom_sf() + | |
theme_minimal(base_size = 16) + | |
labs(title = "Roads in Smallwood, NY", | |
caption = "tigris R package | @kyle_e_walker") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment