Created
August 26, 2020 15:17
-
-
Save ianmcook/388c780af9a8a11bbff3f2bc013b68a5 to your computer and use it in GitHub Desktop.
Map of active weather alerts for Texas and Louisiana
This file contains hidden or 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
remotes::install_github("ianmcook/weatherAlerts") | |
remotes::install_github("ianmcook/weatherAlertAreas") | |
library(weatherAlerts) | |
library(leaflet) | |
alerts <- getAlerts(c("TX", "LA")) # takes about 45 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
2020-08-26 10:15 CDT as Hurricane Laura approaches:
