This project is a complete Formula 1 analytics and race outcome prediction platform designed to simulate a modern sports intelligence workflow using data engineering, machine learning, and business intelligence.
The platform ingests historical Formula 1 race data from the Ergast API, transforms it into analytical feature marts using dbt, trains machine learning models using XGBoost, and delivers insights through Power BI and Tableau dashboards.
The project demonstrates how predictive analytics pipelines can be built end-to-end using modern data engineering and machine learning workflows.
Modern sports analytics organizations rely heavily on data-driven insights for:
- Driver performance analysis
- Race outcome prediction
- Team strategy optimization
- Performance benchmarking
- Historical trend analysis
- Fan engagement analytics
Traditional static reporting systems cannot efficiently support large-scale predictive workflows or advanced feature engineering pipelines.
This project demonstrates how modern analytics systems can:
- Automate data ingestion workflows
- Build reusable analytical data marts
- Train predictive machine learning models
- Generate race outcome predictions
- Support interactive BI dashboards
- Create scalable analytics pipelines
- Domain: Formula 1 Racing Analytics
- Data Source: Ergast API
- Database: PostgreSQL
- Transformation Framework: dbt
- Machine Learning: XGBoost
- Workflow Orchestration: Airflow (Optional)
- Visualization: Power BI and Tableau
- Core Objective: Race Outcome Prediction and Analytics
- Prediction Target: Top-10 Finishing Prediction
Ergast ingestion
↓
Postgres warehouse
↓
dbt feature marts
↓
Feature engineering
↓
XGBoost models
↓
Prediction scoring
↓
Power BI / Tableau dashboards
- Pulls historical Formula 1 race data from the Ergast API
- Loads structured race data into PostgreSQL
- Supports multi-season ingestion workflows
- Stores raw and transformed racing datasets
- Supports scalable analytics queries
- Centralized warehouse for modeling and reporting
- Builds reusable analytical feature marts
- Creates race-level and driver-level analytical features
- Supports modular transformation workflows
- Uses XGBoost models for race outcome prediction
- Predicts Top-10 driver finishes
- Supports training and scoring workflows
- Generates race predictions by season and round
- Evaluates model performance using calibration metrics
- Supports repeatable prediction workflows
- Power BI and Tableau dashboards for race analytics
- Visualizes driver trends and prediction outputs
- Supports interactive business reporting
- Optional Airflow orchestration support
- Automates ingestion and transformation workflows
- Simulates production-style analytics pipelines
- End-to-end Formula 1 analytics and prediction pipeline
- Ergast ingestion → Postgres → dbt → XGBoost → BI workflow
- Dimensional marts and reusable analytical datasets
- Realistic KPIs and calibration metrics
- Interactive Power BI and Tableau dashboards
- Easy extensibility for safety car and pit strategy simulations
- Modular data engineering and ML architecture
| Dimension | Traditional Sports Dashboard | This Project |
|---|---|---|
| Data Source | Static exports | Automated Ergast ingestion |
| Data Pipeline | Manual preparation | End-to-end automated workflow |
| Modeling | Basic statistics | XGBoost predictive modeling |
| Transformation | Flat tables | dbt feature marts |
| Analytics | Historical reporting | Predictive analytics |
| Visualization | Static dashboards | Interactive BI dashboards |
| Workflow | Standalone analysis | Integrated data engineering pipeline |
- Python
- PostgreSQL
- dbt
- XGBoost
- Apache Airflow
- Power BI
- Tableau
- Docker
- SQL
formula1-predictive-analytics-platform/
│
├── README.md
├── requirements.txt
├── schema.sql
├── docker-compose.yml
├── .env.example
│
├── airflow_dags/
│ ├── f1_daily_ingest.py
│ └── f1_weekend_train_predict.py
│
├── bi/
│ ├── dashboard_wireframes.md
│ └── powerbi_measures.md
│
├── dbt/
│ ├── dbt_project.yml
│ ├── profiles.yml.example
│ └── models/
│ ├── staging/
│ └── marts/
│
├── notebooks/
│ ├── 01_eda.ipynb
│ └── 02_feature_checks.ipynb
│
└── src/
├── ingest/
│ └── ergast_pull.py
├── features/
│ └── build_pre_race_features.py
├── models/
│ ├── train.py
│ └── predict.py
└── utils/
└── io.py
Update the .env file with your database credentials and environment settings.
docker compose up -dpsql -f schema.sqlpip install -r requirements.txtpython src/ingest/ergast_pull.py --from-season 2014 --to-season 2024cd dbt && dbt buildpython src/models/train.py --target top10python src/models/predict.py --target top10 --season 2024 --round allConnect Power BI or Tableau to PostgreSQL and explore:
marts.f_predictions
- Historical race ingestion
- Feature engineering using dbt
- Structured training datasets
- XGBoost classification models
- Driver finish prediction
- Top-10 race outcome prediction
- Season-based predictions
- Round-level scoring
- Model evaluation and calibration
- Driver performance tracking
- Team comparison analysis
- Historical race trend analysis
- Prediction confidence analysis
- Season-level benchmarking
- Top-10 finish prediction
- Operational analytics dashboards
- Demonstrates production-style analytics engineering workflows
- Reduces manual data preparation effort
- Supports scalable sports analytics pipelines
- Enables data-driven race analysis
- Combines BI, ML, and data engineering into one platform
- Simulates real-world predictive analytics systems
- Data Engineering
- ETL Pipelines
- PostgreSQL
- dbt
- Machine Learning
- XGBoost
- Predictive Analytics
- Business Intelligence
- Airflow
- Docker
- SQL
- Sports Analytics
- Prediction quality depends on historical race data
- External race conditions are not fully modeled
- Real-time telemetry data is not included
- Airflow orchestration is optional and may require additional setup
- Add real-time telemetry ingestion
- Deploy dashboards to cloud infrastructure
- Add deep learning race simulations
- Integrate weather and pit strategy data
- Add driver similarity and ranking models
- Build live race prediction APIs
- Add automated model retraining workflows
MIT License
Built by Sucharitha Reddy Gaddam
This project demonstrates how modern data engineering, machine learning, and business intelligence workflows can be integrated into a complete Formula 1 analytics platform.
By combining Ergast ingestion, PostgreSQL warehousing, dbt transformations, XGBoost prediction pipelines, and BI dashboards, the project provides a practical example of end-to-end predictive analytics system design.
The implementation highlights strong capabilities in ETL engineering, feature engineering, ML modeling, SQL analytics, and production-style analytics architecture.