First we load the peptools package. Note that we do not need to install it every time we use R, but we do need to load the package.
The package includes a
pepstations data object that
includes metadata for each station, including lat/lon and bay segment.
We can use the sf and dplyr package to make this a spatial data object,
then plot it with mapview (you may need to install these packages if you
don’t have them). Note that the peptools package has built-in mapping
functions, this example just shows how to create a map from scratch.
pepseg data object also included with the package
shows the polygons for the bay segments.