Description Usage Arguments Details Value Methods (by class) Examples
Creates a ggplot2 plot object from a Raster\* object. The returned plot object can be plotted or can be enhanced with additional ggplot2 intructions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | raster_ggmap(
raster,
index = 1,
palette = "Greys",
breaks = c(0, 12, 35, 55, 150, 250, 350, Inf),
direction = 1,
title = "PM2.5",
timezone = "UTC",
col_state = "black",
col_county = "gray80",
verbose = TRUE
)
## S3 method for class 'Raster'
raster_ggmap(
raster,
index = 1,
palette = "Greys",
breaks = c(0, 12, 35, 55, 150, 250, 350, Inf),
direction = 1,
title = "PM2.5",
timezone = "UTC",
col_state = "black",
col_county = "gray80",
verbose = TRUE
)
## S3 method for class 'list'
raster_ggmap(
raster,
index = 1,
palette = "Greys",
breaks = c(0, 12, 35, 55, 150, 250, 350, Inf),
direction = 1,
title = "PM2.5",
timezone = "UTC",
col_state = "black",
col_county = "gray80",
verbose = TRUE
)
|
raster |
A Raster\* object or a list of Raster\* objects. |
index |
And index into the Raster\* object. See details. |
palette |
The color palette used to map cell values. This must be one
of the palettes available through |
breaks |
The breaks used to map cell values to colors. |
direction |
Numeric. |
title |
(Optional) A plot title. |
timezone |
Olson timezone in which times will be displayed. |
col_state |
Color of state lines. (use |
col_county |
Color of county lines. (use |
verbose |
Logical to display messages. |
If a list of Raster\* objects is provided, a small-multiples plot is created.
The index
is typically associated with a time-axis or RasterLayer
,
e.g index = 1
is the first hour of a model.
A ggplot object.
Raster
: Method for Raster* objects.
list
: Multi-threaded method for a list of Raster* objects.
1 2 3 4 5 6 7 8 9 10 11 12 | library(AirFireModeling)
setModelDataDir('~/Data/BlueSky')
# Load model data
rasterList <- raster_load(
modelName = "PNW-4km",
modelRun = c(2020091300, 2020091400, 2020091500, 2020091600),
xlim = c(-125, -115),
ylim = c(42, 50)
)
raster_ggmap(rasterList, title="PNW-4km", index = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.