Mapping with shapefiles in R

Viewed 13

I have a shapefile with tons of different polygons representing different bodies of water (lakes, rivers etc.)

I would like to create a map of certain polygons. All of the current examples I could find only show how to plot shapefiles with ONLY the polygons wanted in them. So I am not sure how to only plot the specific polygons.

Link to the shapefile: https://hub.arcgis.com/datasets/esri::usa-detailed-water-bodies/explore?location=45.461044%2C-84.374110%2C10.71

I would like to plot OBJECTID295061, 295018, and 295017

Current code:

library(sf)
shp = st_read("USA_Detailed_Water_Bodies.shp")
ggplot(data = shp) + 
  geom_sf()+ 
  coord_sf()+
  theme_bw()

Current map: enter image description here

0 Answers
Related