## A compact reserve
### set plotting parameters
stations <- sampling_stations[(sampling_stations$NERR.Site.ID == 'elk'
& sampling_stations$Status == 'Active'
& sampling_stations$isSWMP == "P"), ]$Station.Code
to_match <- c('wq')
stns <- stations[grep(paste(to_match, collapse = '|'), stations)]
shp_fl <- elk_spatial
bounding_elk <- c(-121.8005, 36.7779, -121.6966, 36.8799)
trnds <- c('inc', 'dec', 'insuff', 'insig')
### Low zoom and default maptype plot (for CRAN testing, not recommended)
# Lower zoom number gives coarser text and fewer features
(x_low <- res_sk_map('elk', stations = stns, sk_result = trnds,
bbox = bounding_elk, shp = shp_fl,
zoom = 10))
# \donttest{
### Default zoom and maptype
x_def <- res_sk_map('elk', stations = stns, sk_result = trnds,
bbox = bounding_elk, shp = shp_fl)
### Higher zoom number gives more details, but those may not be visible
x_14 <- res_sk_map('elk', stations = stns, sk_result = trnds,
bbox = bounding_elk, shp = shp_fl,
zoom = 14)
### Different maptypes may be used.
x_terrain <- res_sk_map('elk', stations = stns, sk_result = trnds,
bbox = bounding_elk, shp = shp_fl,
maptype = 'stamen_terrain')
### A multicomponent reserve (showing two different bounding boxes)
# set plotting parameters
stations <- sampling_stations[(sampling_stations$NERR.Site.ID == 'cbm'
& sampling_stations$Status == 'Active'
& sampling_stations$isSWMP == "P"), ]$Station.Code
to_match <- c('wq')
stns <- stations[grep(paste(to_match, collapse = '|'), stations)]
shp_fl <- cbm_spatial
bounding_cbm_1 <- c(-77.393, 38.277, -75.553, 39.741)
bounding_cbm_2 <- c(-76.8, 38.7, -76.62, 38.85)
trnds <- c('inc', 'insuff', 'dec', 'insig')
# plot
y <- res_sk_map('cbm', stations = stns, sk_result = trnds,
bbox = bounding_cbm_1, shp = shp_fl)
z <- res_sk_map('cbm', stations = stns, sk_result = trnds,
bbox = bounding_cbm_2, shp = shp_fl)
# }
Run the code above in your browser using DataLab