Football + Voronoi


Intro

First a couple of wikiquotes...

Football is a sport played between two teams of eleven players ... played on a rectangular field with a goal at each end.
A Voronoi diagram is a partitioning of a plane into regions based on distance to points in a specific subset of the plane.

In the first quote, swap the word players with points and the word field with plane and you've sort of described a Voronoi diagram ('twenty-two points on a rectangular plane').

To the right is a plane with 22 points, colours may or may not resemble Chelsea and Man Utd, and may or may not be in 4-4-2 formation, click to show the Voronoi diagram created using those 22 points. This post will very(!) quickly explore this idea (without real data it's just a fun exercise really, one to return to perhaps) and its potential applications to player tracking data in football analysis. If anyone has any tracking data... hello, pleased to meet you.

Code and stuff is available on github. AngularJS and D3 have been used to manage the data and creative the various graphical elements on the page.


Random Points

The plot to the right is the same as above, two sets of 11 points on a plane in some kind of order. There are a pair of buttons above the plot, the next button will randomly choose 3 of the 'outfield' points and move them, which updates the Voronoi diagram. While the Reset button returns the plot to some kind of order.

Player movement is anything but random (unless you support Villa, in which case, embrace the chaos!). There is structure and the movements players make as they adapt and adjust to the positions of their opponents, their teammates and the ball.

Potential Applications?

Team Based:

  • How does a team react without the ball?
  • Do they defend narrow surrendering space out wide?
  • How does a team move the ball, do they try to stretch the pitch?
  • How does a team get their most dangerous players on the ball?
  • ...

Player Based:

  • How successful is a player in finding space?
  • How successful is a player at finding teammates in space?
  • How successful is a player with the space he is afforded? Is he constantly closed down but makes the most of his opportunities?
  • ...

Click Next to generate a new plot, and Reset to return to '442'.


NBA

The NBA has tracking data, the movement of players is quite different to that of football, with more focus on 1vs1 battles (although I am not a regular NBA watcher!). The gif shown is an example of the tracking data, I extracted data for 18 frames (out of 70) that made up the gif, which can be clicked through in the plot below, using the Next or Prev buttons.

I have added the basic lines on a basketball court (though the 3point line is plotted as a circle), to help identify 'landmarks'. Also included is a table for the 10 players, as you hover over a player in the plot and the area they are in, the distance to the other 9 players is displayed.

source: NBA
Player No. Team Dist (pixels)
2 Red
9 Red
20 Red
21 Red
33 Red
1 Blue
3 Blue
6 Blue
9 Blue
34 Blue

Frame: {{frame}}