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