Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading and Parsing CSV Data

Public visualization

Viewing a saved revision (read-only)

ff147b88c8ff47588763a90d94f46f47

Loading and Parsing CSV Data

0 stars0🌍 Public
AAn Jingyi
Last edited Apr 29, 2020
Created on Apr 29, 2020

This example demonstrates how to load and parse CSV data using D3 v5, displaying the file’s size, row count, and column count as text. It fetches the CSS Named Colors dataset from a GitHub gist via `d3.csv`, then formats the result with `d3.csvFormat` to compute the kilobyte size. The visualization also includes commented alternatives using `fetch` with `async`/`await` and `d3.csvParse`, highlighting different parsing approaches. The output appears in a `<pre>` element with large font styling, showing only textual metadata rather than a graphical chart.

AI-generated description

A program that loads and parses some CSV data: CSS Named Colors.