Sync NBA team data from stats.nba.com
✓ Published0🌍 Public
CCaged
Last edited Feb 9, 2014
Created on Feb 9, 2014
A shell script named `syncteams.sh` synchronizes NBA team statistics from the stats.nba.com API by iterating over seasons from 1996–97 through 2013–14. For each season, it fetches six JSON files—Base, Advanced, Misc, Four Factors, Scoring, and Opponent—using `curl` with a URL that specifies parameters like `MeasureType`, `PerMode=Totals`, and `rowsPerPage=30`. The script checks for existing files to avoid redundant downloads, re-fetching only the latest season (2013–14) each run. Data is stored in a `data/teams/` directory organized by season, with filenames lowercased from the stat type.
AI-generated description