⚽ FIFA World Cup Data Explorer
An interactive data analysis app built with Gradio that explores FIFA World Cup statistics from 1930 to the present day.
📊 Features
| Tab | Description |
|---|---|
| 📋 Dataset | Browse and filter raw match data by year |
| 📈 Goals Trend | Line chart of total goals scored across all World Cups |
| 🏆 Top Teams | Bar chart ranking teams by wins, goals, points, and more |
| ⚔️ Head-to-Head | Compare cumulative stats between any two nations |
🗂️ Dataset
The app loads CSV files named FIFA_-_<YEAR>.csv (e.g. FIFA_-_1930.csv).
Each file contains the group-stage standings for that tournament year with columns:
| Column | Description |
|---|---|
Position |
Final standing in that tournament |
Team |
Country name |
Games Played |
Total matches played |
Win |
Wins |
Draw |
Draws |
Loss |
Losses |
Goals For |
Goals scored |
Goals Against |
Goals conceded |
Goal Difference |
GF − GA |
Points |
Tournament points |
YEAR |
Auto-added — the year of the World Cup |
Source: Kaggle – FIFA Football World Cup Dataset
🚀 How to Run Locally
git clone https://huggingface.co/spaces/<your-username>/fifa-world-cup-explorer
cd fifa-world-cup-explorer
pip install -r requirements.txt
python app.py
Place all FIFA_-_<YEAR>.csv files in the same directory as app.py.
📓 Notebook
The full EDA and machine learning notebook (fifa_final_project.ipynb) is included.
It covers:
- Data loading & cleaning
- Goals trend visualisation
- Most successful teams
- Random Forest classifier to predict the champion
🛠️ Tech Stack
- Python 3.10+
- Gradio – interactive UI
- Pandas / NumPy – data wrangling
- Matplotlib / Seaborn – visualisations
- Scikit-learn – machine learning
📜 License
MIT — free to use, modify, and distribute.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support