🌍 Public
Viewing a saved revision (read-only)
48682ac341834a799ac4bc9ebaba10d3
Summarizing Coronavirus Data
This example displays the total global deaths from COVID-19 as a large red number in a `<pre>` element, updated to the most recent date in the dataset. It loads a CSV from the Johns Hopkins CSSE GitHub repository using `d3.csv`, extracts the last date column, sums all numeric values with `Array.reduce`, and formats the result with `d3.format`. The final message combines the comma-formatted total and the date, then injects it into the page via `textContent`.
AI-generated descriptionA program that loads and parses some CSV data: CSS Named Colors.
See also: