Learn R Programming

SWMPr (version 2.1.5)

map_reserve: Map a reserve

Description

Create a map of all the stations in a reserve

Usage

map_reserve(nerr_site_id, zoom = 11, text_sz = 6, text_col = "black", map_type = "terrain")

Arguments

nerr_site_id
chr string of the reserve to map, first three characters used by NERRS or vector of stations to map using the first five characters
zoom
numeric value for map zoom, passed to get_map
text_sz
numeric value for text size of station names, passed to geom_text
text_col
chr string for text color of station names, passed to geom_text
map_type
chr string indicating the type of base map obtained from Google maps, values are terrain (default), satellite, roadmap, or hybrid

Value

A ggplot object for plotting.

Details

This function is a simple wrapper to functions in the ggmap package which returns a map of all of the stations at a NERRS reserve. The zoom argument may have to be chosen through trial and error depending on the spatial extent of the reserve. A local data file included with the package is used to get the latitude and longitude values of each station. The files includes only active stations as of January 2015.

See Also

get_map, ggmap, ggplot

Examples

Run this code
## Not run: 
# ## defaults
# map_reserve('jac')
# 
# ## change defaults, map a single site
# 
# map_reserve('gtmss', zoom = 15, map_type = 'satellite', 
#  text_col = 'lightblue')
# ## End(Not run)

Run the code above in your browser using DataLab