🌍 Public
Viewing a saved revision (read-only)
415ed019b6464db3a2ba6ca66cba8fd3
Loading and Parsing CSV Data
This example demonstrates how to load and parse CSV data using D3 v7, showing the file size, row count, and column count of a remote dataset containing CSS named colors. The page fetches a CSV file from a GitHub gist via the `d3.csv` method, which returns a promise that resolves to an array of parsed objects. The code then uses `d3.csvFormat` and the array’s `length` and `columns` properties to generate a summary message displayed in a large `<pre>` element. Alternative commented-out approaches using `fetch`, `async/await`, and `d3.csvParse` are also included.
AI-generated descriptionA program that loads and parses some CSV data.