Skip to main content
100%

Shot Distance Bar Plot

✓ Published2🌍 Public
Yyc4004
Last edited Dec 14, 2021
Created on Dec 12, 2021

This interactive bar plot displays the distribution of NBA shot distances across four game periods, with stacked bars showing the total shot count for each distance. Users can switch between periods using buttons, which trigger a smooth 2-second animation that updates the bar heights, axes, and total counts. The visualization leverages D3 v7’s `scaleBand`, `scaleLinear`, and `scaleOrdinal` for layout and color, while transitions via D3’s `transition().duration()` animate changes. Data is fetched from a remote CSV using `d3.csv`, and the stacked bars are generated using `d3.stack()`.

AI-generated description

This bar plot shows the distribution of shooting distance in four periods of NBA games.

MIT Licensed

Similar vizzes