Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Car Accident Visualization

Public visualization

Viewing a saved revision (read-only)

4a813641b0564c4faf9aee48a7d91526

Car Accident Visualization

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