Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
AAndrewLamWARC
Last edited Oct 22, 2021
Created on Oct 22, 2021

This example demonstrates how to load and parse CSV data from a remote URL, displaying the file size, row count, and column count in large text. The code uses the Fetch API with async/await to retrieve the raw CSV text, then parses it with `d3.csvParse`. It also shows an alternative commented-out approach using `d3.csv` with promises. The dataset is CSS Named Colors, fetched from a GitHub gist, and the results are rendered into a DOM element via `textContent`.

AI-generated description
MIT Licensed

Similar vizzes