Learn R Programming

PWFSLSmoke (version 1.2.2)

monitor_esriMap: Create an ESRI Map of ws_monitor Object

Description

Creates an ESRI map of a ws_monitor object.

#' Available maptypes include:

  • natGeo

  • worldStreetMap

  • worldTopoMap

  • satellite

  • deLorme

Additional base maps are found at: http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Basemaps/02r3000001mt000000/

If centerLon, centerMap or zoom are not specified, appropriate values will be calcualted using data from the ws_monitor$meta dataframe.

Usage

monitor_esriMap(ws_monitor, slice = get("max"), breaks = AQI$breaks_24,
  colors = AQI$colors, width = 640, height = 640, centerLon = NULL,
  centerLat = NULL, zoom = NULL, maptype = "worldStreetMap",
  grayscale = FALSE, mapRaster = NULL, cex = par("cex") * 2,
  pch = 16, ...)

Arguments

ws_monitor

ws_monitor object

slice

either a time index or a function used to collapse the time axis -- defautls to get('max')

breaks

set of breaks used to assign colors

colors

a set of colors for different levels of air quality data determined by breaks

width

width of image, in pixels

height

height of image, in pixels

centerLon

map center longitude

centerLat

map center latitude

zoom

map zoom level

maptype

map type

grayscale

logical, if TRUE the colored map tile is rendered into a black & white image

mapRaster

optional RGB Raster* object returned from esriMap_getMap)

cex

character expansion for points

pch

plotting character for points

...

arguments passed on to esriMap_plotOnStaticMap (e.g. destfile, cex, pch, etc.)

Value

Plots a map loaded from arcGIS REST with points for each monitor

See Also

esriMap_plotOnStaticMap

Examples

Run this code
# NOT RUN {
N_M <- Northwest_Megafires
# monitor_leaflet(N_M) # to identify Spokane monitorIDs
Spokane <- monitor_subsetBy(N_M, stringr::str_detect(N_M$meta$monitorID,'^53063'))
Spokane <- monitor_subset(Spokane, tlim=c(20150815, 20150831))
monitor_esriMap(Spokane)
# }

Run the code above in your browser using DataLab