library(tigris)
library(tidyverse)
library(sf)
<- places("WA", cb = TRUE) %>%
smallwood filter(str_detect(NAME, "Winthrop"))
<- roads("WA", "Okanogan County") %>%
smallwood_roads st_intersection(smallwood) %>%
filter(st_is(., "LINESTRING"))
Day 16 Minimal
Code source
Minimal Roads from https://twitter.com/kyle_e_walker/status/1592857115928199169
Uses the {tigris} package which downloads shapefiles from the United States Census Bureau and loads them into R as ‘sf’ objects.
Code to download the data
Plot code
ggplot(smallwood_roads) +
geom_sf() +
theme_minimal(base_size = 16) +
labs(title = "Roads in Winthrop, WA")