Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

NYC Borough Crash Data

Public visualization

NYC Borough Crash Data

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

Comments

Sign in to join the discussion.

MIT Licensed