Description Usage Arguments Aestethics See Also Examples
geom_hurricane
is a special implementation of geom_polygon.
It is developed to draw the regions of a storm observation corresponding
to the same wind speed level, for the four quadrants defined by an origin
point. The contour of the "iso-speed" levels are connected by a 'polygon'
grid object.
1 2 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
... |
other arguments passed on to |
geom_hurricane
understands the following aesthetics (required in bold):
x: longitude
y: latitude
r_ne: wind radius for the NE quadrant, in nautical miles
r_se: wind radius for the SE quadrant, in nautical miles
r_nw: wind radius for the SW quadrant, in nautical miles
r_sw: wind radius for the NW quadrant, in nautical miles
colour: (see geom_polygon)
fill: (see geom_polygon)
size: (see geom_polygon)
linetype: (see geom_polygon)
alpha: (see geom_polygon)
scale_radii: scaling factor of the wind radius dimensions
geom_polygon for generic polygon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # When using `geom_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)
map_plot <- ggmap::get_map("Lousiana", zoom = 6, maptype = "toner-background", source = "stamen")
map <- map_plot %>% ggmap::ggmap(extent = "device") +
geom_hurricane(data = ike_1, mapping = aes(x = longitude, y = latitude, r_ne = ne, r_se = se, r_sw = sw,
r_nw = nw, fill = wind_speed, colour = wind_speed, scale_radii = 0.4)) +
scale_color_manual(name = "Wind speed (kts)", values = c("red", "orange", "yellow")) +
scale_fill_manual(name = "Wind speed (kts)", values = c("red", "orange", "yellow"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.