Load, Re-shape & Print Sample of the Data Set

## Loading required package: ggplot2
## Loading required package: ggthemes
## Loading required package: plyr
## Loading required package: hflights
Date DayOfWeek DayOfWeekType DepartureTime Carrier FlightNumber DepartureDelay Cancelled Diverted
2011-01-01 6 Weekday 1400 AA 428 0 0 0
2011-01-02 7 Weekend 1401 AA 428 1 0 0
2011-01-03 1 Weekend 1352 AA 428 -8 0 0
2011-01-04 2 Weekday 1403 AA 428 3 0 0
2011-01-05 3 Weekday 1405 AA 428 5 0 0
2011-01-06 4 Weekday 1359 AA 428 -1 0 0

Question 1: Were there more flights on certain days of the week?

Results: I expected there to be more flights on Friday and Saturday, but the barplot shows that there were more flights on Wednesdays, Thursdays and Sundays.

Question 2: Which carrier had the greatest average Departure Delay (sum of DepartureDelay / # of flights)?

Carrier Sum of Departure Delays (Minutes) Count of Flights Avg Departure Delay (Minutes)
WN 598406 44536 13.44
B6 9019 673 13.40
UA 26258 2033 12.92
EV 26155 2121 12.33
MQ 49795 4504 11.06
DL 24034 2591 9.28
CO 642047 69373 9.25
OO 139434 15781 8.84
XE 550778 71669 7.69
AA 20364 3178 6.41
F9 4253 832 5.11
FL 9543 2111 4.52
AS 1360 364 3.74
US 6204 4030 1.54
YV 120 78 1.54

Avg Departure Delay (Minutes) = Sum of Departure Delays / Count of Flights

Results: I used the aggregate, merge and order functions to create this table that shows the WN carrier had the greatest average departure delay at nearly 13.5 minutes.

Question 3: Do departure delays accummulate more at certain times of the day?

Results: Yes, the departure delay minutes appear to increase from the morning to later at night.

…The End!