Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

NYC Interactive Crash Bar Chart with React & D3

Public visualization

NYC Interactive Crash Bar Chart with React & D3

0 stars1🌍 Public
JJose Morales
Last edited Nov 6, 2025
Created on Oct 30, 2025

This interactive bar chart visualizes the distribution of vehicle collisions across a 24-hour day in New York City, stacking counts of injuries, deaths, and other crashes for each hour. Built with React 19 and D3 v7, it uses `d3.stack` to create layered bars and `d3.scaleLinear` for axes. Hovering a bar triggers D3 mouse events that dim non-hovered bars and display a tooltip with hourly breakdowns. The chart resizes responsively by recalculating SVG dimensions, and loads data from an external CSV file.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed