https://github.com/bttmly/nba-shooting
NBA shot chart generator (WIP)
https://github.com/bttmly/nba-shooting
Last synced: 3 months ago
JSON representation
NBA shot chart generator (WIP)
- Host: GitHub
- URL: https://github.com/bttmly/nba-shooting
- Owner: bttmly
- Created: 2015-12-12T23:22:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-24T00:58:26.000Z (over 9 years ago)
- Last Synced: 2025-01-08T22:01:55.813Z (4 months ago)
- Language: JavaScript
- Size: 271 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nba-shooting (WIP)
WORK IN PROGRESS. Mostly just imported the code from an [older attempt](https://github.com/nickb1080/nba-shooting-chart), and got it working again.
Current status:
It generates a [Kirk Goldsberry-style](https://twitter.com/kirkgoldsberry/status/669221652580794368) shot chart for all shots league-wide for this season. By modifying `/scripts/update-shots.js` where noted you can pull data from past seasons. See the [nba API client](https://github.com/nickb1080/nba) for docs.You can enter a player id to generate a shot chart for that player, relative to league shooting, although it's buggy right now and partially incomplete.
- clone the repo
- `cd nba-shooting`
- `npm install`
- `npm run update-shots`
- `npm start`
- point your browser to `http://localhost:3000`The client code lives in `server/public`. The server will re-bundle the code (via browserify) each time it is requested.
Plans:
- Fix the odd behavior shown in the individual player maps (i.e. bin id mismatches between player shooting data and league shootin data)- Add some UI (tooltips?) to provide data about each hexagonal bin.
- d3 is great, but would like to explore using canvas. For instance creating an un-binned chart of every one of a player's career shots might be unworkable, performance-wise.
- When pulling shots, go back as far as nba data provides, and add query strings to endpoints to filter by season
Suggestions and PRs welcome.