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:Next Steps
Events
Learn how to fetch race calendars
Race Results
Collect race finishing positions
Qualifying
Gather qualifying session data
Standings
Calculate championship points