Skip to main content
Public

Share visualization

Loading preview…

Summarising Coronavirus CSV Data

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportHTML, source ZIP

Summarising Coronavirus CSV Data

0 stars0Public
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

Comments

Sign in to join the discussion.

MIT Licensed