Skip to content

cjdanbjorg/Football-Data-Analysis

 
 

Repository files navigation

Football Data Analysis Repository

This repository contains various codes and tutorials focused on football event data analysis, using Python and popular data science libraries. Whether you're a data scientist, analyst, or football enthusiast, this repository will help you manipulate, analyze, and visualize football data effectively.

Contents

1️⃣ Data Manipulation Techniques

  • Concatenation & Splitting: Efficient methods for merging and breaking down large datasets.
  • Grouping & Filtering: Advanced techniques to group data and retrieve meaningful subsets, crucial for focusing on specific players, teams, or match events.

2️⃣ Visualization of Event Data (Heatmap Styles)

📌 Tutorial: "Different Heatmap Styles for Football Event Data"

  • Kernel Density Estimation (KDE): Visualizing player activity areas on the pitch with smooth density plots.
  • Hexbin Plot: A grid-based heatmap providing detailed spatial insights.
  • Custom Colormaps: Explore how to create visually appealing colormaps for better data storytelling.

👉 Explore the tutorial here: Heatmap Styles Notebook


4️⃣ Convex Hull Styles for Pass Clustering

📌 New Tutorial: "Using Convex Hulls to Analyze Passing Structures"

  • Implements Convex Hull visualization to outline passing clusters.
  • Helps in understanding positional structures and the spread of passes within clusters.
  • Applied to Final Third Entry Passes, highlighting passing lanes and patterns.

📷 Check out the implementation here.


3️⃣ Clustering Passes by Corridor

📌 New Tutorial: "Clustering Final Third Entry Passes in Football"
This tutorial focuses on segmenting passes into three vertical corridors (Left, Center, Right) and applying K-Means clustering to identify passing patterns.

  • 🔹 Filters Argentina's passes that start in their own half and enter the final third.
  • 🔹 Uses K-Means clustering to classify passes into different clusters within each corridor.
  • 🔹 Visualizes passing trends with color-coded clusters and structured pitch separation.

📷 See the visualization in action and explore the code here.


🎯 How to Use goal-plot to Visualize Penalty Shots

goal-plot is my first Python package – simple and easy to use! It lets you draw a clean 2D goal and plot events like penalties on it.

This tutorial shows you how to visualize penalty shots using your own data.

👉 Explore the tutorial here: draw_goal Notebook


🧩 Installation

pip install goal-plot

🚀 How to Use This Repository?

Simply clone the repository and explore the Jupyter notebooks:

git clone https://github.com/sara1621/Football-Data-Analysis.git
cd Football-Data-Analysis

About

Football analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%