Skip to main content
100%

NYC Crash Normalized Bar Chart with React & D3

✓ Published1🌍 Public
JJose Morales
Last edited Sep 25, 2025
Created on Sep 25, 2025

This stacked bar chart displays NYC motor vehicle crash data by hour, showing the proportion of injuries, fatalities, and all other crashes normalized per collision. The visualization uses d3.stack to create stacked bars, with React managing the responsive SVG container and d3.scaleLinear, d3.axisBottom, and d3.axisLeft constructing the axes. Data loads from a CSV file, and percentages are computed by dividing injury and fatality counts by total crashes. A color-coded legend identifies the three stacked categories, while a custom tick format converts numeric hours into AM/PM labels.

AI-generated description
MIT Licensed

Similar vizzes