How to load session data including laps, telemetry, weather, and messages
After obtaining a Session object, you need to load the actual data using the load() method. This page explains the loading process and what data becomes available.
You can load only specific types of data to save time:
# Fast loading - only timing datasession.load(laps=True, telemetry=False, weather=False, messages=False)laps = session.laps
Loading all data is recommended for full functionality. FastF1 internally mixes data from multiple sources to correct errors and add additional information.
session.load(laps=True)# Access all lapslaps = session.laps # Laps object (DataFrame-like)# Driver listdrivers = session.drivers # List of driver numbers as strings# Session informationresults = session.results # SessionResults with driver infototal_laps = session.total_laps # Total number of laps (race/sprint only)# Session status and timingsession_status = session.session_status # DataFrametrack_status = session.track_status # DataFramesession_start = session.session_start_time # Timedelta
session.load(telemetry=True)# Car data by driver number (as strings)car_data = session.car_data # Dict[str, Telemetry]ver_car_data = session.car_data['1'] # Verstappen's car data# Position data by driver numberpos_data = session.pos_data # Dict[str, Telemetry]ver_pos_data = session.pos_data['1'] # Verstappen's position data# Reference timestampt0 = session.t0_date # Timestamp marking start of data stream
session.load(messages=True)messages = session.race_control_messages # DataFrame# Message data includes:# - Time: When the message was sent# - Category: Message category# - Message: Full message text# - Status: Track/session status# - Flag: Any flag information
You can save live timing data during a session and replay it later:
from fastf1.livetiming.data import LiveTimingData# Save live timing data (during live session)livedata = LiveTimingData('path/to/save')# ... data is saved automatically ...# Replay saved data latersession = fastf1.get_session(2023, 'Monaco', 'Q')session.load(livedata=livedata)
Some sessions may fail to load or have missing data:
import fastf1from fastf1.exceptions import DataNotLoadedError, NoLapDataErrortry: session = fastf1.get_session(2023, 'Monaco', 'Q') session.load() laps = session.lapsexcept NoLapDataError: print("No lap data available for this session")except Exception as e: print(f"Error loading session: {e}")
FastF1 uses “soft exceptions” for some errors, logging warnings instead of raising exceptions. Check logs for warnings about missing or incomplete data.