Skip to content

Instantly share code, notes, and snippets.

@ianmcook
Last active September 10, 2017 17:04
Show Gist options
  • Save ianmcook/201527e8bde4738553b51314f85b412b to your computer and use it in GitHub Desktop.
Save ianmcook/201527e8bde4738553b51314f85b412b to your computer and use it in GitHub Desktop.
Map of active weather alerts for Florida
devtools::install_github("ianmcook/weatherAlerts")
devtools::install_github("ianmcook/weatherAlertAreas")
library(weatherAlerts)
library(leaflet)
alerts <- getAlerts("FL") # takes about 30 seconds
severity <- alerts@data$severity
colorMap <- c(Minor = "green",
Moderate = "yellow",
Severe = "red",
Extreme = "magenta",
Unknown = "white")
severityColors <- unname(colorMap[severity])
leaflet() %>%
addTiles() %>%
addPolygons(data = alerts, color = "black", fillColor = severityColors, weight = 1)
@ianmcook
Copy link
Author

ianmcook commented Sep 9, 2017

At 2017-09-09 14:15 EDT as Hurricane Irma approaches:
fl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment