Last active
September 10, 2017 17:04
-
-
Save ianmcook/201527e8bde4738553b51314f85b412b to your computer and use it in GitHub Desktop.
Map of active weather alerts for Florida
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At 2017-09-09 14:15 EDT as Hurricane Irma approaches: