Skip to main content
100%

parsing CSV data using fetch

✓ Published0🌍 Public
TToonysg
Last edited Dec 22, 2021
Created on Dec 21, 2021
Forked from Hello VizHub

This example demonstrates how to fetch and parse a CSV file using the browser's Fetch API, loading the data from a remote GitHub gist. The page also showcases modular ES6 imports with D3 v5, using `select` from `d3` to update the text of a `#message` div with a greeting from a local module. A separate stylesheet styles the message. The CSV parsing itself is initiated via an asynchronous `fetchText` function that requests the raw datasheet URL, though the fetched text is merely logged to the console and not further processed or visualized.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes