Data of players on court

Home for all your discussion of basketball statistical analysis.
Post Reply
liurical
Posts: 3
Joined: Mon Sep 24, 2012 1:58 am

Data of players on court

Post by liurical »

Hi all

First time posting here! I've been writing code to scrape and organize NBA PBP data and have a problem that I'm not sure how to solve. How do I determine the 10 players on the court through the course of the game? I can get the starting lineup from the boxscore, but it's difficult to determine who the coaches placed in the lineup beginning of each quarter. For people who have solved this problem, did you just deduce by the subsequent player names in the plays and substitutions? Or is there a cleaner more efficient way?

Any advice would be greatly appreciated!
DSMok1
Posts: 1119
Joined: Thu Apr 14, 2011 11:18 pm
Location: Maine
Contact:

Re: Data of players on court

Post by DSMok1 »

liurical wrote:Hi all

First time posting here! I've been writing code to scrape and organize NBA PBP data and have a problem that I'm not sure how to solve. How do I determine the 10 players on the court through the course of the game? I can get the starting lineup from the boxscore, but it's difficult to determine who the coaches placed in the lineup beginning of each quarter. For people who have solved this problem, did you just deduce by the subsequent player names in the plays and substitutions? Or is there a cleaner more efficient way?

Any advice would be greatly appreciated!
First of all, use substitutions and then track from those substitutions each way. If a player never was substituted for in a quarter, check the PBP for a player appearing there that isn't already tracked. And finally, if a player both played the entire quarter and never showed up in the PbP for that quarter, check manually vs. box score for the game for a player missing 12 minutes.

As far as I know, that's about the only way to do it.
Developer of Box Plus/Minus
APBRmetrics Forum Administrator
Twitter.com/DSMok1
v-zero
Posts: 520
Joined: Sat Oct 27, 2012 12:30 pm

Re: Data of players on court

Post by v-zero »

It's an incredible PITA to get very good accuracy. Unless you know or are learning some bayesian modelling techniques it will be a very unrewarding exercise. The box-score isn't solved yet, so I would suggest starting there.
Last edited by v-zero on Fri May 17, 2013 6:29 pm, edited 1 time in total.
liurical
Posts: 3
Joined: Mon Sep 24, 2012 1:58 am

Re: Data of players on court

Post by liurical »

DSMok1 wrote:
First of all, use substitutions and then track from those substitutions each way. If a player never was substituted for in a quarter, check the PBP for a player appearing there that isn't already tracked. And finally, if a player both played the entire quarter and never showed up in the PbP for that quarter, check manually vs. box score for the game for a player missing 12 minutes.

As far as I know, that's about the only way to do it.
It's great to get confirmation on the method, really couldn't think of another way!
liurical
Posts: 3
Joined: Mon Sep 24, 2012 1:58 am

Re: Data of players on court

Post by liurical »

v-zero wrote:I use the PBP, Plus-Minus (pictorial variant) and box score pages from BBR to get a virtually perfect dataset. It's an incredible PITA to get very good accuracy. Unless you know or are learning some bayesian modelling techniques it will be a very unrewarding exercise. The box-score isn't solved yet, so I would suggest starting there.
I understand, thank you for your advice as well.
Post Reply