Short Task 2
Using the Tigris Package
Open a new script in RStudio and run the lines of code below.
library(tigris)
library(ggplot2)
manhattan_roads <- roads("NY", "New York")
ggplot(manhattan_roads) +
geom_sf() +
theme_void()
Explain what the code above does, where the data comes from, and the purpose of the
tigrispackage. Note: you are encouraged to look at function documentation and search online.Adjust the code and complete all operations above but for your home county.
Note: if you are receiving error messages in trying to load the tigris package
or in using tigris functions such as roads (especially in the virtual lab),
try the following:
update.packages(ask = FALSE)