Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading and Parsing CSV Data with D3

Public visualization

Viewing a saved revision (read-only)

74bfe4385f2147ceb2e575505892242e

Loading and Parsing CSV Data with D3

0 stars0🌍 Public
JJason Tiller
Last edited Mar 2, 2021
Created on Mar 2, 2021

This example demonstrates how to load and parse CSV data from a remote URL using D3 v6. It displays the file size in kilobytes, row count, and column count in a large text block. The code uses `d3.csv()` to fetch and parse the data, then `d3.csvFormat()` to measure its size, along with the parsed array’s `length` and `columns` properties. The data source is a GitHub gist containing CSS named colors. Commented alternatives show `fetch`, `async/await`, and `d3.csvParse()` for comparison.

AI-generated description

A program that loads and parses some CSV data.