The package provides a function tidy_ext_tracks to clean the data. It further provides a function hurricane that retrieves a single storm from the data.

library(geomhurricane)

hurricanes <- tidy_ext_tracks(ext_tracks)
ike <- hurricane(hurricanes, "Ike-2008", "2008-09-13")

Once the data is cleaned, you can plot a wind rose, e.g.:

library(ggmap)
library(ggplot2)

map_data <- get_map("Louisiana", zoom = 6, maptype = "toner-background")
base_map <- ggmap(map_data, extent = "device")

base_map +
  geom_hurricane(data = ike,
                  mapping =
                    aes(x = longitude, y = latitude,
                                 r_ne = ne,
                                 r_se = se,
                                 r_sw = sw,
                                 r_nw = nw,
                                 fill = as.factor(wind_speed),
                                 scale_radii = 0.5)) +
  scale_color_manual(name = "Wind speed (kts)",
                     values = c("red", "orange", "yellow")) +
  scale_fill_manual(name = "Wind speed (kts)",
                    values = c("red", "orange", "yellow"))


niklaas/geomhurricane documentation built on May 29, 2019, 7:18 a.m.