mvanbommel / nba_scorekeeper_bias

Code for the article "Adjusting for Scorekeeper Bias in NBA Box Scores" published in DMKD and presented at Sloan.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nba_scorekeeper_bias

Code for the article "Adjusting for Scorekeeper Bias in NBA Box Scores" published in Data Mining and Knowledge Discovery (PDF) and presented at the MIT Sloan Sports Analytics Conference.

box_score_data

Includes code for the initial examination and simple models (and makes use of ESPN box score data scraped using the scrape_nba_box_scores repository).

  • observed_ar_and_br.R examines the observed assist ratio and block ratio for the home and away teams for each scorekeeper (and plots them)
  • simple_model_ar_and_br.R uses a simple linear model to estimate the assist ratio and block ratio for the home and away teams for each scorekeeper (and plots them)

player_tracking_data

Includes code for the more advanced contextual model (and makes use of the publicly available player tracking data here).

  • change_player_tracking_data_format.R changes the format of the player tracking (moment) data (producing moment_data.RData)
  • get_event_data.R extracts the event data from the moment data (producing event_data.RData)
  • get_potential_assists.R obtains the contextual and spatio-temporal information for each potential assist (producing potential_assists.RData)
  • estimate_assist_model.R contains the code necessary to estimate the full contextual assist model (but cannot actually perform the estimation with only one game of data)

About

Code for the article "Adjusting for Scorekeeper Bias in NBA Box Scores" published in DMKD and presented at Sloan.


Languages

Language:R 100.0%