Skip to main content
100%

NYC Borough Crash Data

✓ Published0🌍 Public
JJose Morales
Last edited Oct 1, 2025
Created on Oct 1, 2025
Forked from Simple World Map

This stacked bar chart visualizes NYC collision data across the hours of the day. Each bar is segmented by the proportion of crashes resulting in injuries, deaths, and other outcomes, as derived from a CSV loaded with d3.csv. The visualization uses React hooks (useRef, useEffect, useState) to manage responsive dimensions and re-render the viz function on window resize. It employs d3.scaleLinear for axes, d3.stack for the stacked segments, and d3.axisBottom/axisLeft with custom time-based tick formatting for the hour labels.

AI-generated description
MIT Licensed

Similar vizzes