🌍 Public
Viewing a saved revision (read-only)
4fd4d28d5ecf4c3abdfbded02b12964b
NYC Crash Bar Chart Interactive Legend with React & D3
This stacked bar chart displays NYC collision data by hour, breaking down each bar into injuries, deaths, and other crashes. Hovering over legend items highlights the corresponding stack with a black stroke and fades others to 20% opacity. The visualization uses React for state management and D3 v7 for rendering, including `d3.stack`, `d3.scaleLinear`, and `d3.axisBottom`. It loads hourly crash statistics from a CSV file via `d3.csv` and handles window resizing with dynamic SVG dimensions.
AI-generated description