Question: Using flights data from nycflights 1 3 package: 1 . Use the flights data frame to determine the average delay for each destination. Add a

Using "flights" data from nycflights13 package:
1. Use the flights data frame to determine the average delay for each destination. Add a column called avg_delay to the airports data frame and put the calculated averages for each airport into this column.
2. The statements below join two data frames, and plots the airport location on a map of the United States. Use the averages you calculated to control the sizes of the points plotted on this map (i.e., larger dots for higher delay average).
air_flights - semi_join(airports, flights, c("faa"= "dest"))
ggplot(air_flights, aes(lon, lat))+
borders("state")+
geom_point()+
coord_quickmap()
#3. Determine the 48 hour period that had the worst delays. Cross-reference this time with the weather data frame using appropriate join functions and identify any relationships or patterns.
 Using "flights" data from nycflights13 package: 1. Use the flights data

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!