Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

jasplund3

Public visualization

Viewing a saved revision (read-only)

626d9082a0984210bc3a642aa9976a5b

jasplund3

0 stars1🌍 Public
JJohn Asplund
Last edited Jan 18, 2020
Created on Jan 17, 2020

This example visualizes a running total over time as a bar chart, displaying a cumulative count that grows from 5 in 1949 to nearly 15,000 by 2019. The chart uses SVG rendering and the D3 v5 library, with `d3.scaleBand` for the categorical year axis and `d3.scaleLinear` for the numeric total axis. The code constructs the visualization by appending rect elements to an SVG group, and it customizes the x-axis ticks to show only every third year using `d3.timeYear.every(3)` and a filter that removes non-matching tick labels. The data is loaded from a CSV file containing year and running_total columns.

AI-generated description

An example including some commonly used features of SVG.