Team: 4PPP
Members: Skyler Shi, Frank Li, Brandon Pollack, Faizan Abdullah
- Download
Basketballfolder containing hackathon data from Box. - Move
Basketballunder this project's root directory. - Unzip the tracking files
CLEBOS.zip,CLEGSW.zip,SASGSW.zipinto same directory. - Run
Testing_Data.ipynbto see data in pandas dataframes.
NBA didn't provide us with shot-zone data. Hence we scraped stats.nba.com for the shot-zone data. The final segmentation is similar with this: https://stats.nba.com/events/?flag=3&CFID=33&CFPARAMS=2016-17&PlayerID=204001&ContextMeasure=FGA&Season=2016-17§ion=player&sct=zone
url_to_dffunction grabs json file in url and converts to pandas dataFrame.- First grab the mapping from player name to player_id and their team info for 2016-17 season from https://stats.nba.com/leaders/?Season=2016-17&SeasonType=Regular%20Season page. The output file is called
player_info_1617.csv. - Then grab shot detail json by iterating through every player_id.
- Each output csv file is the shot detail for every single player.
- Concatenate csv files to a master one.
We want to visualize our work for easier understanding and intuition checks.
We use the NBA stats defined shot chart. The zones are indexed as below for easier coding.

Factors to consider:
- Lineup
- Shot zone
- Time/on court situation (score)
- Who took the shot?
- Get instructions on installing plotly here: https://plot.ly/python/getting-started/
- Get instructions on installing dash here: https://dash.plot.ly/installation
- Run
python app/interface.pyto start up app interface.