runtime

datasets real and made-up data to practise on

Datasets

Data for the Playground, Database Lab and Performance Lab. Pick one and open its files.

Real U.S. domestic flights from early 2025: schedules, delays, cancellations and diversions.

1,301 flights4 tablesJan 2025 – Mar 2025

what to watch for

Tricky rows

  • Cancelled flights: no actual times or delays (unknown, not zero)228 rows
  • Diverted flights: departed but never arrived at the scheduled destination3 rows
  • Flights that arrived early (negative arrival delay)568 rows
  • Flights scheduled to arrive on a later calendar date than they departed22 rows

files

Open a file to see what one row means, its columns and a preview. Open in Playground starts a new file there with code that loads it.

flights1,301 rows · 24 columns · CSV

One scheduled flight, including cancelled and diverted flights.

In your code: data/flights.csv

  • flight_idintegerkey

    Flight ID

  • flight_datedate

    Scheduled departure date (local)

  • airline_codetext→ airlines

    Airline code

  • flight_numberinteger

    Flight number

  • tail_numbertext · can be empty

    Aircraft registration

  • origintext→ airports

    Departure airport

  • destinationtext→ airports

    Arrival airport

  • scheduled_departuretimestamp

    Scheduled departure, origin local time

  • actual_departuretimestamp · can be empty

    Actual departure, origin local time

  • departure_delayinteger · can be empty

    Minutes late leaving (negative = early)

  • taxi_out_minutesinteger · can be empty

    Minutes from leaving the gate to take-off

  • scheduled_arrivaltimestamp

    Scheduled arrival, destination local time

  • actual_arrivaltimestamp · can be empty

    Actual arrival, destination local time

  • arrival_delayinteger · can be empty

    Minutes late arriving (negative = early)

  • air_time_minutesinteger · can be empty

    Minutes in the air

  • distance_milesinteger

    Route distance, miles

  • cancelledinteger

    1 if cancelled

  • cancellation_codetext · can be empty→ cancellation_reasons

    Why it was cancelled

  • divertedinteger

    1 if diverted

  • carrier_delayinteger · can be empty

    Delay minutes blamed on the airline (arrivals 15+ minutes late only)

  • weather_delayinteger · can be empty

    Delay minutes due to weather

  • nas_delayinteger · can be empty

    Delay minutes due to air traffic control and airport congestion

  • security_delayinteger · can be empty

    Delay minutes due to security

  • late_aircraft_delayinteger · can be empty

    Delay minutes because the aircraft arrived late

airlines14 rows · 3 columns · CSV

One airline.

In your code: data/airlines.csv

  • airline_codetextkey

    Airline code

  • airline_nametext

    Airline name

  • carrier_grouptext

    network, low-cost, ultra-low-cost or regional

airports187 rows · 8 columns · CSV

One airport that a flight here departs from or arrives at.

In your code: data/airports.csv

  • airport_codetextkey

    Three-letter airport code

  • airport_nametext · can be empty

    Airport name; sometimes empty

  • citytext

    City

  • statetext

    State or territory code

  • state_nametext

    State or territory

  • latitudedecimal · can be empty

    Latitude

  • longitudedecimal · can be empty

    Longitude

  • elevation_ftinteger · can be empty

    Elevation, feet

cancellation_reasons4 rows · 2 columns · CSV

What each cancellation code means.

In your code: data/cancellation_reasons.csv

  • codetextkey

    Code

  • reasontext

    Reason

relationships

How to join these tables. Left column matches the right column.

  • flights.airline_code → airlines.airline_code
  • flights.origin → airports.airport_code
  • flights.destination → airports.airport_code
  • flights.cancellation_code → cancellation_reasons.code

where the course uses it

Lessons and practice questions use small samples of Flights; projects open its files.

Flights dataset — Python Datasets · Runtime