Skip to main content

Data Structure

The F1 Stats Archive organizes data in a hierarchical directory structure:

Reading JSON Data with Python

Basic File Reading

Here’s how to read race results from the archive:

Traversing the Directory Structure

Use Python’s pathlib module to programmatically explore the archive:
Race folder names are created by converting the race name to lowercase and replacing spaces with hyphens.

Common Query Examples

Find All Races in 2024

Get Fastest Lap Times for a Race

Query Race Results

Analyze Driver Points Progression

Working with Multiple Races

Not all races have complete data available. Always check if files exist and handle missing data gracefully.

Data Format Notes

  • All timestamps are in ISO 8601 format
  • Times are typically in UTC
  • Lap times are formatted as strings (e.g., “1:32.123”)
  • The data follows the Ergast API JSON schema
  • Some historical races may have incomplete data