nycflights | R Documentation |
On-time data for a random sample of flights that departed NYC (i.e. JFK, LGA or EWR) in 2013.
nycflights
A tbl_df with 32,735 rows and 16 variables:
Date of departure.
Departure and arrival times, local tz.
Departure and arrival delays, in minutes. Negative times represent early departures/arrivals.
Time of departure broken in to hour and minutes.
Two letter carrier abbreviation. See airlines
in the
nycflights13
package for more information or google the airline code.
Plane tail number.
Flight number.
Origin and destination. See airports
in the
nycflights13
package for more information or google airport the code.
Amount of time spent in the air.
Distance flown.
Hadley Wickham (2014). nycflights13: Data about flights departing NYC in 2013. R package version 0.1.
library(dplyr)
# Longest departure delays
nycflights |>
select(flight, origin, dest, dep_delay, arr_delay) |>
arrange(desc(dep_delay))
# Longest arrival delays
nycflights |>
select(flight, origin, dest, dep_delay, arr_delay) |>
arrange(desc(arr_delay))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.