Source: Defense Visual Information Distribution Service
The NYC Flights Dataset contains data for all flights that departed from New York City area airports (JFK, LGA, and EWR) in 2013. It is available as a package in R Studio.
# A tibble: 18,460 × 3
carrier arr_delay dep_delay
<chr> <dbl> <dbl>
1 9E 11 0
2 9E -2 -9
3 9E -2 -3
4 9E -1 -6
5 9E -5 -8
6 9E -5 0
7 9E 5 6
8 9E 13 0
9 9E -8 -8
10 9E -33 -6
# ℹ 18,450 more rows
# A tibble: 32,729 × 3
carrier arr_delay dep_delay
<chr> <dbl> <dbl>
1 AA 33 2
2 AA 8 -2
3 AA 31 -1
4 AA -12 -4
5 AA 5 13
6 AA -3 -2
7 AA 14 -1
8 AA 48 0
9 AA 4 -4
10 AA -10 -3
# ℹ 32,719 more rows
# A tibble: 714 × 3
carrier arr_delay dep_delay
<chr> <dbl> <dbl>
1 AS -10 -1
2 AS -19 -7
3 AS -41 -3
4 AS 1 3
5 AS -18 -1
6 AS -9 2
7 AS 1 0
8 AS -29 -7
9 AS -19 0
10 AS -12 -12
# ℹ 704 more rows
# A tibble: 54,173 × 3
carrier arr_delay dep_delay
<chr> <dbl> <dbl>
1 EV -14 -3
2 EV 29 -6
3 EV 12 24
4 EV -7 -6
5 EV -26 -4
6 EV 23 -2
7 EV -2 -8
8 EV -18 -4
9 EV -4 0
10 EV -14 0
# ℹ 54,163 more rows
# A tibble: 342 × 3
carrier arr_delay dep_delay
<chr> <dbl> <dbl>
1 HA -14 -3
2 HA -5 9
3 HA -26 14
4 HA -14 0
5 HA -11 -2
6 HA 28 79
7 HA 50 102
8 HA -26 1
9 HA 1272 1301
10 HA -41 -1
# ℹ 332 more rows
# A tibble: 58,665 × 3
carrier arr_delay dep_delay
<chr> <dbl> <dbl>
1 UA 11 2
2 UA 20 4
3 UA 12 -4
4 UA 7 -2
5 UA -14 -2
6 UA -8 -1
7 UA -17 0
8 UA 14 11
9 UA 1 -4
10 UA 29 -2
# ℹ 58,655 more rows
# A tibble: 20,536 × 3
carrier arr_delay dep_delay
<chr> <dbl> <dbl>
1 US 3 -8
2 US 0 -3
3 US -9 -1
4 US -11 -2
5 US -4 -7
6 US 10 -4
7 US -5 -2
8 US -29 -7
9 US 11 -5
10 US -15 -1
# ℹ 20,526 more rows
library(treemap)library(RColorBrewer)treemap(delays_by_airline, index="carrier", vSize="flight_frequency", vColor="mean_dep_delay", type="manual", title ="Mean Departure Delays and Number of Flights (2013)",fontsize.title =18,title.legend ="Mean Departure Delay",force.print.labels =TRUE,palette="PuRd", aspRatio =NA)
Source: Federal Aviation Administration
Final Thoughts:
The airlines responsible for the most flights out of NYC in 2013 had mean departure delays closest to the median. The exception was ExpressJet Airlines, which had one of the highest mean departure delays, while third in the number of flights flown to and from NYC airports. Airlines operating fewer flights to and from NYC were more likely to have a very high or very low mean departure delay.