Skip to content

justacoderq/Analyzing-Formula-1-Race-Data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

🏎️ Formula 1 Data Analysis: Uncovering the Trends and Insights in Motorsport 🏁

Welcome to the Formula 1 Data Analysis Project, where we delve into the fascinating world of Formula 1 racing! This project uses real-world F1 data to explore driver performances, country-based dominance, race victories, and more.

With statistical tests, compelling visualizations, and thoughtful insights, this repository aims to showcase the art and science of motorsport analysis.


📖 Table of Contents


🌟 Overview

Formula 1 is the pinnacle of motorsport, where drivers, teams, and countries compete for supremacy. This project analyzes historical F1 data to answer questions like:

  • Which countries dominate Formula 1, and why?
  • How do driver performances vary across years and circuits?
  • What makes drivers like Lewis Hamilton and Michael Schumacher stand out?

Through a combination of Python programming, statistical tests, and visualization techniques, we uncover the hidden stories behind the data.


✨ Features

Statistical Analysis:

  • One-way ANOVA to test country-level performance differences.
  • Insights into significant F-statistics and p-values.

Interactive Visualizations:

  • Bar plots of total average points by country.
  • Race victories across Grand Prix events.
  • Wins-per-year trends for top drivers.

Word Clouds:

  • Highlight drivers with the most pole positions in Formula 1 history.

Driver Comparisons:

  • Compare race wins and championships across different eras and regions.

Insights on Circuit-Specific Performance:

  • Examine drivers' favorite circuits and why certain tracks favor specific drivers.

📊 Data Sources

The project utilizes publicly available F1 datasets, including information on:

  • Drivers: Biographical details and career statistics.
  • Races: Locations, years, and results.
  • Results: Individual driver performances across seasons.

Datasets are preprocessed using pandas to join and clean the data for analysis.


🔬 Methodology

Data Wrangling:

  • Merge datasets to create a unified analysis-ready table.
  • Handle missing data and fix inconsistencies.

Statistical Testing:

  • Perform ANOVA to evaluate differences between countries' performance.

Visualization:

  • Create interactive plots (using Plotly) and word clouds to present insights.

Driver and Circuit Analysis:

  • Analyze performance trends of top drivers across their careers.
  • Study Grand Prix-specific wins to understand circuit dominance.

🔑 Key Insights

Total Average Points per Country 🏆

  • Countries like the UK, Germany, and Italy dominate the leaderboard.
  • Infrastructure and resources play a crucial role in shaping performance.

Lewis Hamilton: The Pole King 👑

  • Word cloud analysis reveals his dominance in securing pole positions.

Favorite Grand Prix 🏁

  • Certain circuits see repeated success for specific drivers, indicating track familiarity or team strengths.

Wins Per Year for Top Drivers (2007–2017) ⏳

  • Visualizing win trends shows the era of dominance for drivers like Hamilton and Vettel.

Championships Across Generations 🌍

  • Generational legends like Schumacher, Fangio, and Hamilton emerge as outliers in championship counts.

🛠 Technologies Used

  • Programming Languages: Python
  • Libraries:
    • Data Analysis: pandas, numpy
    • Visualization: matplotlib, plotly, seaborn
    • Word Cloud: WordCloud
    • Statistical Testing: scipy

🚀 How to Use

  1. Clone the repository:
git clone https://github.com/yourusername/f1-data-analysis.git
cd f1-data-analysis
  1. Install dependencies:
Copy code
pip install -r requirements.txt
  1. Run the analysis:

Open and execute the Jupyter Notebook or Python scripts for specific analyses.

  1. View Visualizations:

Interactive plots and charts will be displayed in your browser.

📈 Visualizations Circuits all around the world image

Average position by constructor reference image

Average points per country image

🔮 Future Work Incorporate Machine Learning: Predict race outcomes based on historical data. Infrastructure Analysis: Study the correlation between country-level motorsport investments and driver success. Team Analysis: Investigate team-level dominance and trends over time. Real-Time Data: Integrate live F1 race data for dynamic updates.

🤝 Contributing Contributions are welcome! To contribute:

Fork the repository. Create a new branch for your feature/bug fix. Submit a pull request with a clear description.

📜 License This project is licensed under the MIT License. See the LICENSE file for details.

Feel free to reach out for questions or collaboration ideas. Happy racing! 🏎️

About

Formula 1 Race Analysis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published