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)

a707b16cd4e54dd98fb6da976636cd1e

Loading and Parsing CSV Data

0 stars0🌍 Public
Eelizww
Last edited Mar 10, 2021
Created on Mar 10, 2021

This example demonstrates how to load and parse CSV data from a remote URL using D3.js v5. It displays the dataset’s 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 CSS Named Colors dataset, then calls `d3.csvFormat` to measure the data’s size. An alternative commented approach shows parsing with the Fetch API, `async`/`await`, and `d3.csvParse`. The page renders the summary statistics without any charts or visual encoding.

AI-generated description