Overview
Data is collected from three primary sources, each providing different types of information:FastF1
Core telemetry, timing, and session data
MultiViewer
Real-time telemetry streams and position data
Ergast/Jolpica
Official race timing and historical data
Data Source Details
FastF1 - Primary Data Source
FastF1 - Primary Data Source
What FastF1 Provides
FastF1 is a Python library that serves as the primary data source for the majority of telemetry and timing information.Data types from FastF1:- Session information - Event names, session types, dates, and metadata
- Lap timing data - Lap times, sector times, speed trap measurements
- Tire information - Compound types, tire life, stint data
- Weather data - Air temperature, track temperature, humidity, rainfall, wind
- Driver information - Names, team assignments, car numbers
- Position data - GPS coordinates (X, Y, Z) interpolated from timing data
- Basic telemetry - Speed, throttle, brake, gear, RPM, DRS
- Track layout - Corner positions and circuit rotation data
How It’s Used
The extraction scripts (FP1.py, FP2.py, FP3.py, Q.py, R.py, etc.) use FastF1 to:Data Processing
FastF1 data undergoes several processing steps:- Session Loading - Data is fetched from F1’s timing services
- Interpolation - Position data is interpolated to match telemetry sampling rates
- Validation - Accuracy flags indicate data quality
- Gap Filling - Missing data may be interpolated (marked with
ff1Gflag)
Sampling Rate: Position data comes at ~220ms intervals, car telemetry at ~240ms intervals. FastF1 aligns these to ~270ms (3.7 Hz) for consistency.
Limitations
- GPS position data is interpolated between actual measurements
- Some laps may have gaps or inaccuracies (check
iaccflag inlaptimes.json) - Historical data quality varies by season
MultiViewer - Real-Time Telemetry
MultiViewer - Real-Time Telemetry
What MultiViewer Provides
The MultiViewer API provides real-time streaming data during live sessions.Data types from MultiViewer:- Live telemetry streams - Real-time car data during sessions
- Position updates - Current car positions on track
- Timing data - Live lap and sector times
How It’s Used
The extraction scripts fetch data from the MultiViewer API:Integration with FastF1
MultiViewer data is primarily used to:- Supplement FastF1’s telemetry data
- Provide additional real-time context
- Fill gaps in position data
MultiViewer data is merged with FastF1 data during the extraction process. The final output files contain the best available data from both sources.
Ergast/Jolpica - Official Timing
Ergast/Jolpica - Official Timing
What Ergast/Jolpica Provides
The Jolpica F1 API (successor to Ergast) provides official race timing data.Data types from Ergast/Jolpica:- Official lap times - FIA-certified race lap times
- Race results - Final classifications and positions
- Historical data - Complete historical F1 records
- Championship standings - Driver and constructor points
How It’s Used
TheLapTimes.py script specifically uses Ergast data for Race sessions only:When Ergast Data Is Used
- Race Sessions
- Practice & Qualifying
Official timing data replaces FastF1 lap times to ensure accuracy matches FIA records.The extraction process:
- Fetches base lap data from FastF1
- Retrieves official lap times from Ergast
- Overwrites the
timefield with Ergast’s official values - Preserves all other telemetry and metadata from FastF1
Why Use Ergast for Races? Race lap times are official FIA records and must be exact. Ergast provides certified timing data that matches official results.
Data Extraction Process
Extraction Scripts
The repository includes Python extraction scripts that fetch and process data: Session Scripts:FP1.py,FP2.py,FP3.py- Free Practice sessionsQ.py- QualifyingSQ.py- Sprint QualifyingSR.py- Sprint RaceR.py- Racepreseason.py- Pre-Season Testing
LapTimes.py- Generateslaptimes.jsonfiles per drivercorner.py- Extracts circuit corner data
Extraction Workflow
- Data Fetching - Scripts query FastF1, MultiViewer, and Ergast APIs
- Data Merging - Information from multiple sources is combined
- Processing - Calculations performed (e.g., acceleration from velocity)
- Serialization - Data converted to optimized JSON format
- File Writing - JSON files written to the repository structure
Computed Values
Some values are computed during extraction rather than coming directly from F1 systems: Acceleration Vectors (acc_x, acc_y, acc_z):
- Calculated using gradient analysis of position, speed, and distance
- Include smoothing (3-point and 9-point moving averages)
- Apply outlier filtering to remove unrealistic values
- Not raw IMU sensor data - mathematically derived
Acceleration data includes multi-stage outlier handling. Values exceeding realistic thresholds (~15G for lateral/vertical, 25 m/s² for longitudinal) are replaced or zeroed.
Data Update Frequency
Real-Time Updates
Data is typically updated 30 minutes after each session ends. Timeline:- Session ends (e.g., Race finishes)
- 30-minute wait - Allows F1’s systems to finalize timing data
- Extraction runs - Scripts fetch data from all sources
- Repository updated - New JSON files pushed to GitHub
The 30-minute delay ensures that official timing corrections and penalties are reflected in the data.
Historical Data
Historical seasons are complete and static. Updates only occur if:- Corrections are needed
- Data quality improvements are made
- New processing methods are applied
Data Quality Considerations
Accuracy Indicators
Each lap inlaptimes.json includes quality flags:
iacc(Is Accurate) - Basic timing accuracy check passedff1G(FastF1 Generated) - Data was interpolated or filled by FastF1del(Deleted) - Lap was deleted by stewards (e.g., track limits)delR(Deleted Reason) - Reason for deletion
Known Limitations
Best Practices
- Check accuracy flags before analyzing lap times
- Cross-reference sectors - If a lap time seems wrong, check individual sector times
- Compare multiple laps - Single-lap anomalies can be identified by comparing to nearby laps
- Consider track status - Yellow flags and safety cars affect lap validity
External Documentation
For detailed technical documentation about each data source:FastF1 Docs
API reference, tutorials, and data accuracy information
MultiViewer
Real-time telemetry streaming documentation
Jolpica F1 API
Official timing data API reference
Dependencies
The extraction scripts require the following Python packages:/requirements.txt in the source repository for complete dependencies.