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)

dc264518ea974f8d865161a41294ad61

Loading and Parsing CSV Data

0 stars0🌍 Public
TTsaikkari
Last edited Jul 26, 2021
Created on Jul 25, 2021
Forked from HTML Starter

This example demonstrates how to load and parse CSV data from a remote URL using D3 v5. It displays the file size in kilobytes, the number of rows, and the number of columns in a large text element. The code uses `d3.csv` to fetch and parse the data, then accesses the resulting array’s `length` and `columns` properties. It also relies on `d3.csvFormat` to compute the formatted size, with an alternative commented approach using `fetch`, `async/await`, and `d3.csvParse`. The data comes from a GitHub gist containing named colors.

AI-generated description

A program that loads and parses some CSV data.