Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

F1 Live Dashboard

A Formula 1 season dashboard featuring countdowns, real-time race schedules, live standings, qualifying results, and session timing data.

The application utilizes a serverless, static-file architecture: a background Python scraping pipeline runs automatically via GitHub Actions, updates static JSON files under the api/ directory, and serves them directly to a fast, clean HTML5/JS frontend dashboard.


Features

  • Automated Data Scraping: Scrapes standings, results, and qualifying times directly from the official F1 website.
  • Race Order Alignment: Pulls master calendar data from F1Calendar.com to map and tag sessions with their correct round IDs.
  • Static API Storage: Generates structured JSON files to prevent server overhead and load the dashboard instantly.
  • Grid Tab: Renders qualifying grids (Q1, Q2, Q3) for completed and upcoming weekends.
  • Relative Time Toggle: Converts all session timings to dynamic relative countdowns.

Repository Structure

f1/
├── .github/workflows/
│   └── run_api.yml           # Runs scripts/update_api.py every 30 minutes
├── api/                      # Autogenerated static JSON database
│   ├── current.json          # Current season race calendar & sessions
│   ├── qualifying.json       # Q1, Q2, and Q3 qualifying results
│   ├── results.json          # Completed race podium finishes
│   └── standings.json        # Driver championship standings
├── assets/                   # Static icons and logos
├── css/
│   └── styles.css            # Dark mode styling & responsive layout
├── js/
│   └── app.js                # Frontend UI rendering & countdown engine
├── scripts/
│   └── update_api.py         # Scraping, normalization & generation script
├── index.html                # Main dashboard HTML structure
└── CNAME                     # Custom domain configuration

Data Endpoints

The scraped API data is stored as static JSON files.

For local development, they can be accessed at:

  • Event Calendar: api/current.json
  • Race Results: api/results.json
  • Championship Standings: api/standings.json
  • Qualifying Results: api/qualifying.json

For external projects or integrations, you can consume the live, CORS-enabled endpoints publicly:

  • Event Calendar: https://f1.trionine.com/api/current.json
  • Race Results: https://f1.trionine.com/api/results.json
  • Championship Standings: https://f1.trionine.com/api/standings.json
  • Qualifying Results: https://f1.trionine.com/api/qualifying.json

Development & Usage

1. Scraping Data Locally

To run the scraper manually, ensure your python virtual environment is active or use its interpreter:

python scripts/update_api.py

2. Serving Dashboard

Start a local HTTP server in the repository root:

python3 -m http.server 5000

Navigate to http://localhost:5000 in your web browser.

About

formula 1 real-time schedule web dashboard and free f1 api

Resources

Stars

4 stars

Watchers

0 watching

Forks

Contributors

Languages