Skip to content

CheeJS/racepredictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Race Predictor

F1 race data visualization and prediction platform built with Go backend, Angular frontend, and FastF1 data integration.

Features

  • Position changes during a race - Track driver positions lap-by-lap
  • Speed trace overlays - Compare speed profiles of two laps
  • Lap time scatter plots - Visualize lap time distributions
  • Gear shifts on track - See gear changes mapped to circuit layout
  • Team pace comparison - Compare team performance across sessions
  • Tyre strategies - Analyze pit stop and tyre compound strategies
  • Qualifying results - Overview of qualifying session outcomes
  • Lap time distributions - Statistical analysis of driver consistency
  • Corner annotations - Speed traces with corner markers
  • WDC scenarios - Calculate who can still win the championship
  • Speed visualization on track map - Heatmap of speed around circuit
  • Driver-specific plot styling - Consistent team colors and branding
  • Track maps with numbered corners - Reference circuit layouts
  • Driver standings heatmap - Championship progression visualization
  • Season summary - Comprehensive season statistics

Architecture

racepredictor/
├── backend/
│   ├── cmd/              # Go main application
│   ├── api/              # REST API handlers
│   ├── go.mod            # Go dependencies
│   └── fastf1-service/   # Python FastF1 bridge
│       ├── app.py        # Flask API
│       └── requirements.txt
├── frontend/
│   ├── src/
│   │   ├── app/
│   │   │   ├── components/  # Angular components
│   │   │   └── services/    # API services
│   │   ├── index.html
│   │   └── main.ts
│   ├── angular.json
│   ├── package.json
│   └── tsconfig.json
└── README.md

Prerequisites

  • Go 1.21+
  • Node.js 18+ and npm
  • Angular CLI 17+
  • Python 3.9+
  • Git

Setup

1. Backend - Go Server

cd backend
go mod download
go run cmd/main.go

Server runs on http://localhost:8080

2. Backend - FastF1 Service (Python)

cd backend\fastf1-service
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
python app.py

Service runs on http://localhost:5000

3. Frontend (Angular)

cd frontend
npm install
npm start

Frontend runs on http://localhost:4200

Development

Run all services

# Terminal 1 - FastF1 Service
cd backend\fastf1-service
.\venv\Scripts\Activate.ps1
python app.py

# Terminal 2 - Go Backend
cd backend
go run cmd/main.go

# Terminal 3 - Angular Frontend
cd frontend
npm start

API Endpoints

  • GET /api/sessions - List available sessions
  • GET /api/sessions/:year/:round/laps - Get lap data
  • GET /api/sessions/:year/:round/telemetry - Get telemetry data
  • GET /api/drivers/:code/stats - Driver statistics
  • GET /api/standings/:year - Championship standings

Configuration

FastF1 cache directory: ./backend/fastf1-service/cache

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published