The world’s leading publication for data science, AI, and ML professionals.

Visualizing Different NFL Player Styles

Different players have different strengths and weaknesses – is there a way to visualize them?

CC by 2.0
CC by 2.0

Different players have different strengths and weaknesses – is there a way to visualize them?

Introduction

Back in the early 2000’s, the New York Giants had an exciting running back duo. Tiki Barber ("Lightning") went for about 1000 yards rushing and 550 yards receiving a year. That’s impressive on its own, but even more impressive because Ron Dayne ("Thunder"), an early first rounder, was on the same team. Dayne’s yardage totals were less impressive (roughly 40 yards/game), but the yards that he gained were all tough to get, and he was rewarded with plenty of touchdowns. He was the goal line, short yardage back. It’s not hard to figure out how they got their nicknames.

Across the league, at all positions, there are different player styles and player roles at the same position. Using Principle Component Analysis (Pca) and clustering algorithms, we can easily sort out these players into separate categories and do so without biases that might come from film study. PCA and clustering algorithms sound fancy, but they’re pretty intuitive. I’m far from the first to do this sort of analysis – here’s a great version of the same process for NBA players from Nadir Nibras.

Step 1: Select Features

The first step to classifying players is to figure out what separates certain players from others. There are very obvious features, like yards per game or touchdowns in a season. You don’t need unsupervised learning algorithms to tell Cam Newton from Blaine Gabbert, and if that’s all that I was comparing, the article would be over by now. Height and weight are also obvious features, especially if you watched Tiki Barber and Ron Dayne, and so I scraped them from pro-football-reference.com to include them. I ended up with quite a few features for each player, and that’s not a bad thing as long as they are all relevant. The features I did pick are subjective, and open for debate!

  1. Age/Height/Weight – Self-explanatory
  2. Dropbacks per game – Self-explanatory
  3. Completion rate, TD rate, INT rate – completions, touchdowns, and interceptions divided by total dropbacks
  4. Sack rate, QB hit rate— Sacks are important, because it only takes one to kill a drive. I considered including average yards lost and the standard deviation of yards lost on sacks, but I think that would just add noise. Quarterbacks like Eli Manning and Sam Bradford don’t move in the pocket and just turtle when they feel pressure. Aaron Rodgers and Russell Wilson will never be caught not rolling out at least a little bit. These are key differences, and I guess we’ll have to wait on player tracking data!
  5. EPA/Dropback, Success Rate – A lot of per dropback stats! These are both closely related advanced stats. If you’re looking for two stats that best measure a QB’s ability, these are the two I would choose. EPA/Dropback measures how many expected points a quarterback adds every time he drops back on average. Success rate measures what percentage of those dropbacks result in positive EPA.
  6. Yards Per Completion, Completion Explosiveness 😈 – This is the first time I get to use my explosiveness stat, which is enough reason for me to write all of this. Yards Per Completion is self explanatory. Completion Explosiveness is the Gini coefficient of all completions, i.e. what percentage of completion yards belong to big plays? If the Gini coefficient is high, that means that there are a lot of mild to low gains, and a handful of huge gains. Saquon Barkley was the prime example of an "explosive" player using this definition. Alternatively a low Gini suggests that a lot of the gains by a player were similar (i.e. if a player had a lot of 7 yard gains but never had an 80 yard TD).
  7. Air Yards stats, Air Yards Explosiveness— Also known as average depth of target (aDOT). Some QB’s, i.e. Ryan Fitzpatrick in 2018, like to chuck it deep and hope their receivers come down with the ball. Others are check down machines… Eli Manning comes to mind although there are plenty of other examples. Ryan Fitzpatrick has high air yards, while Eli Manning does not. I divide Air Yards into Completion Air Yards (CAY), and InCompletion Air Yards (ICAY).
  8. Yards After Catch , YAC Explosiveness— The opposite of the stats above. When a receiver catches the ball, how far do they take it afterward? Speaking of Eli Manning, when he had Odell Beckham, he would hit Odell on slants and Odell would have 75 yards after catch. I guess it’s technically Odell’s YAC, but it’s worth measuring for Eli to know what percentage of his production comes from receivers running with the ball. Eli’s YAC explosiveness is also high, because a higher percentage of his yards belong to big plays. Sometimes large YAC is due to receivers being good in the open field, other times it’s because the QB hit the player in stride on a crossing route and the receiver has a ton of open field. QB’s do have an effect on it, for more (a lot more) you can read here.
  9. All QB rushing stats – Rushing yards per carry, rushing attempts per game, run explosiveness, rushing win probability added.
  10. Average Win Probability – Average win probability at time of pass attempt. I’m choosing to include this because some QBs are passing while behind, when defenses expect pass. Others are up two scores, and different results would be expected. Also this is a rough measure of the talent around a quarterback.
  11. Approximate Value (av)— A pro-football-reference statistic that basically measures the value of a player compared to other positions. It’s a rough measure, but in my opinion, worth including.

There’s no question that the stats selected for this analysis are debatable. I left out salary and draft position, but I could see an argument for including them depending on what you’re analyzing (also my salary data is incomplete). If I had combine statistics readily available I would probably include them too.

Step 2: Enough Words, More Pictures. Let’s Analyze!

Heat map of the 26 statistics above:

/D means per dropback, /G means per game
/D means per dropback, /G means per game

Okay, this is overwhelming. We’ll fix that! But it contains a ton of useful information. For example, if you go across the top row, you can see how age is correlated to every other variable. A lot of variables aren’t correlated meaningfully at all, but there are some interesting high correlations. An easy example is that EPA/Dropback (basically a measure of how good you are) is highly correlated with completions and TDs while negatively correlated with incompletions and interceptions. Another example is that run attempts per game are correlated with sacks and hits – basically, if you’re getting hit, you have to scramble more. There are some less expected correlations too. Tall quarterbacks don’t scramble as often. Yards after catch is correlated with QB running stats… if you’re hitting receivers downfield and/or while scrambling, receivers have more room to maneuver in the open field I guess. Those are the first ones I found, have a look for yourself!

Step 3: Too much information! We need PCA.

First of all, this article is purely dedicated to explaining PCA, and if you need further explanation, I recommend it!

Hypothetically, let’s say we had 26 separate Quarterback features. A lot of these features are heavily correlated or anti-correlated – they’re basically telling us the same thing. As an example, you already know that a QB with high completions, low interceptions, and high TD rate will have high EPA per dropback. We just want one component that tells us "good QB" or "bad QB". We can distill those 3 components (completions, interceptions, and TD rate) into one principal component. That principal component will be a number that tries to maximize the information that you can get from its 3 subcomponents.

Practically, Principal Component Analysis is some hand-wavy magic that can turn 26 components into 25 components, 24 components, 23 components, any smaller number we want… and it seeks to minimize the information lost each component that it sacrifices.

The strength of PCA is that we can develop a 2-dimensional or 3-dimensional representation of a given quarterback, extracting the maximum possible information from the 26 features above. The weakness is that we don’t have any true meaning for each dimension, we’ll just know that quarterbacks similar to each other will be near each other.

Also, if our 26 features were poorly chosen, PCA would output complete garbage. So as much as I want to include features like "cleat appearance rating" or "1–10 would have beer with", they would mess up the analysis. Lastly, outliers can mess it up. Lamar Jackson might be a good example of a QB that can mess up rushing stats because he will have many attempts.

Above is an example of a 3D PCA plot of QB seasons from 2009–2019. There are a few problems here, but I still think it’s cool enough to include.

One, I’ll use 2D plots from now on. It’s just too hard to see differences in a three dimensions on a two dimensional screen. Maybe when we’re using augmented reality to visualize graphs we’ll be able to make sense of 3D graphs. Until then, we have to lose another dimension worth of information.

Two, what’s the point?? We can see a cloud of QB seasons, which is cool for like 2 seconds, but can it help us at all?

Step 4: Actually extracting meaningful information

Now that we’ve plotted these points, we can group these QBs together into categories. Instead of making up categories and labeling them by hand, we can just cheat and use clustering algorithms to do it for us. I’ll use the most famous one – KMeans clustering. I also tried DBSCAN but it didn’t turn out well.

With KMeans clustering, you specify the number of clusters you want, and then the algorithm tries to find optimal groupings based on the given number of clusters. Obviously, I’m not giving much mathematical detail, and that’s on purpose. There are pros and cons to every clustering algorithm, I just liked how this one turned out with six clusters.

Okay, c’mon, this is cool. In the bottom right sea blue category, we have a grouping of not-super-mobile, really efficient, hall-of-fame level QB’s. I wonder why they’re so far away from Tim Tebow 🤔. I also would guess their completion percentage is generally higher and their aDOT lower. By the way, it’s a good sign that the same player over multiple seasons is generally in the same area. Peyton Manning apparently was the exact same QB for a long time. In the top right, we have more mobile, explosive, yet still efficient QBs. I think the yellow in the middle are probably the type of QBs you draft late in fantasy that are consistent year to year. Matt Stafford, Phillip Rivers, etc. As you go negative on the x-axis, you get worse and worse passing efficiency. As you go negative on the y-axis, you get less mobility/explosiveness (I think). Purple = check down machines, turquoise = mobile/explosive but not efficient passers.

To reiterate, this is just my interpretation of the principal components. Things like physical height and YAC explosiveness are being blended, so who knows what’s exactly happening. One of the things that I like about PCA and clustering is how it creates unique comparisons. I never would’ve thought of a Josh Allen/Tim Tebow comparison, but it makes sense.

We can analyze the movement of each QB on a season to season basis. QB’s that move teams, change offensive coordinators, or get injured will all move on this graph. And that’s just quarterbacks! If this were a full time job, I’d probably analyze a lot of these. Since it’s not, I’ll show just one example. Here’s a challenge: can you spot when exactly the Rams transitioned from Jeff Fisher to Sean McVay?

Other young notables marked for reference. Was 2017 an outlier for Carson Wentz? Is Mitch Trubisky being slept on because of his bad accuracy?
Other young notables marked for reference. Was 2017 an outlier for Carson Wentz? Is Mitch Trubisky being slept on because of his bad accuracy?

(For those that don’t follow football, Jeff Fisher was notoriously conservative/traditional in 2016, and in 2017 Sean McVay unlocked Goff and the Rams offense).

Following this idea, why not make an animation? I got this idea/code inspiration from Cory Jez’s sports analytics repo thanks to Ben Baldwin writing an R tutorial for nflscrapR.

It seems like every time I run a new one of these I learn something new, or they open up an insight that I haven’t thought of before. In this case, Tom Brady and Drew Brees unsurprisingly were very consistent year to year. Also unsurprisingly, Eli Manning has probably shown his ceiling. However, I was surprised that Aaron Rodgers hasn’t been very efficient for the past 4 years! I think that’s covered up by how high of a PC2 he has, and most of the blame has never been on him. Lastly, Ryan Fitzpatrick’s jump in 2018 is truly astounding.

Wide Receivers

So this one I couldn’t figure out right away. Ultimately I figured out that the x-axis is target efficiency and the y-axis is something like how dangerous the targets are. There’s not an obvious axis for target volume, and that’s where a third dimension would come in handy. Notable slot receivers/short target guys stick out well in the bottom right, navy blue cluster. Opposite of them, toward the center top, you have a purple deep threat cluster. I was kind of surprised that receivers like Antonio Brown, DeAndre Hopkins, Julio Jones didn’t completely pop out more. It turns out the receivers drafted high in fantasy football are more to the top right of the graph. In addition, I thought it was weird that I saw 2016 Julio Jones and not 2015 Julio Jones. In 2015 Julio had an all-time year! Then I looked a little closer, and it’s because in 2016 Julio had similar numbers on 2 less games and 50 less targets (also, it turns out 2015 Julio is nearby, I checked). So it seems more efficient receivers definitely stick out! Or in the case of Kelvin Benjamin in 2018, on the left end of the graph, very inefficient receivers also stick out. That also explains 2018 Tyler Lockett at somewhere around 6 on the x-axis. It’s almost as if the Seahawks should’ve thrown to him more. With all this information, why not apply it to one of my favorite past-times, fantasy football?

Above I graphed the fantasy point distribution of each cluster. Yellow, top right receivers have the highest average points scored. Purple deep-threat receivers don’t average as much, but they are capable of the "boom" games just like the yellow cluster. Slot/short target receivers are very similar to league-average receivers, but are slightly less "explosive" by my definition. The two green groups are both very inefficient, and don’t score many fantasy points, but at least one half of them (sea-green cluster) get decent target quality.

Running Backs

The running backs might be the most interesting viz yet. From left to right, you get stronger and stronger rushing seasons. The RB studs are in the top right. To me, the intriguing part of the graph is the bottom right sea green cluster. There are only a handful of examples of running backs being very efficient rushers (around 6 yards per carry) but not a receiving threat at all. Gus Edwards, Mike Gillislee, and Chris Ivory all ran extremely well but didn’t catch passes at all. There are probably few examples of such backs because defenses (should) know to stack the box when those running backs are in the game. There’s only one example of the opposite type of running back in my dataset, one that has extremely high receiving efficiency but no rushing efficiency: LaRod Stephens-Howling. Maybe he should have moved to slot receiver?

Thunder and Lightning

I lead this article discussing Tiki Barber and Ron Dayne, and so I feel like I should try and plot their best combined season in 2001. I did my best to fill in statistics that I don’t have (my dataset only goes back to 2009):

Surprisingly, Ron Dayne was efficient at catching the ball that year over a small sample size. As time went on, Ron Dayne trended toward league average and Tiki Barber turned into a monster.

Lastly, here is the code I used for the article.


Related Articles