Welcome to Football Viz and Modelling! This repository contains functions for visualizing football data and in the future also for clustering and predictions!
Currently working on a clustering function that test which methods that cluster your data the best. And a function which print spider(radar) plots for a chosen player and it's n closest neighbours.
I've developed a versatile function that generates scatter plots using football data. Simply select the league, variables for the axes, and the season to get started!
- Get Your Football Data: Obtain your football data with the required variables(player_id,player_name,team_name,league_id, season).
- Choose the League: Select the league of interest.
- Select Axes Variables: Choose the variables for the X and Y axes.
- Specify the Season: Define the season you want to analyze.
- (Optional) Customize Outliers: Adjust the multiplier value for standard deviation to identify outliers.
Here's an example from Ligue 1's 2022/2023 season, featuring the variables xG (Expected Goals) and xAG (Expected Assists Goals).
- The red dots indicate outliers in the data
- There is hover-over information on all points in the created HTML
Note: README files on GitHub can't display interactive HTML content, so the Plotly image has been saved as a PNG. If you'd like to interact with the plot and explore its functionalities, you can watch the HTML file from the link below:
Link to Ligue 1 2022/2023 xG-xAG Scatter Plot HTML(Created with Raw.githack.com)
Or download it from here: