Soccer Heat Map | How It Is Generated In Football? (Find Out How Soccer Heat Maps Are Generated!)

Last Updated on March 13, 2021 by

For the past 20 years, tracking technology has been a part of football analysis. This technology has given you access to data on physical performances and heat map visualizations that show you the distance a player covers. As time goes on, this technology becomes cheaper and more available to people. It’s now easy for you to get this data as quickly as you want. This article will tell you what a soccer heat map is, the importance of a soccer heat map, the different software used to create a soccer heat map, how to use this software to create your soccer heat map.

The Table Below Contains The Steps And Software Used For Generating A Heat Map. 

Software Used For Creating A Heat MapSteps In Generating A Soccer Heat Map
Python Software Getting the data
Matplotblib SoftwareDrawing a football pitch 
Seaborn Software Leveling up your visualization 

What Is A Soccer Heat Map?

A soccer heat map, precisely for football, is an indicator of the usefulness of a player in different parts of a football pitch. This map gets heated up in the areas that the player had more composure with the ball. These heated areas on the map are color-coded, red is the most common color used here.

What Is The Importance Of Soccer Heat Maps In Football?

The main importance of a soccer heat map is to find out the frequency of occurrences spread in a given particular area. That is, it helps you know the particular areas every particular player can cover in a football match. This helps you know the ability of every player and the best positions for each player to be placed.

What Software Is Used To Create A Heat Map?

The software used for creating your soccer heat map are python, matplotblib, and seaborn. The software listed above are good for creating the most advanced visualization in sports. 

The python software is used for automating particular series of tasks, it makes them more productive. Basically, Python is used for software applications, the shell of operating systems, pages within a web browser, and games. 

Matplotlib is a detailed library for developing inactive, animated, and interactive visualizations in python.

Seaborn is a Python data visualization library established on matplotlib. Seaborn gives you a high-level interface for drawing outstanding and edifying statistical graphics.

The main software here is python, matplotlib, and seaborn is additional software that makes python the best software for creating different advanced visualizations like heat maps.

What Are The Steps Used In Generating A Soccer Heat Map?

1. Getting the data

2. Drawing a football pitch

3. Leveling up your visualization with a pass map and then a heat map.

These are the three steps for creating a pass map. It’s not just enough to list out the steps. The steps will be explained below and while explaining, there would be football references to mar it interesting.

1. Getting The Data

This is normally the hardest part. Collecting data summary of a sporting event like the goals in a football match or the throws in a basketball game aren’t much trouble. It is a lot harder to get the detailed data set of a football match, or any other sports event. Getting detailed play-by-play data in a football game involves tracking the players on the field, mostly for high tempo. 

In every football game, there are always three people who are using a live video feed on a pitch visual. One of them watches the home team, the other one watches the away team, and the third person is the data checker. 

Lately, statsbomb, our unsung hero made a public release of the play-by-play second accurate datasets of every game across the three recent football leagues: the national women soccer league (US)- (United States), The FA- (Football Association) women’s super league (England), and the 2018 FIFA- (Federation Internationale de Football Association) World Cup.

The statsbomb data sets are all in JSON format. You will need to parse the raw dataset to a relational setup that can effortlessly be recouped and altered. The JSON is an open standard file configuration and data exchangeable format that uses human-readable content to store and communicate data objects comprising value items and array data classifications.

JSON normalize is an effective tool, as it can automatically normalize JSON  format into a relational structure. 

2. Draw A Football Pitch

Now, let’s use matplotlib to draw a straightforward football pitch. It does seem like a lot but we have to unload the draw-pitch function line by line. The function takes in an ax argument which is the product of the add-subplot function in matplotlib. It then puts in various items with pre-defined dimension to duplicate an image of a football pitch. Including the center circle, penalty areas, the 6-yard boxes, and the arcs in the pitch. 

3. Level Up Your Visualization With A Pass Map And A Heat Map

You have to start by creating a pass map. After completing the first two steps, creating a pass map won’t be any trouble. Firstly, we have to load the JSON file and do some fundamental data cleaning in panda that only consists of the passing events of the particular player. 

The next step is to track active zones with a heat map. You have to plot the heat map using seaborn on top of matplotlib to picture the involvement of the player during the game. 

The syntax of the code here is extremely simple. You use a kdeplot which will draw a core density estimation of the dispersion points of the player’s location. After creating your heat map and you feel you can do better. A good way to do better is by joining the pitch, the pass map, and the heat map that you created in order to have a more detailed view of the player’s performance during the game.

Closing Thoughts – Rounding It Up! 

Generating heat maps is extremely difficult, but it gets easier every year as new technology comes out. Following these steps carefully, you can get your heat map without many complications. And thanks to python for the software they have created to make heat maps less complicated.

Leave a Comment