Skip to main content
100%

Summarising Coronavirus CSV Data

✓ Published0🌍 Public
CChris Briggs
Last edited Nov 19, 2021
Created on Nov 19, 2021

This example fetches the John Hopkins Coronavirus time-series CSV and displays a single summary message: the total global deaths and the latest date column, formatted with commas. It uses D3 v5’s `d3.csv` to parse the remote data, then maps over rows to sum the final column’s values with a reduce operation. The result is rendered as large red text in a `<pre>` element, updating the DOM via `document.getElementById`. The code also comments alternative approaches using `fetch`, `async/await`, and `d3.csvParse`.

AI-generated description
MIT Licensed

Similar vizzes