Skip to main content
100%

Loading and Parsing Corona-virus Data

✓ Published0🌍 Public
Ssultanmirzapydev
Last edited Aug 20, 2021
Created on Aug 19, 2021

This example loads a real-world COVID-19 death time-series CSV from the Johns Hopkins CSSE repository and extracts the death total from its most recent date column. It parses each row by converting the latest column’s string value to a number, then reduces the array to a single sum. The result—the total global deaths—is displayed as text in a React-managed DOM node. The code uses d3.csv for fetching and parsing, plus Array.reduce and Array.map, with React and OpenLayers libraries loaded via CDN.

AI-generated description
MIT Licensed

Similar vizzes