NBA Standings, Visualized Over Time

You can now find the latest NBA standings on Vorped.  But big deal right?  You can get the same info on hundreds of sites.

In addition to your basic tabular-and-sorted-by-best-team standings, I tried to put my own spin on it.  So I created an interactive chart plotting each team’s win/loss record or win percentage over the course of the season.  It’s just a run-of-the-mill line graph, or time-series graph, but I hope that the interactive elements make this a little more useful than what’s currently been done.

Some features:

  • Split the line graph into multiple line graphs, broken out by conference or division.  This creates a small multiples graphs, sometimes also known as panel or Trellis graphs, allowing you to compare subsets of teams by their logical conference/divisional affiliations.

  • Change the time component from games played to date played.  Not all teams play the same number of games at each point during the season.  This feature lets you control that, so for example you can find teams with high winning percentages that haven’t played many games (“paper tigers”).
  • Hover over a line to show the associated team.  Or, click on the line to keep the team line highlighted.  Showing all team names on each graph made the visualization too chaotic.  By taking the labels off the lines, I lost some clarity in the graph, but also I found myself exploring the teams that I would normally skim over in a standings table, like the Bucks or the Bobcats, but who have had interesting journeys that I would have not otherwise have seen.  And for your mobile/tablet folks, clicking on lines gives similar functionality to hovering over lines.

The visualization isn’t as clean as I first envisioned, but I still believe it provides some additional insight I had never gotten before.  My favorite feature is the breakout on divisions, where I learned the Warriors are right on the heels of the Clippers for first in the Pacific.  Really?  Who knew?!

My second favorite feature is to toggle the time dimension between date played and games played.  Date played looks like chaos, while changing to games played seemingly creates order out of it.

Please let me know what you think, and if this presentation can be done better, (and oh yes, it definitely can be).

NBA Standings – Table and TIme Series Visualization

Chaos:

Order:

 

 

Where Should Royce White Play? A Look at Travel Statistics For Each NBA Team

Royce White has anxiety issues.  Being a professional athlete with anxiety issues can’t be any better.  And yet nevertheless, it’s encouraging to see Royce White actively trying to manage his disorder, flying less and driving more for away games whenever possible.

With the Houston-Royce White relationship deteriorating over the past week, I began wondering what team would be best suited to White’s ability to manage his anxiety.  While understanding that anxiety disorders are complex things, I looked at each NBA team’s 2012-2013 schedules to see if certain teams had more convenient travel schedules.

Royce White has anxiety issues.  Being a professional athlete with anxiety issues can’t be any better.  And yet nevertheless, it’s encouraging to see Royce White actively trying to manage his disorder, flying less and driving more for away games whenever possible.

With the Houston-Royce White relationship deteriorating over the past week, I began wondering what team would be best suited to White’s ability to manage his anxiety.  While understanding that anxiety disorders are complex things, I looked at each NBA team’s 2012-2013 schedules to see if certain teams had more convenient travel schedules.

Total Distance Traveled

The most logical first step is to see which teams travel the most miles.  Using the Haversine function and the latitude/longitude of each team’s arena, I calculated the total straight-line (or, if you’re thinking spherically, curved) distance a team travels between each of their 82 games, disregarding minor quibbles like the All-Star break.

Here’s the interactive visualization for 2012-2013 regular season travel statistics for each NBA team.

Based on total distance traveled, Houston ranks somewhere in the middle of the pack… not great, but not Portland, either.

Total Distance Flown, with driving taken into account

Now let’s consider that the Houston Rockets have agreed to have White bus to certain games.  Here I made assumptions about which game-to-game legs are bus-able:

  1. If there’s only 1 day between games and the distance is less than 300 miles
  2. If there are 2 or more days between games, and the distance is less than 600 miles.

Under those assumptions, I subtracted out those road trip distances (or in this case, “air” trips) from the total distance.  In this new calculation, Houston didn’t fare as well, ranking 24th in total flying distance traveled.

And when you counted how many of those trips could be done by bus, Houston had the 5th fewest such trips on their schedule.

Part of this is geography (note the other Texas-based teams in the graphic), and part of this comes from the scheduling gods that allow odd road trips like Dallas-Indiana-Minnesota-Charlotte (1/16 to 1/21 for Houston) to occur.

Teams with the best travel schedules

If Royce White could pick any team to play for, and his only criteria was travel distance,he should play for a Midwest team.

,

The Cleveland Cavaliers have the best flying-only travel schedule in the league, traveling only 25,000 miles compared to Houston’s 40,000.  Being centrally located among the Eastern teams helps tremendously.  It’s also helped the Pistons, Pacers, and Raptors, who lie somewhere in the middle of the cluster of Eastern teams in that part of North America.

Of course, we learned with LeBron James that there exists more than 1 criteria when considering to play in Cleveland, so take this with a grain of salt.

But regarding Royce White’s special circumstance, it doesn’t seem far-fetched to think of these teams as potential trade candidates.  Those teams wouldn’t mind getting a little more talent in the frontcourt, either.

Feel free to quibble with my methodologies, as they can totally be improved upon.

US Cup of Basketball: Which State Would Win?

The Olympics are less than a month away, which means we’re also less than a month away from another USA Basketball beatdown on the rest of the world. It’s not a fair contest, given that a) we have all the best players in the world and b) the rest of the world doesn’t play basketball nearly as much as the U.S does.

But while watching the Euro 2012 soccer/futbol tournament, I noticed that the United Kingdom countries (England, Wales, Scotland, and Northern Ireland) fielded separate teams.  This was quite odd, given that they compete in the Olympics together as Great Britain.

This led me to another thought: what if we did the same for basketball, and broke the United States team down into 50 teams based on state?  Which state would win then?

Picking Teams

Curious, I started looking up where the top 200 current NBA players went to high school, and found the state in which the high school was located (college isn’t a great option, since a) we have the NCAA tournament for that b) players can choose to leave their home state c) not all players went to college).  Luckily we have Wikipedia and Basketball Reference, so the process was straightforward.

In a few edge cases, I deviated from Basketball Reference.  For example, players like Kevin Garnett played at multiple high schools.  But instead of choosing the final high school they played at, I chose the high school that I felt most represented where they grew up. Since Garnett spent three years at South Carolina high school and only one in Chicago, I placed him in South Carolina.

I also completely disregarded Oak Hill Academy, since that high school alone could field an all-star team.

A few of these teams ended up hilariously imbalanced with regard to position.  Some teams have 4 point guards, some have 4 undersized power forwards, and one team has about 77 small forwards (or at least it feels like it).

In the end, I assembled 20 teams from 20 states that could field at least a 5-man team.  But in deference to the American tradition of a 16-team playoff, I cut four teams.  These teams weren’t bad, they just didn’t have enough players to fill a bench beyond their starting five.

Last Four Out

Alabama

Starters: Eric Bledsoe, Jamario Moon, Gerald Wallace, DeMarcus Cousins, Ben Wallace
Bench: None

Arkansas

Starters: Derek Fisher, Joe Johnson, Ronnie Brewer, Jeremy Evans, James Anderson
Bench: None

Wisconsin

Starters: Devin Harris, Wes Matthews, Caron Butler, Steve Novak, Greg Stiemsma
Bench: None

Oklahoma

Starters: Kelenna Azubuike, Xavier Henry, Blake Griffin, Ekpe Udoh, Shelden Williams
Bench: None

Alabama has a well-balanced starting five, and would probably compete with any of the 16 chosen teams.  Arkansas and Oklahoma are essentially one-man teams, with Joe Johnson and Blake Griffin shouldering most of the scoring load.  Wisconsin is a collection of quality role players, but unfortunately wouldn’t match up well with the rest of the teams.

Teams in the 16-team tournament

Let’s now look at the teams that did make it into the tournament, listed in alphabetical order:

California

Starters: Russell Westbrook, Arron Afflalo, Paul Pierce, James Harden, Tyson Chandler

Bench: Brandon Jennings, Jrue Holliday, Tayshaun Prince, Jeremy Lin, Jason Kidd, Brook Lopez, Paul George, Trevor Ariza, Nick Young, and 11 other players (!)

The first state on the list also happens to be the state with the most active NBA players.  I counted 25 candidates for the California team, and I’m pretty sure I still missed some players.  The next most populous team had 14 players, meaning California could field two full teams while the other states struggle to fill one 12-man team, let alone fill a starting five.

What’s funny is that the vast majority of these players are small forwards.  California wingmen apparently come in two flavors: long, athletic wingmen that can get to the rim (DeMar DeRozan, Trevor Ariza, Paul George, Amir Johnson) or big time three point shooters (Jared Dudley, Klay Thompson, Dorell Wright, Ryan Anderson, Nick Young).

Though California has the most players to choose from, they don’t have a very balanced team, having very few big men to choose from.

Florida

Starters: Brandon Knight, Steve Blake, Vince Carter, Udonis Haslem, Amare Stoudemire

Bench: Raja Bell, Chandler Parsons, Larry Sanders, Marreese Speights, James Jones, Reggie Evans

Florida has a well-rounded team, but unfortunately doesn’t have any superstar players in the prime.  Stoudemire and Carter are past their primes, and we’re still not sure what Brandon Knight will become once he reaches his prime.  The Floridians do have a quality, diverse bench that can do anything on the basketball floor, just not at an elite level.

Georgia

Starters: Marshon Brooks, Louis Williams, Jodie Meeks, Josh Smith, Dwight Howard

Bench: Kwame Brown, Derrick Favors, JJ Hickson

A team with a lot of beef and talent up front, Georgia will cause lots of problems for many teams.  Josh Smith and Dwight Howard are as formidable a 4-5 combo around, and they’re backed by three big men that might have more potential than skill at this point in their career.  Unfortunately, they don’t have a point guard to organize and distribute touches, which could lead to chemistry problems when you have Lou Williams, Howard, and Josh Smith on the floor sharing the scoring load.

Illinois

Starters: Derrick Rose, Dwyane Wade, Andre Iguodala, Corey Maggette, Tony Allen

Bench: Iman Shumpert, Evan Turner, Anthony Parker, Shannon Brown, Nazr Mohammed

Unquestionably, Illinois has the best backcourt in the tournament.  Seriously, Rose and Wade in the same backcourt, with Iguodala on the wing?  Teams will probably play zone, or at least have a tendency to collapse down toward the rim, forcing their teammates to shoot threes.  In that case, Evan Turner and Shannon Brown can play effective roles.  Nazr Mohammend might have to start for size, even though Maggette and Tony Allen might be more effective players.  Similar to the current US Olympic team, this team will have to outgun opponents to make up for their lack of size.

Indiana

Starters: Eric Gordon, Mike Conley, Gordon Hayward, Carl Landry, Zach Randolph

Bench: Jeff Teague, Courtney Lee, George Hill, Josh McRoberts, Greg Oden, Jared Jeffries

Indiana might have one of the more fun teams to watch, with dynamic guards Gordon and Conley causing havoc on the perimeter, Landry and Randolph grinding down low, and Gordon Hayward filling in the gaps as he does in Utah.  The Hoosier state also has quality depth on the bench, with great energy guys, and a former #1 draft pick that could be a game changer if he could stay healthy.

Louisiana

Starters: Chris Duhon, Marcus Thornton, Danny Granger, Paul Millsap, Greg Monroe

Bench: Glen Davis, Brandon Bass, Tyrus Thomas, D.J. Augustin

Something must be in the water in Louisiana, because for some reason, this state produces a disproportionate number of undersized big men.  If Carl Landry grew up in Louisiana, it would be perfect.  Regardless, you can’t help but love Millsap, Big Baby, and Brandon Bass all being on the same team.  The Pelicans have a nice inside-outside combo with Granger and Monroe, but might lack the depth in the backcourt to make some noise.

Maryland

Starters: Ty Lawson, Kevin Durant, Carmelo Anthony, Rudy Gay, Roy Hibbert

Bench: Delonte West, Jeff Green, Gary Neal, Greivis Vasquez

If Illinois has the best backcourt in the tournament, Maryland definitely has the best collection of wing players.  Defenses will be spread very thin with Durant, Melo, and Rudy all on the floor together, with Hibbert mixing it up in the paint.  With Ty Lawson pushing the pace, this could be a very dangerous team.  Maryland has quality on the bench, but no big men, meaning they would have to rely heavily on Hibbert.

Michigan

Starters: Jordan Crawford, Jason Richardson, Shane Battier, Al Horford, Chris Kaman

Bench: Wilson Chandler, Javale McGee, Willie Green

This has to be my favorite state flag.  Michigan has a nice balanced starting five, and a quality 4-5 combo in Horford and Kaman.  Javale McGee and Wilson Chandler are ideal sparks off the bench.  Michigan also doesn’t have a true point guard, so bringing the ball up court could be an adventure.

New Jersey

Starters: Kyrie Irving, Randy Foye, Luol Deng, Joakim Noah, Andrew Bynum

Bench: Al Harrington, J.R. Smith, Jason Thompson, Samuel Dalembert, Troy Murphy, Markieff Morris, Marcus Morris, Kenneth Faried

Of all the teams, New Jersey might have the most well-balanced and talented starting five in the tournament.  Besides Foye, you could argue that the starting five could be seen playing together in an All-Star game.  New Jersey also has a great mix of offensive and defensive skills, with Noah’s hustle complementing Bynum’s post skills, and Foye’s shooting complementing Irving’s penetration skills and Deng’s wing game.

New Jersey’s bench will cause teams big problems, and by big, I mean lots of tall, effective role players.  The bench also has great energy guys like Faried and J.R. Smith that could change the pace of a game in the second and fourth quarters.

Their biggest Achilles heel will be their lack of a backup point guard, which will force them to rely on Irving for large stretches of the game.  But considering that some teams don’t even have a point guard, this is a minor quibble.

New York

Starters: Kemba Walker, Ben Gordon, Danny Green, Metta World Peace, Elton Brand

Bench: Jimmer Fredette, Jonny Flynn, Lance Stephenson, Sebastian Telfair

A small starting backcourt, with a small backup backcourt and an aging front court will likely result in a first-round exit for New York.  This would be a disappointing result for the so-called basketball mecca of the world.

North Carolina

Starters: Chris Paul, Stephen Curry, John Wall, Antawn Jamison, David West

Bench: Anthony Morrow, Tracy McGrady, Brendan Haywood, Eric Maynor, Jordan Hill

They grow a lot of point guards in North Carolina.  Unfortunately for Stephen Curry, he can’t get away from playing in an undersized backcourt.  But looking past the height issues of this team, having Chris Paul, Curry, and John Wall on the floor could be an effective mix of skills, with Paul’s passing skills, Curry’s shooting, and Wall’s penetration all complementing each other.  Unfortunately, you can’t overlook the size deficiencies, which plague this team both in the backcourt and in the front court.

Ohio

Starters: Norris Cole, Kevin Martin, Daequan Cook, Lebron James, Kosta Koufos

Bench: Michael Redd, Bill Walker, Byron Mullens

I initially excluded Ohio from the tournament, but let’s be real, you can’t have a tournament without Lebron.  Without King James, this team is only slightly better than the 2011-2012 Charlotte Bobcats.  But with Lebron and a bunch of competent shooters around him, you never know what Ohio could accomplish.

Pennsylvania

Starters: Kyle Lowry, Tyreke Evans, Richard Hamilton, Kobe Bryant, DeJuan Blair

Bench: Gerald Henderson, Jameer Nelson, John Salmons, Rasual Butler, Matt Carroll

The Pennsylvania team probably won’t have trouble scoring, but they will have problems defending big men.  You always have a chance with Kobe on your team, and Tyreke Evans and Kyle Lowry will contribute from the backcourt, but DeJuan Blair is their only big man, and let’s not forget, he has no ACLs.

South Carolina

Starters: Raymond Felton, Ramon Sessions, Ray Allen, Trevor Booker, Kevin Garnett

Bench: None

The only 5-man unit in the tournament, I had to keep this team in, just to see Ray Allen and Kevin Garnett on the same team again.  Ray Felton and Ramon Sessions are quality backcourt mates, and Trevor Booker would do well playing off Garnett.  But the lack of a bench is an obvious problem.

Texas

Starters: Deron Williams, Stephen Jackson, Rashard Lewis, Chris Bosh, Lamarcus Aldridge

Bench: Emeka Okafor, DeAndre Jordan, Kendrick Perkins, Daniel Gibson, Gerald Green, Damion Jones, Cartier Martin

I like to call this team “Team Underappreciated”.  The players on this team don’t get the hype that other superstars get, but make no mistake, Texas has a quality Big Three.  Deron Williams is one of the best point guards in the NBA, and the 4-5 combo of Bosh and Aldridge are a great fit with Bosh’s midrange game and Aldridge’s post game.  Texas also has a lot of length on the wings and a lot of size on the bench.  This could be a very good defensive team, and could be a darkhorse candidate to win it all.

Washington

Starters: Rodney Stuckey, Jason Terry, Jamal Crawford, Marvin Williams, Spencer Hawes

Bench: Luke Ridnour, Isaiah Thomas, Martell Webster, Nate Robinson, Brandon Roy, Brian Scalabrine, Aaron Brooks, Jon Brockman

Our last team on the list might not have any All-Star caliber players, but they do have a whole lot of depth.  Unfortunately, half the team plays point guard, and all of those point guards are undersized.  If only Washington and Louisiana could trade point guards for power forwards.  Nevertheless, Washington has a lot of players that can fill the basket, but like a few other teams, size is a big issue.  Athleticism could be another major issue, with no dominant wingmen on the team (sorry, Brandon Roy).  You could argue that the five-man Alabama team is better, but Washington’s depth and scoring punch makes them a more interesting team in my eyes.  Plus, someone has to give Washington love after losing the Sonics.

Who’s the best team?

Of these 16 teams, which state would have the best team?  Let me know what you think below.

Updated Player Shot Charts: 2011-2012 Season Reports, Export to Image, and More

I’ve made a bunch of new updates to the player shot chart pages, aimed at improving page load speed and general usefulness to all of you.

Player Shot Chart Reports by Season

The first improvement is the introduction of player shot charts for the entire 2010-2011 and 2011-2012 seasons.  For the 2011-2012 season, I have broken out individual shot charts for the preseason, regular season, and postseason.  So you now have a holistic view of a player’s shot distribution over the course of an entire season.

The default view shows a player’s shot chart from the prior 30 days.  Given that it’s currently the offseason, this would show shots from the 30 days prior to the end of the NBA postseason, but during the season, it would be updated every day.

Exportable Shot Charts

The next improvement allows you to export shot chart visualizations to your desktop, either in SVG format or PNG format.  This will allow you to save any interesting findings you may have discovered, and share that visualization on your own blog, on a forum, or whatever medium you choose.  Obviously, I’d prefer you give attribution back to vorped.com.

You have two choices in export format: SVG and PNG.  SVG, or scalable vector graphics, is the preferred option because of its ability to maintain clarity when the image is expanded or contracted.  But SVG has its downsides, since not all programs can render it properly (it’s technically an XML file).

Your second choice, PNG, is your conventional pixel-based image option.  I do want to caution that the library I’m using to convert the shot chart visualization (which is created via SVG) into PNG is a little wonky.  It looks really crappy in Google Chrome, a little better in Firefox, and pretty good in Safari.  Your mileage may vary, depending on your browser.

Social sharing

Another way you can distribute your shot charts is through social media.  I’ve included three buttons below the shot chart, for the three major social networks (Facebook, Twitter, and Google Plus).

Updated styling for the major browsers

Finally, I made some visual styling changes across the site.  I have to apologize to those using Firefox and Internet Explorer, because I have absolutely ignored those browsers during my development (I use Google Chrome).  Regardless of your browser, you should see more consistent styling and colors across the site.

One more note to users with Internet Explorer 8 or below: unfortunately this site is completely dependent on the SVG format, which can only be used on Internet Explorer browsers of version 9 or above.  I understand that not everyone has a computer or phone that can install those versions, but if you have the ability to upgrade to a modern browser, please do it!  Luckily we have choices when it comes to browsers.

If you happen to find any bugs, have any suggestions, or want to otherwise contact me, please let me know at my Twitter page @vorped.

Assisted-On Three Pointers By Zone and By Player

Partially inspired by Ken Pomeroy’s blog post on assisted-on shots, I wanted to use my shot chart/play-by-play dataset and look at the occurrence of assists on three pointers, and see if I could find any interesting nuggets around this topic.

To my surprise, I found that the vast majority of three pointers occur directly as a result of an assist.  Of the dataset I analyzed, 83.7% of all three pointers were assisted-on.  If this is common knowledge, then I must have been out of the loop.

When you break this down by shot zone, you see that the corner three is the most assisted-on shot, the straightaway three the least, and the wing three somewhere in-between.

This makes a lot of sense, but might not seem all that enlightening.  If you’re shooting from the corner, chances are that you initially got the ball from a pass.  The other alternatives are to either 1) dribble into the corner and shoot or 2) perform an isolation play prior to shooting.  Neither of those possibilities seem as pragmatic as being passed the ball in the corner.

When you combine this finding with the knowledge that the corner three is one of the two most efficient places to shoot from (note: I will have an extensive post about this point later), I begin to wonder if the relative efficiency of the corner three is more attributable to the shorter distance, or to the fact that more shots come directly from a pass.  In other words, is it possible that teams score more from the corner because a higher percentage these shots are being set up by good team passing, and ostensibly result in more less-contested shots?

Unfortunately, only SportVU data (and maybe Synergy data) can answer that question.  But it’s something to think about.

Also unfortunately, I don’t have the data set to get field goal percentages on assisted-on shots, because you would have to know how many potential assists resulted in missed shots, which again could be answered by SportVU’s computer vision-aided data.

But what I could do with my dataset is to plot individual players’ three point field goal percentages against the percentage of their made three pointers resulting from an assist.  As a result, I created a d3-powered visualization, plotting these data points against each other.

Below is a static image of the visualization, and here is a link to the interactive assisted-on visualization, which will allow you to toggle which metrics are plotted against the X- and Y-axes.  Each circle represents a different player, where their position represents their 3pt FG% and 3pt makes assisted-on%, and the size of the bubble represents volume of shot attempts.

This data comes from the (lockout-shortened) 2011-2012 regular season:

The first thing you’ll notice is that those players with the lowest assisted-on three point percentages are point guards.  In this visualization, the two lowest assisted-on percentages are Phoenix Suns guards Sebastian Telfair and Steve Nash.  Green circles represent point guards, where you can see most point guards having an assisted-on percentage lower than the average of 83.7%.

One possible explanation is that a higher proportion of point guard shot opportunities come more naturally from dribble drives and ball screens than passes.  After all, who else on the floor would pass to a point guard for a three?  They’re usually the best passers, and usually the ones setting up other people for threes.

What I find interesting here are the non-point guard gray circles that have low assisted-on percentages.  These players tend to be those who have reputations for one-on-one play.  If you hover over the circles in the interactive visualization, you’ll see usual suspects like LeBron James and Carmelo Anthony, and some non-obvious, but-after-second-thought-that-makes-perfect-sense players like Hedo Turkoglu and Jodie Meeks.

Here I’ve appended the names of a few particularly interesting players.

Poor Kobe Bryant and Jordan Crawford, two players known for chucking up threes at will, appear in the bottom-left quadrant with very large circles, meaning their made threes aren’t usually assisted, they shoot low three point percentages, and they shoot a lot.  Not a great combination.

Two more chuckers, Deron Williams and Brandon Jennings, have decent field goal percentages but low assisted-on percentages, suggesting their shots may be contested.  For Williams, this may be understandable considering the talent around him, but for Jennings, this could be more questionable, given that he has Ersan Ilyasova and Mike Dunleavy, who shoot 45% and 40% from three, respectively.

Two of the more renowned three point bombers, Ryan Anderson and Steve Novak, appear in the top right quadrant, meaning they shoot a great percentage, but are dependent upon the pass to make their threes.

Finally, you have a few surprising guards in the lower right quadrant who shoot high percentages without as much dependence on the assist: Stephen Curry (in an injury-riddled season), Ramon Sessions, and Gary Neal (!).

I’m sure there are more interesting insights to glean from this dataset, so please e-mail, tweet, or comment to let me know your thoughts.

Assisted-on Data Visualization on VORPed

Kevin Durant’s Shot Distribution: 1st Quarter vs. 4th Quarter

While Kevin Durant has unquestionably had an MVP-caliber regular season, I still worry that his game won’t translate to the postseason.  Too many times in last year’s playoffs, you would find Durant with the ball 30 feet away from the basket, with the shot clock below 10 seconds, forced to take a less-than-optimal shot.

I looked at Durant’s shot chart for the entire 2011-2012 season, and noticed a difference in his shot distribution between the 1st and 4th quarter.

Here’s Durant’s shot distribution in the 1st quarter:

And here’s Durant in the 4th Quarter:

Relatively speaking, Durant doesn’t shoot as many threes in the 1st quarter.  But when the 4th quarter rolls around, he shoots about as many left wing threes as he does layups from the left side.

This is my worry with Durant: does he settle for the three too much, and by extension, will he make the right shot selection when the defenses inevitably tighten up?  Or, do the Thunder as a team settle too much for Durant’s long distance shots?

While this data is very far from a comprehensive analysis, it’s a data point that merits more investigation, and merits more questions about how Durant’s game will translate in the playoffs.

You can peruse this shot chart data yourself, here on this website: http://vorped.com/bball/index.php/player/shotchart/1106-Kevin-Durant

Shot Charts By Team Now Available

Building off the work done for the player shot charts, it was only a little bit more effort to create shot charts for teams.  So I’ve create a shot chart page for all 30 NBA teams, which can be found here:

http://vorped.com/bball/index.php/team

Unfortunately, I haven’t worked out all the performance kinks yet.  The page might take a while to load, and I know that, but I plan on adding some caching that should make those pages a lot more snappier.

Let me know any feedback in the comments section below.

How I Created a Shot Chart Visualization

I’ve finally completed a first draft of an interactive shot chart visualization for NBA players, with the inclusion of a couple filters and metrics that allows a user to slice the data.  This wasn’t a small task. In fact, most of the heavy work occurred in the backend to get all the data in an analyze-able format.

But I’m some people might be interested in how to create their own shot charts.  Here’s how I did it, with an explanation of the choices I encountered and the technologies I utilized along the way.

Creating a visual

On a conceptual level, making a shot chart requires 3 distinct tasks:

  1. Drawing a basketball court
  2. Obtaining the x-y coordinates of shots
  3. Drawing the x-y coordinates on the basketball court.  Summarize to areas or zones if desired.

How you accomplish these 3 things are really up to you.

SVG

I chose SVG, or Scalable Vector Graphics, as my drawing technology.  SVG is an emerging web standard, and most modern browsers can interpret SVG natively.  This means if you want to distribute your shot chart over the internet, your users don’t have to download any plugins (unlike Flash or Java), and you don’t have to code in a separate, non-browser language.

Like its name implies, another great thing about SVG is the ability to scale graphics without getting fuzzy.  If you’ve ever tried to make a static image file larger, you’ll have noticed the image looking less crisp around the edges.  With SVG, you have the ability to scale up or down a graphic without sacrificing resolution.

If you’re unfamiliar with SVG, I’d encourage you to download a program called Inkscape, which is an open-source application similar to Adobe Illustrator that allows you to create SVG-based files.

Obtaining X-Y coordinates

As I mentioned earlier, this is the hardest part of the task.  This is out of the scope of knowing how to do a visualization, but if you’re interested in how I got this data, I basically created my own parsing codebase that not only allowed me to extract X-Y coordinates, but also combined that with the play-by-play data.

If you’re interested, you can find the code at https://github.com/kpascual/nbascrape.  Honestly, it’s kind of a mess.  I’d rather you skip the hassle and pick up the final outputted data at http://vorped.com/bball.

In terms of file format, I use JSON, because I find it more lightweight to traverse than CSV or XML.  Which brings me to my last technology…

Javascript

With SVG, you can draw a basketball court pretty easily.  With a shot chart’s X-Y coordinates, you know where you need to place the shots on the court you just drew.  Now to programmatically place the shots on the court (which you wouldn’t want to do manually for tens or hundreds of shots), you’d need to use a scripting language.

On the web, the natural choice is Javascript.  And lucky for all of us, there are a couple libraries in particular that handle much of the heavy lifting for interacting with SVG in a browser environment.

Initially I used RaphaelJS to place shots on the basketball court.  But recently, I have switched over to using another library called d3.  Both are perfectly fine, but I found d3 to be more adept at manipulating SVG elements on-the-fly, which becomes very important when creating interactive visualizations.  If you want to create static shot charts, either library will suffice.

What I love about d3 is the simplicity of its API.  Though the syntax can be a little weird, its weirdness enables you to write succinct code, abstracting away all the coding mechanics of how things have to happen, and allowing you to focus more what you want to visualization to do and look like.

Interactions

Those are the technologies I used to create the shot chart visualizations.  However, I wanted to take it a step further, and allow user interaction.  I think a lot of the shot chart visualizations out there are great, but I feel what’s missing is the ability for users to do their own explorations.

My choices of technologies all hinged upon my need to have user interaction.  All of these are web standards within the browser, and even in this world of mobile apps, I still believe the browser will continue to be the primary app for the interactive with the web.

To allow for filtering and in-browser slicing and dicing of shot data, I used another open source Javascript library from Mike Bostock, founder of d3: CrossFilter.  This nifty little tool basically allows you to mimic Excel’s Pivot Tables with Javascript, cutting the data by certain dimensions, and summarizing metrics based on those cuts.  It’s the tool that powers the zone visualizations in my application.

The Future

With this visualization as a foundation, I still have plans to allow even more exploration of shot chart data by implementing more data.  Here are some upcoming features I hope to accomplish:

  • Filtering by multiple games or periods (dependent on an update to the CrossFilter project)
  • Adding filters by shot type (i.e. jumpers vs. hook shots vs. bank shots)
  • Showing assisted vs. non-assisted shots
  • Zone FG % compared to player’s historical averages
  • Zone FG % compared to players at their position
  • Porting the visualization over to entire teams, and not just players… maybe even five-man units?

I’ve got a few other really fun ideas floating around in my mind, but if you have any yourself, please feel free to share with me below.

– Ken

Why Joe Lacob Got Booed At Chris Mullin’s Jersey Retirement

I thought my first post here would be an analytical look at Linsanity, or Kevin Durant’s shot selection, or Carmelo Anthony’s usage rate.  Instead, I’m going to talk about the Golden State Warriors.

If you haven’t seen Warriors co-owner Joe Lacob get mercilessly booed during Chris Mullin’s jersey retirement ceremony, you really should.  Watching it live on TV, I felt so awkward, for Lacob, for Mullin, and for the entire situation itself, that I had to change the channel.

Conventional wisdom would suggest that Lacob got booed for trading away the Warriors’ best and most popular player, Monta Ellis, for oft-injured but sometimes productive big man Andrew Bogut and the homecoming of Stephen Jackson the aging, but very pricey Richard Jefferson.  Warriors fans responded with anger, despite the fact that Ellis isn’t very efficient in scoring, having a high usage rate and high entertainment value, but having average effective field goal percentage.

While there’s no doubt this contributed to the initial jeers, I think the sustained booing came primarily from Lacob’s inability to diffuse the situation through demeanor.

He could have ignored the initial boos.  He could have plowed through his canned speech like a seasoned politician.  He could have at least smiled.

Instead, what we saw was a rich guy waiting to be recognized, waiting for his words to be respected because, well, he’s rich and he owns the team.  He waited eight seconds just to begin speaking, only to convey his disgust at not receiving that respect by muttering, “Now that we’ve got that over with…”

Living in the Bay Area, you immediately realize this about Joe Lacob: he talks a lot.  But in this one minute of start-and-stop speech, you come to a slightly different realization: that Joe Lacob talks a lot to feed his ego, to hear himself speak.

But when you combine this with the Warriors’ recent front office moves, you can’t help but conclude that Lacob talks a big game, but doesn’t have the competence to back it up.

And this is why I think the Warriors fans booed: they’re tired of talk.  They want to see smart moves and good management.  Less talk, more doing.  And so far, Andrew Bogut doesn’t fit that bill for many fans.

In fact, if you’ve read John Hollinger’s review of Golden State’s trade deadline moves, you really start to wonder if the Warriors have the competency to handle the important task of managing the salary cap.  For example, why did the Warriors waste use their amnesty before the season on the Charlie Bell’s modest $4 million salary?  Didn’t they know they could amnesty Andris Biedrins, who makes double that amount per year over three years?  Do they realize Richard Jefferson makes at least $10 million for the next two years?

The last thing Warriors fans wanted was Lacob talking yet again.  And yet that’s exactly what Lacob’s start-and-stop speech forced them to do: to make them listen to him.  That’s why they booed, because Warriors fans can’t stand to hear any more empty words.  They’ve had a steady dose of it for 30 years and counting.