Shot Distance Bar Plot
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()`.