Skip to content
 
 

Repository files navigation

nba-movement-data

Ever since the nba stopped public access of their movement data, I though it would be good to have a copy of @neilmj data repo incase he deletes his data repo.

Credit: @neilmj

##Remove all zip files excluding 01.02.2016.HOU.at.SAS , 01.03.2016.CHI.at.TOR , 12.25.2015.CLE.at.GSW, before proceeding with Data Setup

Data Setup

1.To unzip the 7z files, ensure 7z is installed on your computer first. Then, run this command:

cd data && ./setup.sh

Additional Data Conversions

  1. Install the package.

(From the package root direction)

python setup.py build
pip install -e .
  1. Convert the JSON files.
python movement/json_to_csv.py
  1. Convert the full-court to half-court. An explanation of moving the SportVU movement can be found here.
python movement/convert_movement.py
  1. The fixed shot times, along with the shot locations in half court space are in data/shots/fixed_shots.csv. They are formed from executing the script.
python movement/fix_shot_times.py

In the fixing logic, the shot time is defined as the highest acceleration point before the ball reaches it's peak, within a defined window. The logic can be seen below. plot

About

SportVU movement tracking data.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages