Skip to content

We will analyze in our code the expected goal locations of football players based on which areas of the field, at what times, with which feet, using which parts of their bodies, and from which angles and distances they are most likely to score.

Notifications You must be signed in to change notification settings

oguzhansarigol/xG_Analysis_Python

Repository files navigation

Expected Goals (xG) Analysis

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.

Table of Contents

Introduction

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.

Dataset

The dataset used in this project contains the following columns:

  1. playerId: Unique identifier for each player.
  2. id: Unique identifier for each shot event.
  3. x_coordinates: X coordinate of the shot on the field.
  4. y_coordinates: Y coordinate of the shot on the field.
  5. goal: Binary indicator whether the shot resulted in a goal (1 for yes, 0 for no).
  6. time: Time of the shot event in the game.
  7. foot: Indicator of which foot was used for the shot (1 for right foot, 0 for left foot).
  8. bodypart: Indicator of which part of the body was used for the shot (1 for foot, 2 for head, 3 for other).
  9. preference: Binary indicator whether the shot was taken with the player's preferred foot (1 for yes, 0 for no).
  10. angles: Angle at which the shot was taken relative to the goal.
  11. distance: Distance from which the shot was taken to the goal.
  12. xG: Expected goals value, a measure of the likelihood that a shot results in a goal.

Installation

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

About

We will analyze in our code the expected goal locations of football players based on which areas of the field, at what times, with which feet, using which parts of their bodies, and from which angles and distances they are most likely to score.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published