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)

24057ed3695b49e2a66ed14ace85722f

Loading and Parsing CSV Data

0 stars0🌍 Public
Cchamce
Last edited Jun 19, 2021
Created on Jun 19, 2021

This example demonstrates how to load and parse CSV data from a remote URL, displaying the file size in kilobytes, row count, and column count as text. The code uses `d3.csv` to fetch and parse the CSS Named Colors dataset, then `d3.csvFormat` to measure the formatted size. A commented alternative shows the same task using the Fetch API with `async`/`await` and `d3.csvParse`. The data is rendered into a large `<pre>` element using plain text manipulation.

AI-generated description