Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
Llaurence beattie
Last edited Sep 13, 2021
Created on Sep 13, 2021

This example demonstrates how to load and parse CSV data using D3 v5 and the Fetch API. It displays the file size, row count, and column count of a CSS Named Colors dataset from a GitHub gist. The code uses `d3.csv` with a Promise to fetch and parse the data, then formats a summary message with `d3.csvFormat`. An alternative commented-out approach uses `fetch`, `async/await`, and `d3.csvParse`. The result appears as large text in a `<pre>` element.

AI-generated description
MIT Licensed

Similar vizzes