stat_hurricane computes a specific data frame of coordinates required
by geom_hurricane. It contains the geographical points corresponding
to the four quarters of circle, specified by the origin point of the storm
and the wind radii in the four quadrants, for each wind speed level.
The destPoint function is adopted to generate the points
representing the quarters of circles.
1 2 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# When using `stat_hurricane`, you will typically need a storm # observation data frame, with specific columns. You can find a # test dataset along with this package named `ike`. Consider # the following code as a test example: ## Not run: library(ggplot2) ike_1 <- ike %>% dplyr::filter(latitude > 29 & latitude < 30) plot <- ggplot(data = ike_1, mapping = aes(x = longitude, y = latitude)) + stat_hurricane(mapping = aes(x = longitude, y = latitude, r_ne = ne, r_se = se, r_sw = sw, r_nw = nw, colour = wind_speed), alpha = 0) + theme_minimal() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.