- Updated file naming scheme to exclude date
- Included a substitutions scraper script
- Rotations are outputting into Excel tables
- Upon running script, rookies are still not yet registered. SHOTS DATA ARE STILL NOT AUTOMATED.
- Added dates to file names to avoid overwriting files every time.
- Reformatted percentage rounding in team box scores to integer values instead of a single decimal float
- Data files are not up to date with last minor change, but everything else should be the same
- Fixed team box scores to include 2-pointers field
- Removed back court shots from team shots data
- Included function to sort shot zones in team shots data
- Automation script done for everything except rotations data
The scraper will work game by game and will only save the most recent game.
- Spurs' traditional player box score outputs -
[date]_players_spurs_box_score.json - Opponent traditional player box score outputs -
[date]_players_opp_box_scores.json - Spurs' traditional team box score outputs -
[date]_team_box_scores_spurs.json - Opponent traditional team box score outputs -
[date]_team_box_scores_opp.json - Misc team game statistics -
[date]_misc_box_stats.json - Spurs' shot data by zone -
[date]_shots_spurs.json - Opponent shot data by zone -
[date]_shots_opp.json - League average shot data up the most current point of the season -
[date]_shots_league_avg.json - Spurs game substitutions -
[date]_rotations_spurs.xlsx - Opponent game substitutions -
[date]_rotations_opp.xlsx
- Download the entire repository
- Run
data_scraper/scraper_script.pyto gather, format, and outputJSONfiles
- If a previous file exists, this script will overwrite the last file.
- The folder creation may not work on Windows because of the path naming notation.
- If this is a problem, create a
data/folder outside the scraper scripts folder.
- If this is a problem, create a
- As of
Dec 23, 2020, the shot chats are inaccurate because rookie players are not yet registered.
- Rotation chart data
- Rotation chart bar graphs
- The test game is the final Spurs bubble game against the Jazz: https://www.nba.com/game/uta-vs-sas-0021901274/box-score#box-score
misc_box_stats.jsonincludes asts, rebs, pts in paint, fast break pts, 2nd chance pts, pts off turnovers, and bench pointsplayers_spurs_box_score.jsonandplayers_opp_box_scores.jsonare the player box scoresteam_box_scores_x.jsonare the two team box scoresshots_spurs.jsonandshots_opp.jsoninclude shots data for each team by zones; includes FG made, FG attempted, and FG percentage- FG_DIFF is the difference between the shot area percentage and league average from that zone
- FG_DIFF is calculated by TEAM SHOT ZONE FG PCT - LEAGUE AVG SHOT ZONE FG PCT
shots_league_avg.jsonis the league average shot data for the 2019-20 season
- Parse rotations data into bins for visualization
- 30 second bins
- solid bars for the game