Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading and Parsing CSV Data

Public visualization

Viewing a saved revision (read-only)

302cf6e4d48046079f4649b70929e04f

Fork of Loading and Parsing CSV Data

0 stars1🌍 Public
Sseanmdalrymple@protonmail.com
Last edited Feb 9, 2025
Created on Feb 9, 2025

This example demonstrates the basics of loading and parsing CSV data, displaying the file size, row count, and column count of a dataset of CSS named colors. It uses D3 v5’s `d3.csv()` method, which returns a promise, to fetch the data from a GitHub gist. The code then formats the statistics using `d3.csvFormat()` and `data.columns`, injecting the results into an HTML `<pre>` element. Commented-out alternatives illustrate the same process using `fetch()` with async/await and `d3.csvParse()`.

AI-generated description