Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Interactive Premier League analytics dashboard built with Streamlit. Compare team performance, xG trends, attacking/defensive metrics, and more.

License

Notifications You must be signed in to change notification settings

ZeeetOne/pl-team-analysis

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Premier League Team Analysis Dashboard

A Streamlit dashboard for analyzing Premier League team performance with match-level statistics from FotMob.

Python Streamlit License

Features

  • Season Overview: Points, wins, draws, losses, cumulative points chart, home/away splits, recent form
  • Attacking Analysis: Goals, xG, shots, big chances, shot quality metrics, tactical insights
  • Defensive Analysis: Goals conceded, tackles, interceptions, clean sheets, defensive actions
  • Possession & Passing: Ball possession, pass accuracy, long balls, crosses, touches in box
  • Match Explorer: Browse individual match statistics

Installation

# Clone the repository
git clone https://github.com/yourusername/pl_team_analysis.git
cd pl_team_analysis

# Install dependencies
pip install -r requirements.txt

# Run the dashboard
streamlit run app.py

Project Structure

pl_team_analysis/
├── app.py                    # Main Streamlit entry point
├── config.py                 # Configuration (paths, defaults)
├── requirements.txt          # Python dependencies
├── datasets/                 # CSV data files
│   ├── fotmob_season_2023-2024_stats.csv
│   └── fotmob_season_2024-2025_stats.csv
├── src/
│   ├── data/
│   │   ├── loader.py         # Data loading with caching
│   │   └── preprocessor.py   # Data cleaning & transformation
│   ├── metrics/
│   │   ├── attacking.py      # Goals, xG, shots metrics
│   │   ├── defensive.py      # Tackles, clean sheets metrics
│   │   ├── possession.py     # Possession, passing metrics
│   │   └── aggregators.py    # Season summaries, form
│   ├── visualizations/
│   │   ├── charts.py         # Plotly chart functions
│   │   └── theme.py          # Team colors, styling
│   └── utils/
│       └── constants.py      # Team names
└── pages/                    # Streamlit multi-page app
    ├── 1_Season_Overview.py
    ├── 2_Attacking_Analysis.py
    ├── 3_Defensive_Analysis.py
    ├── 4_Possession_Passing.py
    └── 5_Match_Explorer.py

Data Source

Match statistics scraped from FotMob using my fotmob-scraper.

Included seasons:

  • 2023-2024 Premier League season
  • 2024-2025 Premier League season

Adding Your Own Dataset

You can add more seasons or leagues by following these steps:

  1. Scrape data using fotmob-scraper

  2. Add CSV file to the datasets/ folder:

    datasets/
    ├── fotmob_season_2023-2024_stats.csv
    ├── fotmob_season_2024-2025_stats.csv
    └── fotmob_season_2025-2026_stats.csv  # Your new file
    
  3. Update config.py to include the new season:

    SEASON_FILES = {
        "2023-2024": DATASETS_DIR / "fotmob_season_2023-2024_stats.csv",
        "2024-2025": DATASETS_DIR / "fotmob_season_2024-2025_stats.csv",
        "2025-2026": DATASETS_DIR / "fotmob_season_2025-2026_stats.csv",  # Add this
    }
    
    # Optionally update default season
    DEFAULT_SEASON = "2025-2026"
  4. Restart the app and the new season will appear in the dropdown

Key Metrics

Category Metrics
Attacking Goals, xG, xGOT, shots, big chances, shot conversion
Defensive Goals conceded, tackles, interceptions, blocks, clean sheets
Possession Ball possession %, passes, pass accuracy, crosses, long balls

Tech Stack

  • Frontend: Streamlit
  • Data Processing: Pandas, NumPy
  • Visualization: Plotly

License

MIT License - feel free to use this project for your own analysis.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

About

Interactive Premier League analytics dashboard built with Streamlit. Compare team performance, xG trends, attacking/defensive metrics, and more.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.