Tropical Storms

Maddy Ramser

2018-09-13

More weather

Using data from the nasaweather package, use the geom_path function to plot the path of each tropical storm in the storms data table that occurred in the year 2000. Use color to distinguish the storms from one another.

SOLUTION:

Without the Map

storms2000 <- filter(storms, year == 2000)
ggplot(storms2000, aes(x = long, y = lat, group = name)) + geom_path(aes(color = month)) + facet_wrap(~type) + labs(x = "Longitude", y = "Latitude", title = "Path of Storms by Type in 2000", color = "Month") + theme(plot.title = element_text(hjust = 0.5))
Paths taken by tropical storms that occurred in 2000, separated by type

Paths taken by tropical storms that occurred in 2000, separated by type

Map Overlay

ggplot(storms2000, aes(x = long, y = lat, group = name)) + geom_path(aes(color = month), na.rm = TRUE) + borders("world", colour="gray50", fill="gray50", xlim = c(-100,0), ylim = c(0,70)) + coord_fixed() + facet_wrap(~type) + labs(x = "Longitude", y = "Latitude", title = "Path of Storms by Type in 2000", color = "Month") + theme(plot.title = element_text(hjust = 0.5))
Paths taken by tropical storms that occurred in 2000, separated by type

Paths taken by tropical storms that occurred in 2000, separated by type