Skip to main content
100%

Smoothed Interactive NYC Crash Plot with React & D3

✓ Published1🌍 Public
JJose Morales
Last edited Nov 6, 2025
Created on Nov 6, 2025

This example shows a smoothed time-series line chart of daily motor vehicle collisions in New York City, with hover interactions revealing exact dates and crash counts. The React app loads CSV data, applies a 50-day moving average to the raw counts, and passes the result to a D3 visualization built on `scaleTime`, `scaleLinear`, and `line`. Interactive tooltips and a highlight circle appear when users hover over transparent overlay points, using `timeFormat` for date labels. The SVG is rendered via React’s `createElement` and updated imperatively with D3’s `select` and `enter` selections.

AI-generated description
MIT Licensed

Similar vizzes