That video up top is a play from a New York Knicks game agains the Toronto Raptors. It was captured and created using a video system called SportVU, which is licensed by 15 NBA teams from Stats LLC. Basically, they track where every player is for every second of every game. And for the first time, one of those teams opened up and talked to Grantland this month about how it uses the data.

SportVU isn't a new tech. It's been around for some years now; teams have just kept the ways that they use the data a secret. That's not isolated to just the camera tech; teams have entire stats departments that work in secret, developing in-house ways to evaluate players. The video above is the culmination of all of Toronto's work, which is actually a deeply complex software project:

In simple terms: The Raptors' analytics team wrote insanely complex code that turned all those X-Y coordinates from every second of every recorded game into playable video files. The code can recognize everything - when a pick-and-roll occurred, where it occurred, whether the pick actually hit a defender, and the position of all 10 players on the floor as the play unfolded. The team also factored in the individual skill set of every NBA player, so the program understands that Chris Paul is much more dangerous from midrange than Rajon Rondo, and that Roy Hibbert is taller than Al Horford.

But here's the wow part: The clear circles in the video are what the Toronto defenders should have done. Not tracking—analyzing. Predicting. Evaluating. It uses a combination of data analysis and scouting reports for the opposing players, and knowledge of the team's defensive scheme and personnel to spit out exactly how a play is supposed to look, if it's optimized and run correctly. The values for each decision are calculated based on the expected value of a play, which is calculated multiple times per second. So, what is the value of giving up a 3? How about of going under a screen while guarding a good jump shooter? The ghost players make the right decision every time. That's next level, robots-replacing-humans stuff.

The scarier part? It's not even running at optimal efficiency. The computer model still uses the basic Toronto scheme, instead of trying to just come up with some platonic ideal of NBA defense. That's because coaches still aren't sold on computers knowing best, so the data is being offered up in the friendliest version. Sometimes. In other situations they remain at odds, like with 3-pointers, where the data says even below average shooters should jack them up, while coach Dwane Casey has a heart attack every time a sub-par shooter fires a seemingly idiotic 3.

But the gulf between old school and nerd is closing. And the irony is, the more insanely advanced analytics get, like with the Raptors' software, the more digestible they become too. It's easier to talk to any coach about defensive rotations he can see computer players making, based on real life information, than it would be to, say, talk about shot selection spreadsheets. For the rest of the rundown on what the Raptors are doing, and for much, much, much more basketball nerd analysis, check out the full feature over at Grantland. [Grantland]