Skip to content

PeakPerformance is an AI-powered football analytics platform designed to predict seasonal performance, predict salaries, suggest similar players to a particular player,simulate player contract negotiations, using machine learning and reinforcement learning.

License

Notifications You must be signed in to change notification settings

akshan-main/peakperformance

Repository files navigation

PeakPerformance · AI-Driven Football Analytics Project

GitHub pull-requests GitHub contributors GitHub license
GitHub repository size Code of Conduct
Code Coverage Build Status

⚽️ Introduction

What is the average salary a forward at Manchester United earns? Who is the most similar player to 2017 Neymar in the 2023 Premier League season? We didn't know the answers to these questions either until we built PeakPerformance.

PeakPerformance is an AI-powered football analytics platform designed to predict seasonal performance, predict salaries, suggest similar players to a particular player,simulate player contract negotiations, using machine learning and reinforcement learning.

It features an interactive Streamlit dashboard with five fully-functional pages. Explore the deployed web app here: peakperformance


☰ Table of Contents


Repository Structure

└── dataset
    └── Ratings Combined
        └── filtered_playerratingssalaries.csv
        └── player_data_with_predictions.csv
        └── thousandminsormore.csv
└── docs
    └── in_class_user_stories
        └── user_stories.md
    └── technology_review
        └── technology_review.md
    └── design_spec.md
    └── functional_spec.md
    └── Interaction Diagram.png
    └── milestones.md
└── Python Notebooks
└── peakperformance
    └── home.py
    └── pages
        └── eda_salary.py
        └── player_plot.py
        └── player_profile.py
        └── statmatch.py
        └── the_negotiator.py
    └── backend
        └── train_model.py
    └── tests
        └── test_eda_salary.py
        └── test_home.py
        └── test_player_plot.py
        └── test_player_profile.py
        └── test_statmatch.py
        └── test_the_negotiator.py
        └── test_train_model.py
└── environment.yml
└── requirements.txt
└── README.md


🚀 Installation & Setup

Requirements

  • Python 3.11
  • Streamlit
  • All dependencies in requirements.txt

Setup Instructions

To run the PeakPerformance dashboard locally, please follow these steps:

Clone the GitHub repository to your machine using:

git clone git@github.com:akshan-main/peakperformance.git

Enter the project directory:

cd peakperformance

Create a new conda environment:

conda env create -f environment.yml

Activate the environment:

conda activate myenv

Launch the Streamlit app:

streamlit run peakperformance/home.py

👥 The Team (Contributors)


🧩 Features & Pages Overview

✨ EDA & Salary Analysis

  • Visualize player salaries across leagues, positions, and clubs.
  • Interactive scatter plots (Rating vs Salary) and salary distribution charts.
  • Understand league wage disparities and club-wise payroll structures.

🕸️ Player Performance Radar

  • Select 1–10 players and compare them across chosen metrics.
  • Dynamic radar charts using Plotly.
  • Great for role profiling and visual comparisons.

🎯 Player Similarity Matching

  • Ask questions like “Top 10 players similar to 2022 Messi in 2023 Bundesliga under 25.”
  • Natural language queries + Query Parsing + Regular Expressions + cosine similarity.
  • Focused on scouting, transfer targeting, and replacing players.

🔍 Player Profile Lookup

  • Retrieve profile of football player.
  • View predicted ratings over time.
  • Chart displays career trajectory with rating trends.

💼 Contract Negotiator

  • FIFA-style contract simulation with an RL agent (trained via Deep Q-Learning).
  • Offer wages, adjust contract length, and receive counter-offers.
  • Optimize strategic contract decisions by analyzing match performance, contract details, and market trends
  • The RL agent simulates multi-season decision-making, helping clubs determine whether to extend a player’s contract

📊 Dataset

For the below mentioned datasets, we used player data from 2017/18 season to 2023/24 season.

Dataset Structure

  • filtered_playerratingssalaries.csv: Used to train the reinforcement learning model.
  • thousandminsormore.csv: Filtered ratings, salary data for players with more than 1000 minutes played.
  • player_data_with_predictions.csv: Player data with upcoming season ratings prediction (found using XGBoost).

Data Sources

FBref website - Player performance metrics data
Sofascore website - Player seasonal ratings data
Capology website - Player yearly and weekly salary data

TheSportsDB Integration

Our project uses TheSportsDB to retrieve basic football player information such as photos, nationality, and position. This data is then displayed on our Player Profile page.

Why TheSportsDB?

  • Free & Public: It offers a free, public API key (API_KEY = "3") that doesn’t require secrecy.
  • Rich Data: Provides an array of data points (e.g. strPlayer, strTeam, strNationality) without additional overhead.
  • Simple Integration: Straightforward to call via HTTP requests.

📅 Acknowledgments & References

  • The aforementioned data sources.

  • Statsbomb & community for radar chart inspiration.

  • Streamlit, Scikit-learn, PyTorch, Altair, Plotly, Matplotlib documentations.


🌟 Show Your Support!

Enjoy using PeakPerformance! If you find this project useful or insightful, please give the repository a star on GitHub. For any issues or enhancement requests, open an issue – we’d love to continue improving the tool with your feedback. Join us in harnessing the power of AI and data to reach new heights in football analytics.

About

PeakPerformance is an AI-powered football analytics platform designed to predict seasonal performance, predict salaries, suggest similar players to a particular player,simulate player contract negotiations, using machine learning and reinforcement learning.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •