PATCHing Teams

I explained the current PATCH methodology in my previous post. Today I’m going to do a deep dive into how PATCH views the current teams in the EPL. Here’s what the table looks like (pre-Southampton on Saturday):

Chelsea 2.84
Manchester United 2.79
Liverpool 2.73
Tottenham Hotspur 2.70
Manchester City 2.68
Bournemouth 2.64
Arsenal 2.61
Southampton 2.45
Leicester City 2.38
Aston Villa 2.34
Norwich City 2.28
Watford 2.27
Palace 2.27
West Ham United 2.27
Everton 2.22
Swansea City 2.18
Stoke City 2.13
West Bromwich Albion 2.11
Newcastle United 1.97
Sunderland 1.88

The values for PATCH are the 60th percentile of all performances for each team. You could, if you were highly motivated, work out the actual units for PATCH, but treat it as abstract. 2 is around average, somewhere just under 4 is the 90th percentile amongst player performances and 5+ would be outstanding. Given that, I am reasonably happy with how this shapes up.

PATCH Correlations

At first glance the numbers above don’t look bonkers, but how does the metric correlate with other team defensive stats? Let’s have a look:

Percentile GA xGA Shots Against SoT Against
10th 0.06 0.10 0.08 0.06
20th 0.22 0.30 0.20 0.15
30th 0.28 0.44 0.38 0.30
40th 0.29 0.56 0.54 0.44
50th 0.27 0.61 0.63 0.45
60th 0.27 0.71 0.76 0.55
70th 0.19 0.65 0.71 0.48
80th 0.16 0.60 0.62 0.38
90th 0.10 0.47 0.50 0.29

Those are the R2 values each team’s PATCH values at a certain percentile (10th being the lowest 10%, i.e. worst defensive performances), compared to some traditional measures. It’s great to see that we’re nicely correlated with expected goals against and shots, though I should point out that shots do directly go into the calculation – if you allow a shot through your territory, it’s marked against you. However, that’s only a small proportion of the gains measured. I tested with shots removed from the ball progression metric just to be sure and the correlations barely went down.

Defensive Ranks

So far we’ve only looked at team’s performances en masse, as measured by PATCH. This is what things look like if we break them down by rank in a team’s formation:


There are a few interesting patterns that immediately jump out:

  • Bournemouth’s attacking midfielders and forwards are doing a bunch of defensive work.
  • Manchester City’s less so.
  • Tottenham have the least penetrable midfield of any team in the league.
  • As you might expect, Leicester’s attack and defence are a little more robust than their midfield, reflecting the fact that they press high then retreat low.

Lingering on these numbers a little longer, I thought I’d compare these numbers to someone else’s model for a further sanity check. Mark Thompson of Every Team Needs a Ron is one of my favourite writers, and is devoted to studying defenders in all their forms. He has a system to analyse how teams convert possessions into attacks, and attacks into shots, and how they allow their opponents to do the same. I compared the defensive rank data above with his data to see what the correlations were:

Defence Midfield Attack
Attacks per Possession 0.65 0.47 0.40
Shots per Attack 0.46 0.53 0.38

So, comparing the Attack, Midfield, Defence PATCH values from the graph above to Mark’s Attacks per Possession and Shots per Attack, we can get an idea of how much different parts of a team contribute to breaking up attacks. Defensive PATCH values explain 65% of the variance in opponent attacks per possession, whereas midfield is a much lower 47%. This makes some sense, while a lot of teams would love their midfield to quash potential attacks before they happen, it’s far more common that they make it throught to the last line. What’s interesting is the second row, where midfield performances explain shots pre attack better than defence. Again I wonder if this is bad shot quality – the defence don’t (and often don’t want to) stop low-expectation long shots. However if your midfield are putting in a good screening performance, attackers won’t even get the space for bad shots.

That’s one explanation, anyway. At the very least I’m happy to see a decent correlation with someone else’s model.

Patchwork Defences

Defences are more than the sum of their parts. There are plenty of games where teams in aggregate can put in a great performance in terms of total or average PATCH values, but still be torn apart on the field. This happens often because of mistakes, which PATCH will probably never be able to account for, but it also happens because of weak links that let down the greater whole. Have a look at Manchester City from this weekend’s absolutely definitive title decider against Leicester:


This is a fairly green chart – City policed a lot of territory, and in various parts of the pitch prevented Leicester from making regular gains. But look at their right-hand side: Otamendi didn’t score especially highly, and Zabaleta (who seems to be pushing quite far forward) scored even worse. Teams rightly fear Leicester’s right wing, because that’s where the formidable Mahrez nominally takes the field, but here we saw Mahrez pop up on the left a few times, including for Leicester’s 2nd goal, and Drinkwater also made some penetrative passes. We can see this from Leicester’s attacking chart for the day:


Very left leaning, basically nothing on the right. Despite the fact that City conceded twice from set-pieces, you still saw scare after scare from open play. The combination of a weak defensive right-hand side, and players taking higher positions than was perhaps advisable against the league’s fastest counter-attacking team (still 2nd in Europe after Caen), meant that good PATCH scores in many parts of the pitch did not necessarily add up to a good defensive performance.

Weak Links

Given what we saw in the Man City vs Leicester game, perhaps we should judge a defence by its weakest link? After all, if they’re allowing lots of ball progression in their area, that’s obviously where the opposition are attacking, whether or not they’re thinking of that player as exploitable. If we just look at the lowest score for a defender in each game (using just those with 90+ minutes in a game to be safe), this is what teams come out looking like:

Team Mean Weak Link PATCH
Chelsea 2.32
Manchester United 2.06
Arsenal 1.99
Manchester City 1.97
Liverpool 1.78
Aston Villa 1.77
Leicester City 1.74
Tottenham Hotspur 1.74
Southampton 1.74
Bournemouth 1.68
Swansea City 1.62
Norwich City 1.61
Crystal Palace 1.59
West Bromwich Albion 1.58
Watford 1.54
Everton 1.53
West Ham United 1.48
Stoke City 1.48
Newcastle United 1.45
Sunderland 1.45

Nothing radically different here, perhaps I should be a little uncomfortable seeing Villa that high, but they have save percentage and shot creation issues, not necessarily an awful defence. That said, these numbers correlate less well with each of the four measures we compared to earlier, so it seems less representative.

Total Territory

PATCH fundamentally rewards defenders for claiming territory, so lets look into any team characteristics can we pick up from looking at their territory as a whole. Who uses the most space? Who leaves the most gaps?

This is total area per game of players’ defensive territory for each team, measured first as the sum of individual areas, then as a merged team area:

Team Total Individual Area Team Area
Arsenal 12375 5286
Aston Villa 12338 5590
Bournemouth 12487 5540
Chelsea 13385 5612
Crystal Palace 14240 5750
Everton 10494 5181
Leicester City 14580 6078
Liverpool 12817 5626
Manchester City 12025 5405
Manchester United 13156 5438
Newcastle United 11767 5003
Norwich City 11949 5614
Southampton 12885 5525
Stoke City 11464 5347
Sunderland 12880 5560
Swansea City 10882 5052
Tottenham Hotspur 13520 5522
Watford 12482 5779
West Bromwich Albion 12943 5694
West Ham United 14022 5693

Which looks like this:


The X axis is the total individual area, which includes overlaps between players. The Y axis is the team shape, the area you get when you merge all the individual territories together and forget overlaps – also worth noting that the lower this value, the more empty spaces the team is leaving on the pitch.

It’s interesting because it reveals teams that are quite expansive in their defensive efforts (to the right are basically the pressers and aggressors, to the left is… Everton, asking very little of its defence). It also shows teams that have an overall compact defensive shape (Newcastle) versus those that are push up more (Leicester, Watford). Above the trend line are teams with less overlap, below are those that are more crowded when defending.

If we apply a similar sort of calculation to PATCH, we can take a team’s area and judge them not by the progression they allow through their territory, but by the progression that happens outside it. If we do that, these are the numbers we see:

Team Outside Territory PATCH
Manchester City 24.09
Liverpool 23.55
Norwich City 22.78
Southampton 22.04
Leicester City 20.77
Watford 20.75
Tottenham Hotspur 20.59
Aston Villa 20.22
West Bromwich Albion 20.19
Crystal Palace 19.37
Bournemouth 19.35
West Ham United 19.26
Chelsea 18.34
Manchester United 17.94
Arsenal 16.98
Swansea City 16.51
Stoke City 16.36
Sunderland 15.96
Everton 13.31
Newcastle United 11.28

So Man City, Liverpool and… Norwich (apparently) allow the least progression outside their territory. Newcastle and Everton leave the biggest gaps for opponents to operate inside.

Getting Goal Side

Above you saw how a lot goes on in empty spaces. The thing that worries me most about PATCH, and particularly the approach I’ve taken to trimming events for territory, is space behind a defender. Perhaps we should leave in all goal side events for a defender? Even more, should we project their territory back to the goal line, or even the goalmouth itself?

Well, you’re going to have to wait to find out. In my next post I’m going to finally get around to looking at some individual player scores, and I’ll experiment with how defenders should be blamed for goal side events then.

PATCHing Teams

Defending your PATCH

Here is Chelsea defending against West Brom in their 2-2 draw this season:


If I’m pointing you to this post from Twitter, it’s likely that you’ve asked, with varying degrees of alarm, what the hell you’re looking at with a chart like above. Because I’m terrible at making legends, here you go:

  • This is a chart of how Chelsea defended in the game.
  • Each shape is a player, it represents their defensive ‘territory’ – the part of the pitch they made tackles, interceptions, fouls etc.
  • The player’s name is written in the centre of their territory, and you should be able to see that some names, and their associated shapes, are bigger or smaller, depending on how much a player ranges around the pitch.
  • Each shape has a colour – this represents how much they allowed the opponent to progress through their territory: more green means the player was more of a brick wall, more red means they were more of a sieve.
  • Above, you might see that Oscar put in a ton of work and claimed a large territory – we reward players who claim a lot of territory, which is why he’s more green than some of the players he shared space with, even though he let the same opposition moves through.
  • Terry did not protect his space particularly well. Mikel and Fabregas provided little in the way of screening, and Matic, who replaced Fabregas, sat very deep but also offered little as they defended their lead.

Just as a quick sanity check on what you see above, WBA’s two goals came from a long shot from a huge empty space in front of Chelsea’s defence (left open by their midfield) and a move on Terry’s side of the penalty box:

Those are cherry-picked and don’t prove much, of course. No chart captures the entirety of a game, but hopefully you see that this is at least an interesting conversation starter to examine where Chelsea might have protected their territory better. Over the course of several games, you may notice the same patterns happening over and over again. At the same time, these are a great first stab at looking for weaknesses in an opponent’s lineup.

And that’s what you’re looking at. How does it work?


A while back I started looking at defence in terms of how a defender prevents their opponents operating in their territory. This included a metric called PATCH (“Possession Adjusted Territorial Control Held”… yeah), which underwent several changes without me really writing it up, despite publishing all sorts of cryptic charts on Twitter. So, my plan today is to go through the whole methodology as it stands today. There’s still work to do, and it’s by no means a hard and fast measure of good and bad defending, but it’s interesting enough to share and hope for some feedback.

Defensive Territory

PATCH is all about defensive territory – where on the pitch a player is responsible for stopping their opponent. We don’t measure this in an idealised way based on formations or anything like that, all we do is look at where a player is actually defending. We take all their defensive actions and draw a line around them – that’s their territory. In the previous version, we only looked at events in a team’s own half or danger zone, so the system wasn’t great at capturing defensive midfielders, who often defend higher up the pitch. That was a problem, but one we needed to solve without including noise from things like aerial challengers on attacking corners etc. It was also a problem that if a player put in even a single tackle in a weird place (a left back on the right wing etc) then the outline of their territory grew hugely.

There are many ways to solve this, I’ve experimented with a couple. The first was to find the average point of a defender’s defensive actions, and just trim events within 1 standard deviation on the X and Y axes. The advantage of this is that it’s dead simple, very quick to do inside a database query, and the resulting area was still somewhat representative of where the player was on the pitch. But not representative enough: it was possible for players to completely disappear if their defensive actions were all taken in a large ring far enough away from the centre, and it occasionally wrongly accused players of retreating into a tiny territory. Here’s an old version of the Chelsea-WBA chart above, look how tiny everyone is, especially John Terry:


I then experimented with a similar approach using the straight-line distance from the centre within the same sorts of bounds, but really this just gave you a slightly more circular version of the previous box. I finally settled on decent compromise between ease of implementation and realism – I trim events to those within the 70th percentile of distance from the centre. Here’s another example, Tottenham’s 4-1 victory over Sunderland:


The one drawback over the previous version is that things look far busier, especially where there are overlaps, which is why I’ve started putting them on a black background, and increasing the transparency of lower-scoring players (because, you know, sieves are more see-through than brick walls). Departure from brand, I know, but probably more readable.

Future avenues to look at are algorithms like local convex hulls, or more probabilistic approaches. You can certainly use some sort of kernel density approach, although I appreciate having hard boundaries to territory as it is. I might be willing to sacrifice the ease of visualising territory for a better approach, however, and I’ve been looking at a fairly complex system whereby you look at defensive events and opponent buildup in previous (representative) games, and use a Bayesian system to determine the degree to which we think a player would usually be defensively responsible in that situation. I’d love to hear any other approaches people have tried.

Ball Progression

The original PATCH metric looked at how many opposition touches a defender allowed in their territory to judge how well they were doing, but this didn’t seem ideal. Some teams with a low block are happy for you to play in front of them to your heart’s content, as long as you don’t make any progress towards goal. Then there are some bad defences that just don’t take many touches to break through and score. So I’ve made a fundamental change here – we now measure ball progression through a defender’s territory. Whenever the ball is passed, or dribbled, or whatever combination of on-the-ball events happens, we look at how much progress the opposition have made towards the defending team’s goal. More than that, we look at the pace with which they’ve moved. Any player whose territory is intersected by the line of this progress gets blamed for it.

So now we’re really measuring something directly relevant – a team moving towards your goal is getting into better and better shooting positions, and preventing, disrupting or postponing this is more or less the core of good defensive work. As ever, it’s not a metric based purely on defensive actions – we still use things like tackles to help mark out a player’s territory, and we hope that there are enough of these events to get an accurate picture. But we’re not judging them on those numbers – we’re judging them in far more direct terms, based on protecting their goal.


As with the previous metric, players are rewarded for the size of their territory , and then penalised for allowing the opposition into it, in this iteration based on ball progression. But the previous scores left me a little uncomfortable, with PATCH regularly recommending bad defences over good ones. I went back and looked in depth at the variables that went into the calculation, and especially the relationships between them.

The first thing I looked at was the possession factor, which was in there to account for the fact that teams without the ball can’t attack you. To be able to compare individual players from high and low possession teams, I normalised things to 50% possession. However it’s not as simple as that, because you might expect high possession teams to have fewer opportunities to make defensive actions, so they’d on average have smaller territories. Rather than scratch my head over it, I just looked at the numbers. It was quickly obvious was that possession really doesn’t have a reliable affect on a player’s territory. More surprisingly, the correlation with ball progression allowed is also extremely low. So, possession’s out. We’ll retcon the acronym later.

I also worried that players with large territories were being overly rewarded, and looked at a couple of different options like taking the root of the area. In the end, if you look at the data, it’s pretty much a linear relationship, but I’ve made the coefficients a little more accurate at least. I also looked at the degree to which minutes on the pitch affected defensive territory, and again, it’s almost impossible to find a reliable correlation. Therefore, only ball progressions is weighted per 90.

So that’s the algorithm – get the area, divide it by ball progression, which you weight per 90 and by pace. The bigger your territory, the better you protect it, the higher you’ll score. It looks a little like this:

(k * Area) ÷ ((Total Ball Progression ÷ Minutes Played x 90) ÷ Average Progression Duration)

That’s the gist anyway.


This is the usual section where I list things I was too lazy to fix, but I promise I’m thinking about them:

  • There are better ways to calculate territory, but not necessarily ones that can run inside an SQL query before I get bored.
  • Players are blamed for ball progression no matter how much their territory is intersected by an opponent event. Even in the case where they hoof the ball way over your head, you still get blamed. Long term, I’d like to handle special cases like this, and assign degrees of blame to different territories.
  • I’m aware that the gaps between territories are interesting – you can defend your territory brilliantly, but still be in the wrong place. Watch this space.
  • Lots of goals, frankly, come from mistakes, which aren’t captured here.
  • Different positions might want different approaches both to territory and scoring.

It’s also worth point out a few other people working in the same space. Sander at @11tegen11 naturally has a version, with scores based on the number of defensive actions:

And David Sumpter of @Soccermatics has similar charts looking at just ball recoveries, which is fascinating to study teams’ pressing approaches:

Happy to hear any other ideas people have!

Defending your PATCH

Defence, Territory and Control

There comes a time in your adolescence as a stats writer when your parents rudely awaken you in the middle of the night, bundle you into a car, and drop you in the middle of a dark forest with nothing but a sharp stick. “It’s time you made your own defensive metric,” they tell you before receding into the darkness. It is a rite of passage every statto must endure alone.

Frightened and cold, you look for shelter. xG, you think. I know xG, good old xG, I can use that for something! But others have been here before, the forest has been hunted barrenWhat about those bright green diagrams everyone claims to like, could I just use those? Carving numbers into trees with your trusty pointy stick, you get to work.

As anyone who follows this blog will know, I’m quite interested in space and how teams use it. Today I’m going to look at the territory claimed by defenders and I’m going to propose a metric based on the actions they allow within that territory. It’s just one metric, it’s not the be-all and end-all of measuring defenders or defences, but I think it’s vaguely interesting, and its opinion on a lot of defenders is defensible. It has some flaws that’ll probably be obvious to you, but I’ll mention them as we go.

What does a defender’s territory look like? Here’s how Arsenal looked against Tottenham in the North-London derby:


Here’s Aston Villa’s clean sheet against Manchester City:


And here’s Newcastle from their 1-0 smash and grab against Bournemouth:


These are similar to my shot buildup charts, but for defensive actions. For each defender, we take all their own-half defensive actions (tackles, blocks, interceptions, clearances, aerial challenges and indeed fouls), and draw a line around them. This is their territory, it’s the part of the pitch they seem to want to be responsible for.

Now you could argue we could just split the final third of the pitch into four and assign each slice to a defender, but I think the overlaps are very valuable here – you want to know if a defender drifts inside or out, how far they push forwards etc. Obviously drawing the lines like this leaves gaps – nobody’s taking responsibility right at the edges or corners of the pitch. There’s also the problem of a player that makes a single tackle on the other side of the pitch, stretching their territory, perhaps unfairly. We could add a bit of a buffer zone to these areas, and trim some outliers, but for now I’m happy with them as they are – they are the best way we have of outlining a defender’s territory, based entirely on where the defender tries to defend.

Glancing at the charts above, you’ll notice some players have more territory than others. We want a metric that rewards this, if possible – if a player is bossing the entire danger zone, that’s great, even if you might prefer to see their team-mates step in. So our metric’s first ingredient is the surface area of a defender’s territory.

But the positioning on its own is meaningless, we want to know how much control they exert in that space. For this, we count the number of touches opponents take in the defender’s territory. These aren’t touches as you see them on TV, these are just all the aggregate events we see in the data – passes, dribbles, shots, all the stuff opponents want to do in our half. We have to be careful here to count points inside the territory, and only those that overlap the defender’s time on the pitch.

We combine these by dividing the area by the number of touches, then we weight things by possession and per-ninetify everything. What you should picture is the defender scent-marking their territory (I find it easiest to picture John Terry doing this, for some reason), and then every opposition action diluting that scent more and more. Larger territory will necessarily be exposed to more opposition actions, but good defenders will prevent and repel as much of this as possible. Players that make fewer defensive actions will have tiny territories, but can still score highly by keeping opponents out.

What’s nice about this particular metric is that it doesn’t force you to work out whether tackles or interceptions or aerials or whatever are more important, and it doesn’t require you to look at shots and xG (or expected assists etc). It captures defensive pressure in open play, which is where most defending happens.

So, recapping the algorithm:

Area ÷ Opposition Touches ÷ Possession ÷ Minutes Played × 90

I like to refer to this as ‘Possession-adjusted Territorial Control Held’, or PaTCH. I am not good at acronyms, please suggest more. In the meantime, which defenders have a good PaTCH?

Player Team PaTCH
Gabriel Armando de Abreu Arsenal 596.2
John Terry Chelsea 302.0
Chris Smalling Manchester United 268.2
Cedric Ricardo Alves Soares Southampton 265.4
Nicolás Otamendi Manchester City 261.9
Matteo Darmian Manchester United 256.7
Sylvain Distin Bournemouth 255.1
Eliaquim Mangala Manchester City 250.1
Sebastian Prödl Watford 248.4
Virgil van Dijk Southampton 238.4
Mamadou Sakho Liverpool 237.2
Joleon Lescott Aston Villa 233.2
Allan-Roméo Nyom Watford 226.6
Fabricio Coloccini Newcastle United 226.4
Aleksandar Kolarov Manchester City 209.8
Neil Taylor Swansea City 208.4
Ashley Williams Swansea City 202.1
Laurent Koscielny Arsenal 195.3
Simon Francis Bournemouth 194.4
César Azpilicueta Chelsea 189.2
Luke Shaw Manchester United 187.7
Kurt Zouma Chelsea 185.4
Toby Alderweireld Tottenham Hotspur 185.0
Ryan Bertrand Southampton 182.2
Steven Whittaker Norwich City 176.8
Gareth McAuley West Bromwich Albion 175.1
Micah Richards Aston Villa 174.3
Jose Fonte Southampton 171.8
Russell Martin Norwich City 171.0
Glen Johnson Stoke City 170.9
Jeffrey Schlupp Leicester City 167.3
Daley Blind Manchester United 163.9
Bacary Sagna Manchester City 158.7
Phil Jagielka Everton 158.4
Nathaniel Clyne Liverpool 158.3
Ciaran Clark Aston Villa 155.5
Federico Fernandez Swansea City 150.3
Sebastien Bassong Norwich City 148.9
Vincent Kompany Manchester City 146.4
Per Mertesacker Arsenal 146.0
Martin Kelly Crystal Palace 145.1
Nacho Monreal Arsenal 142.1
Craig Cathcart Watford 139.9
Joel Ward Crystal Palace 138.1
Martin Skrtel Liverpool 138.0
Charlie Daniels Bournemouth 135.7
Ben Davies Tottenham Hotspur 135.2
Joseph Gomez Liverpool 134.9
Robbie Brady Norwich City 134.7
Winston Reid West Ham United 132.8
Jan Vertonghen Tottenham Hotspur 132.1
Alan Hutton Aston Villa 131.9
Jordan Amavi Aston Villa 128.6
Aaron Cresswell West Ham United 128.4
Maya Yoshida Southampton 127.4
Tommy Elphick Bournemouth 126.6
Héctor Bellerín Arsenal 119.5
Philipp Wollscheid Stoke City 119.4
Branislav Ivanovic Chelsea 117.8
Kyle Walker Tottenham Hotspur 116.9
Geoff Cameron Stoke City 116.8
Erik Pieters Stoke City 116.0
Carl Jenkinson West Ham United 115.7
Gary Cahill Chelsea 114.5
Marc Muniesa Stoke City 114.3
Kyle Naughton Swansea City 111.3
James Tomkins West Ham United 110.8
Scott Dann Crystal Palace 107.7
Steve Cook Bournemouth 107.0
John Stones Everton 106.8
Daryl Janmaat Newcastle United 104.4
Jonny Evans West Bromwich Albion 103.7
Chris Brunt West Bromwich Albion 103.1
Ritchie de Laet Leicester City 103.1
Danny Rose Tottenham Hotspur 100.0
Wes Morgan Leicester City 97.4
Robert Huth Leicester City 95.3
Brendan Galloway Everton 95.0
Dejan Lovren Liverpool 92.3
Billy Jones Sunderland 90.7
Nathan Aké Watford 90.2
Pape Souaré Crystal Palace 85.4
Seamus Coleman Everton 84.6
Massadio Haidara Newcastle United 83.2
John O’Shea Sunderland 82.7
Younes Kaboul Sunderland 80.5
Craig Dawson West Bromwich Albion 77.5
Chancel Mbemba Newcastle United 74.0
Damien Delaney Crystal Palace 70.1
Sebastián Coates Sunderland 69.1
Patrick van Aanholt Sunderland 68.4
Brede Hangeland Crystal Palace 64.6

These are filtered for defenders with 450+ mins (all data from before Saturday’s games), and I’m calculating the average PaTCH over those games. Note: as usual, ballsed up a bit, the graphics show territory marked out in the defender’s own half, the numbers are actually calculated for territory in the final third. But it’s cool, cos comparing the two sets of numbers will make for an interesting article in a bit.

Gabriel is such an outlier because of Arsenal’s 1-0 win over Arsenal, in which Mitrovic got sent off and Newcastle had one shot. Look at the territory:


Now look at the heatmap from the BBC (Newcastle on the left):


Newcastle had one touch in his territory, as far as I can tell, giving an astronomical match PaTCH (yup) in the three-thousands. Anyway, I will think of some better averaging or thresholding to reduce the impact of stuff like this, but still, he sort of earned it.

Elsewhere, you can see the model doesn’t like Sunderland or Crystal Palace much, but is a little bullish on Aston Villa’s defence. Of course this weekend Lescott was benched against Everton, and Villa decided to sit very deep and let Everton play, with horrific results. Everton themselves seem to have ridden their luck a few times – Galloway, Coleman and Stones bomb forward regularly and rely on Barry and McCarthy to pick up the slack in their territory, something I’d like to capture in the numbers at some point. Terry is still good at some stuff, Smalling’s number is consistent with the hype, Otamendi is predictably up there, and Koscielny is doing fine, though he’d probably benefit from that forever delayed defensive midfield signing for Arsenal. Lovren near the bottom, below every Liverpool and Southampton player.

For now, I’m reasonably happy with who shows up at the top and bottom. Over the next few days I’ll play with some historical data to tell some stories, incorporate this metric with a Christmas Shopping piece about defenders, then make some visualisations to see if there’s a good counterpart to the attacking buildup maps.

Defence, Territory and Control

Visualising Attacking Shape

Today I’ve been experimenting with how to visualise the attacking geometry data I’ve been calculating. If you’ve seen the previous posts you’ll know that I’ve been mostly able to calculate width, height and duration for passing moves that lead to shots. I want to use this data to get a feel for how different teams attack and ultimately what types of attack are effective.

The data is still a bit problematic. I’m only interested in attacking buildup – shots from free-kicks, or directly after turnovers don’t show up because there’s only one event in the move, the shot itself. There’s also a bit of fuzziness that perhaps over-eagerly associates passages of play with an attack – this is because of quick changes in possession. Basically you have two options:

  1. Reset the buildup whenever the attacking team loses the ball. This means you’re incredibly sensitive to attempted clearances or aerial challenges.
  2. Allow a little leeway for the attacking team to win possession back.

I chose the latter – after an unsuccessful pass which gives the opponents the ball, if the attacking team can get the ball back within 5 seconds, it’s credited as part of the same attacking move. It results in us capturing many more moves around the box (where deflections, clearances and aerial challenges are common) at a cost of elongating some moves in the middle of the park where you might argue that the ball is actually evenly contested. There are other caveats that I hope are sensible: I don’t track shots after rebounds unless they grow into their own move, otherwise I’d risk measuring the build-up play twice. I also don’t track moves across dead-ball situations, so fast throw-ins or free-kicks don’t get added to previous build-up play.

Once you have that data to build upon, it’s very easy to take some averages and lose interesting truths – by averaging out Tottenham’s numbers, for example, you lose sight of their fast vertical attacks as they’re swamped by patient side-to-side buildup play. So instead of creating a team-by-team visualisation, I’m attempted to cram all of a team’s attacks in a single game onto one image. My hope is that this lets you look how and where they’re attacking at a glance – what parts of the pitch, how wide the move is, how long it took, how much vertical space it gained. Just the sheer volume of space a team uses while attacking should give a fairly good indicator of their control in a match.

Anyway, let’s see – I’d appreciate any comments about these. It’s possible it’s too much for one visualisation, and perhaps they’re a bit garish when you have a team with tons of shots. But hopefully you’ll agree that there’s some interesting information to be gleaned just from a quick glance.

Let’s start with a busy one, this is Tottenham’s attacking play against Aston Villa:


The boxes are the bounds of an attack, so you can see how wide and how high it went. The colour represents duration – faster attacks are more red, slower attacks with more buildup are green. What can you see here beyond a bit of a mess? Well, tons of shots, for one. Some slow, expansive buildup play, but plenty of more faster penetrative moves too, especially through the centre and to the left of the penalty box, where the first and second goals came from.

Here’s the reverse, with Aston Villa’s attacks from that game:


Much less going on here, a lot of wide, flat moves, not a ton of penetration.

Here’s Liverpool against Chelsea:


Lots going on in the middle, including a few signs of pace. Chelsea’s chart is pretty abject though:


I mean, at least they’re starting high up the pitch, but these slow, spacey moves don’t seem that scary, and they’re not pushing far into the box. Those tiny, slightly redder boxes? I thought they were a bug, but no – the one near the half way line is Oscar winning the ball and shooting from 40-odd yards. The one in the box is Falcao winning a header after a rebound of Sakho from an Oscar shot (remember we don’t follow moves across rebounds).

But if you want pure comedy value, let’s have a look at Crystal Palace’s 0-0 draw with Man Utd:


Not a lot going on here, but Palace one of teams with shortest moves in the league and that shows here, on top of a little bit of excitement on that right-hand side of the box. But forget all of that, up next is the single saddest chart I have ever seen in my life:


I shit you not. Now, this isn’t every shot Man Utd took, they had a free-kick on target if you remember, and those don’t show up in this data. But seriously, this was what their slow, rambling build-up looked like when it actually happened. Good clean sheet, though.

So… the busier these get the harder they are to parse, I think, but I still like them. If anyone has any ideas for different ways they’d like to see this data mangled, by all means get in touch. Have REPL, will program. And if there are any particular games you’d like to see this way, just ask and I’ll tweet them out.

Visualising Attacking Shape

Where are the Gains?

This week in gratuitous visualisations with little or no analytic value, I thought I’d show where each team’s passing gains are coming from this season. Below you can see, for each EPL team, the proportion of gains coming from passes into the left, centre, or right thirds of the pitch – so just to be clear, a long ball from the right hand side to the left is notched up as a gain on the left. Ignore units for now, it’s the relative sizes that I think are interesting.

Passing Gains

You’ll immediately note a few things:

  • Man Utd and Spurs in the aggregate make backward passes to the middle of the field. These are the teams most obviously utilising a pivot, as they recycle possession from wing to wing probing for an opening.
  • Arsenal’s Sanchez-powered left wing has made more gains than any other attack in the Premier League.
  • Everton and Southampton are two teams making big gains in the centre of the field. I’d be interested to see in either team’s case how this possession progresses, because in Everton’s case they often run into dead ends centrally.
  • There’s hope for Newcastle down that right hand side, with Moussa Sissoko’s club-leading 4 assists.
  • West Brom don’t seem particularly penetrative, as Tony Pulis concentrates on reaching the heat-death of the universe with as many clean sheets as possible.
Where are the Gains?

Visualising Centre of Gravity

Gab Marcotti, talking on the excellent Analytics FC podcast a couple of weeks ago, mentioned a stat that’s sometimes talked about in Europe, but less so over here in the UK – a team’s centre of gravity. This is a single point on the field that shows the team’s average position. It might not seem hugely revealing taken in isolation, but comparing teams, matches, or seasons, you can see some movement and draw some conclusions.

I thought about ways to visualise this, and thought just a couple of dots on an empty pitch would be a little underwhelming, but then I realised we could go a bit further. I want to try to create the simplest possible visualisation that can give you the general gist of a team’s positioning and passing, and so I’ve calculated the following:

  1. A team’s centre of gravity in each match. This is just the average of all that team’s touches in the match.
  2. The average starting position of that team’s passing, which will hopefully show roughly where the team is using the ball and starting moves. I’ll call this pass origin.
  3. The average ending position of the team’s passes, which might reveal the length of their passes, or a preference for one wing over the other. Although note that sideways passes can cancel each-other out, so you’ll see most lines pointing through the middle – later we might want a way to show a team’s preference for forwards versus sideways passing, but we don’t have it here. Anyway, I’ll call this ending position of passes pass destination.

I’ve calculated these by using all touches, but only successful passes, and I’ve removed goal kicks and drop kicks because I feared they would somewhat skew the numbers. Let’s tell the tale of two matches and see if we can make sense of them – here’s Arsenal’s 5-2 win over Leicester from September:


I’ll jazz these up at some point, but for now, here’s what you’re seeing: the graph represents the middle third of the middle third of the pitch, so a rectangular block in the middle, the centre spot being where the dotted axes cross. The start of the dotted line is the centre of gravity, the average of a team’s touches. The end of the dotted line, and the start of the solid line, is the pass origin – the average position in which passes were attempted. And the end of that line is the pass destination, the average position of a pass completion. The arrows show the direction of play. So what conclusions would we draw at a glance here?

  • Leicester seemed to be pushing up near the half way line. Some of this might be score effects – they only led for 5 minutes, and trailed from 33 mins onwards. But some might just be a decision to play a high line against a good attack, a decision we’ve seen blow up before.
  • Leicester’s passing was longer than Arsenal’s. Perhaps you’ll remember the long ball that led to Vardy’s opener.
  • Arsenal leaned a little to the left of the pitch, which was, incidentally, hat-trick scorer Alexis Sanchez’s side that day.

Whether or not that tells much of a story of the match on the day is up for debate, obviously I can interpret the lines to fit the facts but that proves little. But let’s compare to another Arsenal game, this time the 3-0 win over Manchester United:


Well this is a slightly different Arsenal – much deeper, with Man Utd camped out in the Arsenal half, chasing a 3-0 deficit after 20 minutes. You’d be forgiven for perhaps interpreting the deeper Arsenal play and longer balls as a superb counter-attacking performance, but I think that’s misleading – they dominated totally early on, and then shelled effectively. That identifies straight away a risk with these visualisations, and indicates I should probably be at least splitting them into halves, or event better dividing them up for each goal. Perhaps it’s possible to fit that on one graph, who knows.

Wanna see a real counter-attacking performance? Here you go:


Deep again, even longer balls forwards, and Bayern compressed here as you might expected when you average their 600-odd passes.

So, I think this is an interesting way of glancing at games. It doesn’t reveal the whole story, but I think with a bit more granularity, it’s an interesting kicking off point for a game’s narrative. When I’ve got these automated I’ll start putting them out for each game, and there are a few comparisons I’d like to make in the future, e.g. Barcelona’s evolution over the last few years. If anyone has any specific requests or wants some limited data to play with their own visualisations, just get in touch.

And finally, another shout out to the Analytics FC podcast which inspired the work here!

Visualising Centre of Gravity