F1 Analyst is a web application that allows you to analyze Formula 1 data using the FastF1 API. The application provides detailed visualizations and analysis of F1 races, drivers, and teams.
- Detailed F1 race analysis
- Driver and team data visualizations
- Interactive lap time graphs
- Driver performance comparisons
- Race strategy analysis
- Python 3.8 or higher
- Node.js 14 or higher
- npm or yarn
Configure environment variables:
Create a .env file in the project root with the following variables:
OPENAI_API_KEY=your_api_key
OPENAI_MODEL=gpt-4o-mini
USE_DUMMY_DATA=true
- Create a Python virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install Python dependencies:
pip install -r requirements.txt- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Activate the virtual environment (if not already activated):
source venv/bin/activate # On Windows: venv\Scripts\activate- Start the FastAPI server:
python backend/server.pyThe backend will be available at http://localhost:5000
- In a new terminal, from the frontend directory:
npm startThe application will be available at http://localhost:3000
f1-analyst/
├── frontend/ # React application
├── backend/ # Backend source code
├── dummy_data/ # Sample data
├── tests/ # Python tests
└── requirements.txt # Python dependencies
-
Backend:
- FastF1: F1 data API
- FastAPI: Web framework
- Pandas: Data analysis
- Matplotlib/Seaborn: Data visualization
-
Frontend:
- React
- TypeScript
- Material-UI
This project is licensed under the MIT License.