This project analyzes the expected goal locations of football players based on various factors such as field areas, times, feet used, body parts used, angles, and distances. The analysis is performed using a dataset containing shot events from football matches.
Expected Goals (xG) is a metric used to measure the likelihood of a shot resulting in a goal. This project aims to analyze the xG values based on various factors and visualize the results using different plots and graphs.
The dataset used in this project contains the following columns:
- playerId: Unique identifier for each player.
- id: Unique identifier for each shot event.
- x_coordinates: X coordinate of the shot on the field.
- y_coordinates: Y coordinate of the shot on the field.
- goal: Binary indicator whether the shot resulted in a goal (1 for yes, 0 for no).
- time: Time of the shot event in the game.
- foot: Indicator of which foot was used for the shot (1 for right foot, 0 for left foot).
- bodypart: Indicator of which part of the body was used for the shot (1 for foot, 2 for head, 3 for other).
- preference: Binary indicator whether the shot was taken with the player's preferred foot (1 for yes, 0 for no).
- angles: Angle at which the shot was taken relative to the goal.
- distance: Distance from which the shot was taken to the goal.
- xG: Expected goals value, a measure of the likelihood that a shot results in a goal.
To run this project, you need to have the following libraries installed:
- pandas
- seaborn
- matplotlib
- numpy
- google.colab (if using Google Colab)
You can install the required libraries using pip:
```bash
pip install pandas seaborn matplotlib numpy google-colab