Description Usage Arguments Value Examples
View source: R/monitor_toRaster.R
Create a Raster from monitor object
1 | monitor_toRaster(ws_monitor = NULL, raster = NULL, FUN = mean)
|
ws_monitor |
PWFSLSMoke ws_monitor object. |
raster |
Raster* object defining the output grid. |
FUN |
Function used to collapse values when multiple monitors lie within a single grid cell. |
A RasterBrick
object.
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 | # library(AirFireModeling)
setModelDataDir('~/Data/BlueSky')
# Load model data
rasterList <- raster_load(
modelName = c("PNW-4km"),
modelRun = c(2020091300),
xlim = c(-125, -117),
ylim = c(45.5, 49)
)
# Load monitor data
ws_monitor <-
PWFSLSmoke::monitor_load(
startdate = 2020091301,
enddate = 2020091600
) %>%
PWFSLSmoke::monitor_subset(stateCodes = "WA")
monitor_rasterBrick <- monitor_toRaster(ws_monitor, rasterList[[1]], mean)
raster_facet(
monitor_rasterBrick,
index = 1:6,
title = "Monitoring data",
palette = 'Spectral',
col_county = 'gray95',
direction = -1,
breaks = c(-Inf, 0, 12, 35, 55, 150, 250, 350, Inf)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.