Description Usage Arguments Value Examples
View source: R/pas_staticMap.R
Creates a static map of a pas object
Users can create a map using any numeric data column within the pas object:
"pm25" "temperature" "humidity" "pressure"
"pm25_current" "pm25_10min" "pm25_30min" "pm25_1hr" "pm25_6hr"
"pm25_1day" "pm25_1week" "pwfsl_closestDistance"
Available paletteName
options include an "AQI"
color palette,
as well as a suite of sequential and diverging palettes from the
RColorBrewer R package.
The sequential palette names are
"Blues" "BuGn" "BuPu" "GnBu" "Greens" "Greys" "Oranges" "OrRd" "PuBu"
"PuBuGn" "PuRd" "Purples" "RdPu" "Reds" "YlGn" "YlGnBu" "YlOrBr" "YlOrRd"
The diverging palette names are
"BrBG" "PiYG" "PRGn" "PuOr" "RdBu" "RdGy" "RdYlBu" "RdYlGn" "Spectral"
Additional map tile info found at: http://maps.stamen.com/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | pas_staticMap(
pas = NULL,
parameter = "pm25_1hr",
paletteName = "Purples",
mapTheme = "terrain",
mapShape = "sq",
direction = 1,
minScale = 0,
maxScale = 150,
shape = 15,
size = 2,
alpha = 0.8,
bbuff = 0.5,
zoomAdjust = 0,
...
)
|
pas |
PurpleAir Synoptic pas object. |
parameter |
Value to plot, e.g. |
paletteName |
Base color or palette name to be used. |
mapTheme |
Default is "terrain", see description for additional options. |
mapShape |
Default is "square", can also be "natural". |
direction |
Legend color direction. |
minScale |
Minimum value to set scale for color gradient. Default is 0. |
maxScale |
Maximum value to set scale for color gradient. Default is 150. |
shape |
Symbol to use for points. |
size |
Size of points. |
alpha |
Opacity of points. |
bbuff |
Bounding box buffer. Default is 0.1. |
zoomAdjust |
Adjustment to map zoom level (-1:3). |
... |
Additional options: the legend can disabled |
A ggplot object.
1 2 3 4 5 6 | library(AirSensor)
LA_basin <-
example_pas %>%
pas_filterArea(-118.5, -117.5, 33.5, 34.5)
pas_staticMap(LA_basin, paletteName = "AQI", zoomAdjust = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.