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.
1.To unzip the 7z file run this command
cd data sudo ./setup.sh
Additional Data Conversions
- Additional scripts are provided. To complete these steps, add your project directory to the constant.py file in the movement package.
import os # change this data_dir for personal path if os.environ['HOME'] == '/home/neil': data_dir = '/home/neil/projects/nba-movement-data' else: raise Exception("Unspecified data_dir, unknown environment")
- Install the user package. You may need to run this in sudo.
python setup.py build python setup.py install
- Convert the JSON files.
- Convert the full-court to half-court. An explanation of moving the SportVU movement can be found here.
- 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.