Skip to main content
100%

Car Accident Visualization

✓ Published0🌍 Public
CChaoying Zheng
Last edited Dec 10, 2021
Created on Dec 9, 2021
Forked from HTML Starter

This interactive bar chart visualizes the frequency of collision details in car accidents, ranking causes from "Other Motor Vehicle" down to "In-Line Skater." Users can click buttons to add or remove bars, revealing progressively less common crash scenarios. Built with D3 v7 and React, the visualization uses `d3.scaleBand` and `d3.scaleLinear` for axes, with SVG rectangles and animations updating the chart dynamically. The data is hardcoded in JavaScript arrays, with axis labels and rotated tick text styled via CSS.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes