ホーム 暮らし Data Visualization: Bubble Charts on the Pitch

Data Visualization: Bubble Charts on the Pitch

篠原 沙世 篠原 沙世 • 更新: • 公開: • 読了約 20 分
目次
nea87a38c165b

Since there is no league match this week, this is a data-focused article.

The theme this time is also xG (Expected Goals) since the beginning of this year, I have been thinking deeply about soccer data books and xG. I feel that my perspective on soccer, how I perceive it, and the direction of my interests have changed. ...I've been talking about this a lot on X and note, but I'm putting this out as an output.

So, this is another topic related to xG, but rather than talking about the data itself, I will talk about how to present it.


Handling Data

In any sport, data is abundant and has become a necessity in the modern era. The more data you can collect, the more insights, new tactics, and approaches you can generate from it.

Before that, however, it is important to know how to utilize the data that is available. Even if we talk about "new tactics and approaches," generating them requires knowing how to handle the data. This requires various processes such as statistical testing and programming.

Even if you simply have data as numerical values, anyone can read them and figure out what is happening, but not everyone can understand it immediately. In a soccer team, even if the manager, coaches, and players know what data is, they often don't know what it represents (since they are not data specialists). As the sophistication of collectable data advances, while there is more detailed data that leads to results, you won't know what that data means unless you investigate it. There are cases where you cannot understand it just by looking at the numbers.

Therefore, analysts and data scientists process the raw numbers to create visually easy-to-understand materials for use in meetings, making it easier to interpret what the data represents. By making data usable, its utility is demonstrated.

This "processing" is necessary. Amidst the overflow of data, it needs to be summarized smartly. I heard the phrase "analysts as data translators" from someone, and it really resonated with me.

With that in mind, this time I will look at ideas for visualizing xG data using xG data as the subject.
・
・
・
As mentioned so far, soccer has data called xG, and many people understand that its meaning is "a shot with a high xG has a high probability of scoring." However, a single team takes hundreds of shots during a season, and each of those shots is assigned an xG value. Even just looking at goals, there are over 50. With dozens or hundreds of data points, how do you organize and visualize them? I will examine those ideas.


Bubble Chart

The idea this time is a bubble chart.

What is a bubble chart...

As shown in the figure above, it is a graph that represents elements by the area of the bubbles.

When you look it up online, this is the explanation given. Instead of comparing only two elements (data), you can see the relationship within a single graph by adding a third element (data).

To use a business example, you can pack "sales," "profit margin," and "market share" (three data points) into a single graph and compare multiple companies. When creating the graph, if you set the x-axis to "sales," the y-axis to "profit margin," and the bubble size to "market share," a graph like the one below is created.

This graph was created as an example by ChatGPT.


Adapting to Soccer

How can such a bubble chart be adapted for xG?

A bubble chart allows for the comparison of three data points, and as a graph, it has x and y axes. Because of this, the x and y axes can be mapped to a soccer pitch. Furthermore, the crucial size of the bubbles can be treated as the numerical value (xG value) at each coordinate.

To summarize...
x... pitch width 0-105
y... pitch length 0-68
Bubble... magnitude of the xG value

This allows us to visualize the magnitude of the xG assigned to shotsthat occurred at each coordinate. Based on this idea, I will create a bubble chart using xG data from J2's Hokkaido Consadole Sapporo as a reference.


Creation

What needs to be prepared is the coordinates where shots were taken and the xG data for each of those shots. However, this time, it is limited to goals only.

As a prerequisite, I will use Python to detect the coordinates, compile them into a CSV file, and then execute the bubble chart using Python. Therefore, both coordinate detection and bubble chart creation will be done using programming.

Regarding coordinate detection, I developed a system in Python that outputs the coordinates of a point when clicking on a soccer pitch plot. Although the coordinates are approximate, I used this system to identify the shot locations. While it involves manual visual inspection, I adjusted the positions as needed, and since I am ultimately looking at the data for trends, approximate values are acceptable. Plus, since the data is represented by the size of the circles in the bubble chart, being roughly in the right place is sufficient for this purpose.

As for the xG data, while team totals are available in stats, data for individual shots is not officially released. Therefore, I am using stats data from Sofascore, which also covers J2 games.

Since I am using data for shot coordinates and xG that I can measure myself, I am not using any confidential team information here. This can be done independently using open-source resources and similar tools.


When compiled, the data looks like this.
In the actual CSV file used, the player name is omitted, so the bubble chart is created using three data points: x, y, and xG.

The data in the figure above only includes the 32 goals from the Iwamasa era of Consadole this season, but I have created this using all 46 goals, including the Shibata era (up to the present).


Here is the finished product.
The larger the xG of the shot (goal), the larger the area of the circle and the deeper the red color.

*Pitch colors, etc., can be set for better visibility


With this, we have succeeded in visualizing the data.
And, what is important from here on is what we can say based on this.

For example, the closer to the goal, the higher the xG, meaning a higher probability of scoring. If we can demonstrate this with data, it leads to the conclusion that we should aim to shoot from positions closer to the goal. If that happens, reckless long-range shots will decrease, and at the same time, the team can share where they should be shooting from and where they should be moving the ball.

When looking at shot xG only as numbers, you can only tell if it is high or low, but by seeing it on the actual court in this way, you can understand what is happening. If you look at this visualized data diagram, you can see at a glance where it is easiest to score a goal. Conversely, when defending, you just need to prevent shots from being taken in areas where the xG is high.


This time, I only handled goal data, but if we look at all of the team's shots and shots conceded, more detailed trends might emerge. And that could have a wide range of positive effects, from optimizing team strategy and tactics to, more broadly, player acquisition and even management aspects.

With data in hand, such processing can help increase the persuasiveness of the data and promote understanding within the team. Rather than thinking of sports and business as two separate things, cases like this can be cited as a form of conversion and application—using things from business in sports, and things from sports in business. At the root, both are just using data as the subject matter, so there are endless options when it comes to processing.

The way data is handled and presented in sports will also become more sophisticated. I look forward to seeing what kind of ideas emerge in the future.

同じカテゴリの記事

篠原 沙世

アニメとゲームの新作情報を担当。制作会社・配信元の公式告知と登壇情報を照合して記事化します。

おすすめの関連記事