Loading Boston Celtics Shot Log Data from 2014-2015 Season
This example loads Boston Celtics shot log data from the 2014-2015 NBA season and displays the raw parsed dataset as a JSON-formatted text block. It uses `d3.csvParse` to convert a CSV file fetched from a GitHub gist, then coerces quantitative fields like `SHOT_DIST`, `PTS`, and `CLOSE_DEF_DIST` to numbers before rendering them. The visualization demonstrates a simple data-loading pipeline with `fetch`, `select`, and `join`, showing either a loading state or the full array of shot records.
AI-generated descriptionThis data comes from: https://www.kaggle.com/datasets/dansbecker/nba-shot-logs
Variables and their types:
GAME_ID (ordinal): ID of Game
MATCHUP (categorical): What date the game occured along with who played
LOCATION (categorical): Whether the home or away team hosted the game
W (categorical): Whether the home team won or lost
FINAL_MARGIN (quantatative): Final Score difference
SHOT_NUMBER (quantatative): Number of the shot taken in the game
GAME_CLOCK (quantatative): Time on game clock when shot was taken
SHOT_CLOCK (quantatative): Time on shot clock when shot was taken
DRIBBLES (quantatative): Dribbles taken before shot
TOUCH_TIME (quantatative): Seconds the shooting player had the ball before shooting
SHOT_DIST (quantatative): Distance from the basket of shooter when shot was taken
PTS_TYPE (quantatative): Whether the shot was a 2 or 3 pointer
SHOT_RESULT (categorical): Whether the shot was made or missed
CLOSEST_DEFENDER (categorical): Name of closest defender
CLOSEST_DEFENDER_PLAYER_ID (categorical): ID of closest defender
CLOSE_DEF_DIST (quantatative): Defender's distance from shooter
FGM (categorical): Whether the shot was made or missed
PTS (quantatative): Number of points gained from the shot
player_name (categorical): name of player who shot
player_id (categorical): id of player who shot