This function uses confusion matrix analysis to calculate different
measures of predictive performance for every timeseries found in
predicted
with respect to the observed values found in the single
timeseries found in observed
.
Using a single number for the breaks
argument will cause the algorithm
to use quantiles to determine breaks.
monitor_performanceMap(
predicted,
observed,
threshold = AQI$breaks_24[3],
cex = par("cex"),
sizeBy = NULL,
colorBy = "heidikeSkill",
breaks = c(-Inf, 0.5, 0.6, 0.7, 0.8, Inf),
paletteFunc = grDevices::colorRampPalette(RColorBrewer::brewer.pal(length(breaks),
"Purples")[-1]),
showLegend = TRUE,
legendPos = "topright",
stateCol = "grey60",
stateLwd = 2,
countyCol = "grey70",
countyLwd = 1,
add = FALSE,
...
)
ws_monitor object with predicted values
ws_monitor object with observed values
value used to classify predicted
and observed
measurements
the amount that the points will be magnified on the map
name of the metric used to create relative sizing
name of the metric used to create relative colors
set of breaks used to assign colors or a single integer used to provide quantile based breaks - Must also specify the colorBy paramater
a palette generating function as returned by
colorRampPalette
logical specifying whether to add a legend (default:
TRUE
)
legend position passed to legend()
color for state outlines on the map
width for state outlines
color for county outline on the map
width for county outlines
logical specifying whether to add to the current plot
additional arguments to be passed to the maps::map()
funciton such as graphical parameters (see code?par)
Setting either sizeBy
or colorBy
to NULL
will cause the
size/colors to remain constant.
# NOT RUN {
# Fail gracefully if any resources are not available
try({
library(PWFSLSmoke)
# Napa Fires -- October, 2017
ca <- airnow_load(2017) %>%
monitor_subset(tlim=c(20171001,20171101), stateCodes='CA')
Vallejo <- monitor_subset(ca, monitorIDs='060950004_01')
Napa_Fires <- monitor_subsetByDistance(ca,
longitude = Vallejo$meta$longitude,
latitude = Vallejo$meta$latitude,
radius = 50)
monitor_performanceMap(ca, Vallejo, cex = 2)
title('Heidke Skill of monitors predicting another monitor.')
}, silent = FALSE)
# }
Run the code above in your browser using DataLab