Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Reporting-carrier flight on-time, delay, cancellation, and diversion records for building airport and airline reliability monitors.
From source to product signal
BTS publishes monthly on-time performance for U.S. reporting carriers. Start with one month's pre-zipped file and a few origin airports. Delay minutes and cause codes are carrier-reported, and merger reporting codes change over time.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
from io import BytesIO
from zipfile import ZipFile
import pandas as pd
import requests
url = (
"https://transtats.bts.gov/PREZIP/"
"On_Time_Reporting_Carrier_On_Time_Performance_1987_present_2025_7.zip"
)
response = requests.get(url, timeout=30)
response.raise_for_status()
with ZipFile(BytesIO(response.content)) as archive:
name = next(member for member in archive.namelist() if member.endswith(".csv"))
on_time = pd.read_csv(
archive.open(name),
usecols=["Origin", "Dest", "Reporting_Airline", "ArrDelay", "Cancelled"],
nrows=5000,
)
on_time["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(on_time.head(20))Test a useful signal
Describe typical arrival delay and cancellation rates from a bounded monthly sample.
Bureau of Transportation Statistics is a government source. Last verified 2026-08-14. Temporal coverage: January 1995-present.