Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

NYC Crash Normalized Bar Chart with React & D3

Public visualization

Viewing a saved revision (read-only)

5ee5db95a1844c688aa23bf1085ddbd9

NYC Crash Normalized Bar Chart with React & D3

0 stars1🌍 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