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)

da6abcab7a654979836014cc6e59bde7

Loading and Parsing CSV Data

0 stars0🌍 Public
JJohn Lewis
Last edited Oct 31, 2021
Created on Oct 31, 2021
Forked from Hello HTML

This example demonstrates the basic operation of loading and parsing a CSV file using D3 v7. It fetches a remote dataset of CSS named colors and displays its file size in kilobytes, row count, and column count within a large `<pre>` element. The code uses the `d3.csv` method to retrieve and parse the data, then accesses the parsed array’s `length` and `columns` properties. A `d3.csvFormat` call calculates the formatted size, while the commented alternative shows fetch with async/await and `d3.csvParse`.

AI-generated description

A bare minimum HTML page.