The F1 Stats Archive collects comprehensive Formula 1 statistics from the Ergast API using a suite of Python scripts. Each script is responsible for fetching a specific type of data and storing it in a structured format.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/TracingInsights-Archive/Stats/llms.txt
Use this file to discover all available pages before exploring further.
Data Collection Workflow
The data collection process follows a specific order:- Events - Fetch race calendars for each season
- Race Results - Collect finishing positions and race outcomes
- Qualifying Results - Gather qualifying session data
- Standings - Calculate driver and constructor championship points
- Lap Times - Retrieve detailed lap-by-lap timing data
- Pitstops - Collect pit stop information (2011 onwards)
- Sprint Races - Fetch sprint race results (2021 onwards)
Directory Structure
Data is organized in a hierarchical structure:API Base URL
All scripts use the Ergast API via Jolpi:Rate Limiting Strategy
All scripts implement rate limiting using one of these approaches:Time-based Delay
Adaptive Rate Limiting
Common Utilities
Race Name Slugification
All scripts convert race names to folder names consistently:Directory Creation
Logging
Most scripts use Python’s logging module for tracking progress:Each script writes logs to both a file and the console, making it easy to monitor progress and debug issues.
Data Availability
Different types of data are available for different time periods:| Data Type | Available From | Notes |
|---|---|---|
| Events | 1950 | Full F1 history |
| Race Results | 1950 | Complete results |
| Qualifying | 1994 | Earlier years may be incomplete |
| Standings | 1950 | Championship points |
| Lap Times | 1996 | Lap-by-lap timing |
| Pitstops | 2011 | Detailed pit stop data |
| Sprint Races | 2021 | Only for sprint race weekends |
Next Steps
Events
Learn how to fetch race calendars
Race Results
Collect race finishing positions
Qualifying
Gather qualifying session data
Standings
Calculate championship points