Touching BasesFebruary 11, 2010
Shot Location Visualizations
By Jeremy Greenhouse

There's been an influx of publicly-available NBA data over the last few years. While there's no data with the detail of pitchf/x or databases with the sophistication of FanGraphs that analysts can get their hands on for basketball, there have been gradual improvements. My favorite type of basketball data to look at is shot location data, which is why I regularly visit HoopData. On Saturday, I came across the last few years of raw shot location data on BasketballGeek. I'm far from an expert in APBRmetrics, and I don't know whether the basketball blog-dome has its own Dave Allen, but I felt like it might be fun to produce some visualizations using this data. Eli Witus has previously charted this data in several ways, so I'm going to be reproducing some of his work. Click on images for a larger view.


shotlocation.jpg

Each point represents one square foot and the goal is located 5.25 feet from the baseline and 25 feet from the sideline.

The most efficient shots are those at the rim or those from three. The least efficient are ten-foot jumpers it would seem. None of this data includes free throws or offensive rebounding, so the only inputs are missed shots, made two-point shots, and made three-point shots. Witus' chart on offensive rebounding suggests that mid-range jumpers, in addition to being low-percentage shots, yield the lowest rate of second-chance points.

Something I find interesting in the shot location frequency chart is that there are equally-spaced patches along the three-point arc as well as the 17-foot arc where players like to shoot, which I call the corner, the wing, and the middle. I understand a lot of this has to do with floor spacing, and the corner three has such a high frequency since it is 1.75 feet closer to the basket than threes along the arc, nevertheless I feel like players are predisposed to wanting to take shots from normal angles (0, 45, 90 degrees). Maybe it's just me.

I also made splits of the above graphs. Home vs. away. 1st, 2nd, 3rd, and 4th quarters. The first minute of a quarter vs. the final two minutes of the fourth or overtime.

I chose to only include points where significant amount of shots have occurred, and therefore didn't need to use any smoothing. The charts are plenty smooth already. But I did smooth out and pretty up the chart I made for field goal percentage.

FG%25.jpg

I also thought it might be nice to break down this data on the team and player level. The first team I considered was of course everybody's favorite statistically-oriented team, the Houston Rockets. You may recall that, nearly a year ago to the day, Daryl Morey penned a self-aggrandizing self-profile in the New York Times titled "Moreyball."* In it, Morey wrote

"The 3-point shot from the corner is the single most efficient shot in the N.B.A. One way the Rockets can tell if their opponents have taken to analyzing basketball in similar ways as they do is their attitude to the corner 3: the smart teams take a lot of them and seek to prevent their opponents from taking them."

The Chicago Bulls are not what you would call one of the smart teams, if this statement is taken at face value. According to HoopData, The Bulls lead the league in long twos attempted, but are last in threes attempted. That makes no sense. I've plotted each point where the Rockets and Bulls have attempted at least ten shots since 2006 along with the points per shot.

HouChiShotLocations.jpg

You can see that the Bulls have a much fuller area where they shoot long twos—those shots from 15 feet out to the three-point line. The Rockets area outside the arc contains a higher number of points. Also, the Rockets paint area is green, representing 0.8-1.2 points per shot by the scale, while the Bulls paint area is blue, good for 0.6-1.0 points per shot by that scale.

*I wouldn't be Daryl Morey first of all. I wouldn't write the story "Moreyball." I understand that when you write a profile, you want to be the hero. That is apparently what Morey has done. But it's not going to make him popular with the other GMs or the other people in basketball.

Now I didn't actually read the piece, as why would I want to read a story about a computer that gives computer numbers? After all, how do you think we got Madoff? But if Morey is so smart, then why hasn’t he won a championship? Statistics don’t tell the whole story, especially with players like Shane Battier. I mean, if Morey thinks Shane Battier is so good, then how come he only scores six points a game? The Rockets have only made the playoffs because 75% of basketball is play from the center and Houston lucked out by drafting Yao Ming.

Finally, I wanted to look at individual players. Since players have taken at most 5,000 shots or so over the last few years, I decided to smooth out their heat maps. I also added contour lines showing where players like to shoot. Here's a look at the consensus two best players in the game:

LeBronKobeShotLocation.jpg

They have similar shot location distributions. Both shoot from anywhere on the floor, but are especially drawn to the three point shot from either wing. Kobe also likes to step in from the right wing and pull up from the free throw line extended. LeBron takes a higher rate of shots at the rim.

As for their success when shooting, Bryant would appear to trump James by color alone. Note that the color scales are different, but even so, Kobe has a better mid-range game than LeBron. LeBron has blue patches where he earns less than 0.6 points per shot, while Kobe has no points from reasonable shooting locations on the floor where he shoots that poorly. Thing is, there's that tiny little area right underneath the rim that accounts for over a third of James' shots, and he's the best player in the league when shooting from the restricted area. The color scale for LeBron extends up to 1.9 points, while it only goes up to 1.6 for Kobe, and those figures represent how effective each player is when shooting from spots in close proximity to the rim.

I made these graphs for several other players I was interested in, which you can view by clicking on the player names. Dwyane Wade, Tim Duncan, Kevin Garnett, Kevin Durant, Chris Bosh, Carmelo Anthony, Dirk Nowitzki, Paul Pierce, Steve Nash, Rashard Lewis, and Joe Johnson.

Comments

Excellent use of Joe Morgan.

Very nice visualizations. What technique(s) do you use to generate those contour lines in the player graphs? It's some really neat stuff I've never seen before.

Wish I had known about this data before! I recently wrote in article in JQAS (http://www.bepress.com/jqas/vol6/iss1/) analyzing shooting and scoring abilities with only 1D play-by-play data. I can't believe this site ended up enlightening me on the subject. Great work!

Excellent work, Jeremy. I look forward to seeing where you go from here. I don't think anyone has done much with such visualizations since Eli got hired.

Do you post over at APBRmetrics at all?

FYI:

For some reason, your RSS is broken.

The RSS feed is working fine. You can click on the RSS link under Lineup Card in the upper end of the sidebar.

I thought this was BASEball analysts... But...

This is still really cool. :)

Ryan, first of all thanks for the data. I used R for the graphs, and a local regression to predict points per shot for the player heat maps and a kernel density estimation to predict shot location for the contours. Feel free to drop me a line if you have any questions.

DSMok1, I really don't have any cred in APBRmetrics. I'm not sure if I even plan on expanding on this research. I just thought I could contribute since I've learned some R code, but I'm probably not going to pursue this much further.

Could you hotlink a chart for Pau Gasol? Also, if you have time for Lamar Odom? Ron Artest? Or even Derek Fisher? Jordan Farmar? I'd appreciate it.

Here you go, kept. It works much better for shooters like Fisher and Artest than for big men like Odom and Gasol.

http://farm3.static.flickr.com/2773/4359942299_289537ffe4_o.jpg

I guess my question is, if Darryl Morey ISN'T a genius, then how the does a starting five of

Aaron Brooks
Trevor Ariza
Shane Battier
Luis Scola
Chuck Hayes

even SNIFF the playoffs? I mean, 75% of basketball play is from the Center and their Center is Chuck Hayes. Either Morey is ridiculously lucky in keeping Hayes around or he built a very good team. Are any of their starters generally considered among the Top 25 in the league? A lot of their guys are vastly underrated by in the general talk-o-sphere, it seems.

by the way, this is really awesome. Nowitski's is amazing. It appears Bosh is a perfect fit for Chicago (which saddens me).

I was just going to ask for the other Lakers, but someone got to it first, and Jeremy already responded.

Keep up the good work, man, this is some really really good stuff. Looks like I really need work on my R, heh.