Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading and Parsing CSV Data

Public visualization

Loading and Parsing CSV Data

0 stars0🌍 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

Comments

Sign in to join the discussion.

MIT Licensed