Submission Details

Due date: the homework is due before class on Thursday.

Submission process: submit both the R Markdown file and the corresponding html file on canvas. Please submit both the .Rmd and the .html files separately and do not zip the two files together.


NYC flights data

  1. Download the RMarkdown file with these homework instructions to use as a template for your work. Make sure to replace “Your Name” in the YAML with your name.

  2. For this homework we will use the data sets provided by the nycflights13 package.

library(nycflights13)
library(tidyverse)
  1. What are the ten most common destinations for flights from NYC airports in 2013? Make a table that lists these in descending order and shows the number of fligts heading to each airport.
## your answer here
  1. What was the mean temperature at the origin airport on the day with the highest departure delay? Your answer should include the name of origin airport, the date with the highest departure delay, and the mean temperature on that day.
## your answer here
  1. Find the flight with the longest air time.
    (a) How long is this flight?
    (b) What city did it fly to?
    (c) How many seats does the plane that flew this flight have?
## your answer here
  1. Consider only flights that have non-missing arrival delay information. Your answer should include the name of the carrier in addition to the carrier code and the values asked. (a) Which carrier had the highest mean arrival delay? (b) Which carrier had the lowest mean arrival delay? Make sure that your answer includes the name of the carrier and the calculated mean delay.
## your answer here
  1. Which airlines have the most flights departing from NYC airports in 2013? Make a table that lists these in descending order of frequency and shows the number of flights for each airline. In your narrative mention the names of the airlines as well.
    Hint: You can use the airlines dataset to look up the airline name based on carrier code.*
## your answer here