Fork of NBAanalysis
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 descriptionData: https://gist.github.com/Junying-Li/72ef4641efd6b4abf371f5d9f4267a56
Iterated from last week's visualization.
What's new?
- Added buttons to interact with users.
- When click on a button, the bar chart will filter and sort data.
- 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.