Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

loading and parsing csv data/d3/fetch

Public visualization

Viewing a saved revision (read-only)

f592db4979874acdbd9cb704aecf29ba

loading and parsing csv data/d3/fetch

0 stars0🌍 Public
Llaplantalaplanta
Last edited Jan 20, 2022
Created on Jan 13, 2022

This example demonstrates how to load and parse a remote CSV file using D3 v7 and the Fetch API. It fetches a dataset of CSS named colors from a GitHub gist and uses `d3.csv` to parse the data, then displays summary statistics including the file size in kilobytes, the number of rows, and the number of columns in a large, monospaced preformatted text element. The code also includes a commented-out alternative using `fetch` with `async` and `await` and `d3.csvParse`, showing a manual two-step approach.

AI-generated description

loading and parsing csv data with d3 and fetch