Basketball Density Shot
✓ Published0🌍 Public
This visualization displays the shot density and accuracy of LeBron James on a basketball court, using player shot data from the nba_api. Each shot is shown as a small circle, with green marks for made shots and red for misses, overlaid on a pixelated density grid. The grid’s color, using an interpolatePiYG palette driven by a d3.scalePow, indicates the ratio of misses to makes per cell. The court and its markings are drawn with React’s SVG components, while d3’s scaleLinear handles the coordinate mapping for both the player shots and the court geometry.
AI-generated descriptionReact basketball court component made from https://observablehq.com/@willhoup/drawing-an-nba-court
data from https://github.com/swar/nba_api
MIT Licensed