2 min read

Hurricane Ian Tracker

A Quick Map Tracking Hurrican Ian

It is hurricane season which is beginning with an incredibly potent hurricane named Ian.

For this post, we’ll create a quick interactive map to plot the forecast path as estimated by the National Oceanic and Atmospheric Administration (NOAA), National Hurricane Center.

The data used for this post can be found (here)1

####Load the Data

path_layer <- dir_ls(paste0(getwd(),"/data/"), regexp = "pgn.shp")[1]
point_layer <- dir_ls(paste0(getwd(), "/data/"), regexp  = "pts.shp")[1]
line_layer <- dir_ls(paste0(getwd(), "/data/"), regexp = "lin.shp")[1]

# Read in data files
g_poly <- read_sf(path_layer)
g_point <- read_sf(point_layer)
g_line <- read_sf(line_layer)

# Remove tempdirectory set of files to clean-up space

# unlink(td)

Build Map

Next we will build our interactive map which includes: 1. Cone of the estimated path (polygon) 2. Middle line of expected path (line) 3. The updated estimates of variable severity (points) 4. Additional popup functionality for the popup on each of the points

map_title <- paste(g_point$STORMNAME[1], "\n Est. as of:", g_point$ADVDATE[1])



# Create popup for each of the point estimates
popup <- paste0("Forecast TS: ", g_point$FLDATELBL,"<br>",
                "Storm Type: ", g_point$TCDVLP, "<br>", 
                "Est. Max Wind: ", g_point$MAXWIND,"<br>",
                "Est. Gust: ", g_point$GUST, "<br>")

 

# Build all map layers
m <- leaflet()%>%
  addProviderTiles("OpenTopoMap")%>%
  addPolygons(data = g_poly, 
              color = "black", 
              weight = "2", 
              fillColor="red", 
              fillOpacity = 0.3)%>%
  addPolylines(data = g_line)%>%
  addCircleMarkers(data = g_point, 
                   color = "red", 
                   radius = 2, 
                   # label = g_lab,
                   labelOptions = labelOptions(noHide = F, textOnly = F),
                   popup = popup)%>% 
  addControl(map_title, position = "bottomright")


m