Aligned Smoothed Interactive NYC Crash Plot with React & D3
✓ Published1🌍 Public
JJose Morales
Last edited Dec 3, 2025
Created on Dec 2, 2025
This example shows the smoothed daily count of motor vehicle collisions in New York City over time as a line chart. The data, loaded from a CSV file, includes crash counts, injuries, and fatalities. The visualization applies a moving average with a window size of 50 to smooth the raw daily counts, revealing broader trends. Built with React and D3 v7, the chart includes interactive tooltips that appear when hovering over data points, displaying the exact date and crash value. The visualization handles window resizing and uses D3 scales, axes, and line generators to render the plot.
AI-generated descriptionMIT Licensed