Welcome, Guest
Username: Password: Remember me

TOPIC: POTM-04 (Aug): Mapping a Reserve and its sites

POTM-04 (Aug): Mapping a Reserve and its sites 10 months 3 weeks ago #27

Hi Everyone! Here is the August Plot of the Month.

This month’s plot uses the SWMPr map_reserve() function to create a map of all stations within a reserve, or to plot a single station within that reserve.


To plot an entire reserve, pass the three-character code for that reserve (e.g. “noc” or “wqb”). A listing of these reserve codes is available here.


To plot a single station within a reserve, pass the five-character code for that station (e.g. “nocec”). Note that the map will automatically center itself on that one station.

map_reserve(‘wqb’, zoom = 13)

The optional “zoom=” parameter defaults to 11. For the entire Waquoit Bay reserve, a zoom level of 13 or 14 works well. Note that if you zoom in or out too far, you may get a warning message and/or no plot. In general, start at zoom=11 and slowly increasing up or down to get the framing you desire.

map_reserve(‘wqb’, zoom = 14, map_type=”hybrid”)

The optional “map_type=” parameter defaults to “terrain”. Other options include “satellite”, “hybrid”, and “roadmap”, with examples shown below.

map_reserve(‘wqb’, zoom = 14, map_type = "hydrid", text_sz = 10, text_col = "white")

The option “text_sz=” and “text_col=” variables allow you to change the size and color of the station labels displayed on the map. The default size is 6 with the color “black”. When using satellite or hybrid backgrounds, you may want to use a white font color. Font size may require changing depending on proximity of stations and/or zoom levels.

The map_reserve() function is built off of the ggmap package.
Last Edit: 10 months 3 weeks ago by Todd.OBrien.
The administrator has disabled public write access.
Time to create page: 0.110 seconds
Powered by Kunena Forum