# NOT RUN {
# Fail gracefully if any resources are not available
try({
library(PWFSLSmoke)
wa <-
monitor_loadLatest() %>%
monitor_subset(stateCodes = "WA")
geojson_file <- tempfile(fileext = ".geojson")
wa_current_geojson <- monitor_writeCurrentStatusGeoJSON(wa, geojson_file)
wa_current_list <- jsonlite::fromJSON(wa_current_geojson)
wa_spdf <- rgdal::readOGR(dsn = geojson_file)
map("state", "washington")
points(wa_spdf)
}, silent = FALSE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab