Basketball GM is a single-player basketball management simulation game. Set your roster, make trades, draft prospects, manage your finances, and try to build a dynasty. Play it in your browser now, completely 100% free!
I’m going to deal with a very important question today. Which NBA players sacrificed the most points by taking shots with their foot on the three point line? This may seem like a silly question, but given the well-documented difficulty of assessing whether a player’s foot was on the line or not, I think it deserves a serious analysis.
Imagine if we had a database containing all the shots taken in the NBA, along with the exact position on the floor each shot was taken. Then, with some minor assumptions about shoe size, we could figure out which shots were taken with a foot on the three point line. Sadly, we don’t have that data. But we have something pretty close!
There’s this cool repo on GitHub called nba-shots-db that connects to an API on nba.com and downloads a bunch of shot data to your computer, where you can play around with it. It’s not quite the ideal data I described above, but it’s pretty sweet. It doesn’t give the exact location of a shot, but it does say the distance and whether it’s a two-pointer or a three-pointer.
But distance and point value alone are not good enough to see if a foot is on the line, because the three point line is not a constant distance from the hoop. It’s shorter in the corners. So a 21.5 foot two-pointer could be a mundane mid range jumper at the top of the key, or it could be an extremely exciting shot from the corner with a foot on the line.
Fortunately, there is another field in the database that tells you the “zone” that a shot was taken in. Basically, we can identify the zones in this shot chart:
That gets us a pretty good estimate of how far away a two-pointer needs to be to have been taken with a foot on the line, although it’s still not perfect because the three point distance varies in the baseline zones.
So here’s what I came up with. For shots on the baseline zones, any two-pointer beyond 22 feet was probably taken with a foot on the line, since that is the same distance as the absolute shortest three pointer in the corner. And for the rest, where the three point line is 23.75 feet away, any two-pointer beyond 23 feet was probably taken with a foot on the line.
One other data issue… since the data goes back to the 1996-97 season, when the three point line was shorter than it is today. I could handle that as a special case, but fuck it, I’m only going to look at years with the current three point line distance.
I wound up with this big ol’ SQL query to give me the information I want from the shot database:
SELECT players.id AS pid, players.display_name AS name, shots.season, shots.team_id AS team, SUM(CASE WHEN shots.shot_type = '2PT Field Goal' THEN 1 else 0 END) as fol, SUM(CASE WHEN shots.shot_type = '3PT Field Goal' THEN 1 else 0 END) as tpa FROM shots LEFT JOIN players ON shots.player_nba_id = players.nba_id WHERE -- Ignore season where the 3 point line was shorter shots.season NOT IN ('1996-97', '1997-98') AND -- Ignore heaves shots.shot_distance <= 25 AND ( -- 3 pointers shots.shot_zone_basic IN ('"Right Corner 3', 'Above the Break 3', 'Left Corner 3') OR ( shots.shot_zone_basic = 'Mid-Range' AND ( -- Foot on line in corner (shots.shot_distance >= 22 AND shots.shot_zone_area IN ('Left Side(L)', 'Right Side(R)')) OR -- Foot on line elsewhere (shots.shot_distance >= 23 AND shots.shot_zone_area IN ('Center(C)', 'Right Side Center(RC)', 'Left Side Center(LC)')) ) ) ) GROUP BY players.id, players.display_name, shots.season, shots.team_id
From the output of this SQL query, I can see the number of three-pointers and the number of shots taken with a foot on the line for every player in every season.
First, to give you an idea of what this data looks like leaguewide, here are the total number of three point attempts and the number of shots with a foot on the line for every season since 1998-99:
You can see the upward trend for three point attempts in recent years (except the lockout year in 2011-12), but shots with a foot on the line are not increasing with them. If anything, there may be a bit of a downward trend. I would have thought that these two numbers would be correlated, but with the increased realization that long two pointers are usually bad shots, maybe NBA players are getting even better at making sure they are behind the line.
Next, let’s look at it team by team:
When all seasons are combined, Utah and Portland seem to be the worst. Looking season by season, most teams don’t have a lot of consistency. That makes sense because players change teams so often, although you could imagine coaching having an effect here.
Utah often looks bad, for example in 2013-14. Portland too, especially from 1999-00 to 2001-02 where they were dragged down by careless foot-placers like Damon Stoudamire, Bonzi Wells, Arvydas Sabonis, and Shawn Kemp. But Portalnd has been more middle of the pack since then.
The Harden-era Rockets are consistently in the good quadrant, taking tons of three-pointers but not many shots with a foot on the line. Especially the past three seasons, they’ve clearly been the best in the league. This could be related to Moreyball’s focus on the three and analytics in general. It could also be because the Rockets were one of the earliest teams to start taking a significant number of threes from well beyond the line, where there is absolutely no risk of a stray toe costing you a point.
And finally, let’s look at individual player data:
Among the positive outliers, you see guys like James Harden and Antoine Walker, who take many shots from well beyond the three point line. You also see guys like Shane Battier and Danny Green, who are spot up specialists and are often waiting with their feet carefully placed before they get the ball.
The negative outliers have some different characteristics. Some are bigs who may have been pulled a bit more towards the basket than other shooters, like Mehmet Okur and Arvydas Sabonis. Others are players who were known both for doing a lot of shot creation and (to some extent) inefficient scoring, like Corey Maggette, Damon Stoudamire, and (don’t hate me) Kobe Bryant. Those players might not always have had the luxury of being able to precisely set their feet before shooting, and they also might not have been quite as concerned with losing a point as someone being constantly berated by Daryl Morey’s analytics staff.
Looking specifically at the Rockets, the difference between Tracy McGrady and James Harden really seems indicative of their evolving style of play. As Rockets, McGrady took only 1/3 as many threes as Harden has so far, but he took 5 times as many shots with his foot on the line. Clearly, Giannis would not have won the MVP this season if the voters had this critical information at their disposal. I regret not doing this earlier.
(The plots in this article were made with D3. View the source of this page to see the code, it’s not minified.)