# NOT RUN {
# If daily avg data were the prediciton and Spokane were
# the observed, which WA State monitors had skill?
wa <- airnow_loadAnnual(2017) %>% monitor_subset(stateCodes='WA')
wa_dailyAvg <- monitor_dailyStatistic(wa, mean)
Spokane_dailyAvg <- monitor_subset(wa_dailyAvg, monitorIDs='530630021_01')
threshold <- AQI$breaks_24[4] # Unhealthy
performanceMetrics <- monitor_performance(wa_dailyAvg,
Spokane_dailyAvg,
threshold, threshold)
monitorIDs <- rownames(performanceMetrics)
mask <- performanceMetrics$heidkeSkill &
!is.na(performanceMetrics$heidkeSkill)
skillfulIDs <- monitorIDs[mask]
skillful <- monitor_subset(wa_dailyAvg, monitorIDs=skillfulIDs)
monitor_leaflet(skillful)
# }
Run the code above in your browser using DataLab