Using Voronoi Diagrams in Football

Ricardo Tavares
Football Crunching
Published in
4 min readJul 14, 2019

Football is all about space, but football statistics mostly rely on individual actions with no context to its surroundings. Even advanced metrics like Expected Goals/Assists often look only at the positions of the action itself without considering the overall positioning of the moment it happened.

This is especially true when we try to evaluate Defenders. We need new metrics, above things like tackles and interceptions, because Positioning is the most important defensive skill for a defender — and it isn’t being measured at all.

‘If I have to make a tackle then I have already made a mistake’ — Paolo Maldini

It also true for measuring the attacking strategy: the goal for the attacking team is to create space — i.e., to generate gaps in defensive coverage of the field.

What are Voronoi Diagrams?

If you haven’t wikipediaed that yet, here is the definition:

In mathematics, a Voronoi diagram is a partitioning of a plane into regions based on distance to points in a specific subset of the plane. That set of points (called seeds, sites, or generators) is specified beforehand, and for each seed there is a corresponding region consisting of all points closer to that seed than to any other.

So, how is that useful for Football?

Well, if the goal of the defender is to get anywhere in the field faster than the opposing player, the best way of achieving that is to be closer than the attacker to the dangerous areas.

This isn’t a new observation: David Sumpter, author of Soccermatics, talked and wrote about it, and a Physics student from Korea wrote a paper on it using video game data (to show you how long ago that was written: it was FIFA Soccer 2003 data).

Lately, with more positional data being collected by professional data providers, such analysis has become more common.

Alright, I’m convinced. Now show me something cool

Ok, let’s start by showing a simple play with full positional data, a goal from Brazil’s legendary 7–1 defeat against Germany.

If you saw this match, you will remember it. Playing in a World Cup at home but missing Thiago Silva and Neymar for the semi-final, Brazil completely lost it after Germany scored the second goal, in the 23rd minute. Germany scored again in the 24th, 26th and 29th minutes.

The following is a 2D animated representation of the fifth goal:

Watch the play a few times. You may notice one of Brazil’s central defenders leaving his position mid-play. That was David Luiz, the captain that day. Thiago Silva’s absence was definitely missed.

Let’s at at three moments from that play with a Voronoi diagram on top.

This is the first moment:

Brazil’s defense is balanced, even though not all players are perfectly placed, particularly the Right-Back: he’s not covering no.8 (Ozil), potentially allowing a run from him to the corner of the box. Ozil, of course, is not the fastest player around, so maybe it was a calculated risk.

David Luiz, the Central Defender closer to the goal, covers an area bordering three attackers. Again, not optimal.

Here’s the second moment, less than two seconds later:

David Luiz moves forward to try intercept the ball. In doing that, he gives away the area in front of the box to the attackers.

Notice that, if the right back (Maicon) and the other Central Defender (Dante) were better positioned, Brazil would not have lost that critical area.

David Luiz was the critical last man in this play, and that is what made his move so crazy.

The third moment, after David Luiz fails the tackle:

Khedira now has the ball.

David Luiz is out of the play, and Marcelo (the left-back) leaves his marked player to help in the center.

Dante manages to re-position himself, but he is now covering three attackers.

Khedira can pass to the striker Klose, in the center, or to Ozil, on his left, both of which have a clear path to goal.

You now can watch the full play with the Voronoi diagram superimposed:

Pretty cool, right?

What’s next?

Voronoi diagrams are cool to look at, but our main goal is to create new metrics to analyse space and positioning. On our next post, we will examine how we can do that.

How can I try that?

You can see the code used to generate the pictures in this Jupyter Notebook.

The notebook and data for this particular play is shared in the Football Crunching GitHub repository:

The data was collected by myself. It isn’t professional-level data, and the focus is on overall movement rather than pixel perfect accuracy.

--

--