You have 120 min to work on answering these questions, make sure to put your answers in this document. This is the file that you will be asked to hand in.

Data on all flights in and out of Des Moines (DSM) for October 2008 are available at http://www.hofroe.net/data/dsm-flights.csv (a copy is also available in the data folder in Canvas).
See http://stat-computing.org/dataexpo/2009/the-data.html for a description of the variables.

Update: the link to the csv file above is not valid anymore. Please use the following code to load the data

flights <- read.csv("https://raw.githubusercontent.com/DS202-at-ISU/DS202-at-ISU.github.io/master/exams/dsm-flights.csv")
  1. Load the flights data into R.
    Determine, which flight was delayed the most on arrival. Report its row number, where it started, and by how much the flight was delayed on departure.

# place the code for your answer here
  1. Bring the variable ‘Day’ into the correct order, starting with ‘Monday’.
# place the code for your answer here
  1. Create a new variable called ‘Weekend’ which has value TRUE for Saturdays and Sundays and FALSE otherwise.
# place the code for your answer here
  1. Determine how many flights arrived in Des Moines on average each day of the week.
# place the code for your answer here
  1. How many flights were scheduled to go to Denver (DEN)? What percentage of flights goes to Denver?
# place the code for your answer here
  1. Where do most flights arriving in Des Moines come from? (use IATA code)

# place the code for your answer here
  1. Plot boxplots of arrival delays by originating airports. Order boxplots according to increasing median arrival delay.

# place the code for your answer here
  1. Using dplyr, determine for flights leaving DSM for each hour of the day

Draw a scatterplot of average departure delay by scheduled hour of departure. Color points by top destination, adjust point size to reflect the number of flights for each hour.

# place the code for your answer here