Skip to main content
100%

Loading and parsing CSV data

✓ Published0🌍 Public
MMark Zwart
Last edited Mar 23, 2021
Created on Mar 23, 2021
Forked from Hello HTML

This example demonstrates how to load and parse a CSV file using the Fetch API and D3’s `d3.csvParse` function. It fetches a remote CSV file containing CSS named colors, parses the text into an array of objects, and logs the number of columns found in the data. The code defines an asynchronous `fetchText` helper that retrieves the raw CSV string, then passes it to `d3.csvParse` for conversion. The example highlights the separation between fetching raw text and D3’s parsing utilities, using D3 v6 and native browser `fetch`.

AI-generated description

A program that loads and parses some csv data

MIT Licensed

Similar vizzes