Skip to main content
100%

Fork of NBAanalysis

✓ Published0🌍 Public
Yyc4004
Last edited Dec 13, 2021
Created on Dec 13, 2021

This interactive bar chart displays the number of shots taken by LeBron James in each quarter of NBA games, sourced from a CSV file. Users can filter the visualization by clicking buttons for All Data or individual quarters, which triggers `d3.csv` loading and `d3.filter` to subset the data. The bar chart, rendered as SVG elements, updates with a smooth `transition().duration(1000)` on both the y-axis and rectangles as the data changes, using `d3.scaleBand` and `d3.scaleLinear` for positioning. The legend clarifies the x-axis as shot distance and the y-axis as shot count.

AI-generated description

Data: https://gist.github.com/Junying-Li/72ef4641efd6b4abf371f5d9f4267a56

Iterated from last week's visualization.

What's new?

  1. Added buttons to interact with users.
  2. When click on a button, the bar chart will filter and sort data.
  3. Added transition.

X-axis: region that earthquake occured.

Y-axis: Deaths in earthquake.

This bar plot shows the deaths caused by earchquakes in mutiple regions in different period of 19 century.

MIT Licensed

Similar vizzes