🌍 Public
Viewing a saved revision (read-only)
84f7cbf6f32e45e3af1fa817151b926b
Loading and Parsing CSV Data
This example demonstrates how to load and parse a remote CSV file using D3 v7. It fetches the CSS-named-colors dataset from a GitHub gist, then 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` for direct loading and parsing, with an alternative commented-out approach using `fetch`, `async`/`await`, and `d3.csvParse` to show manual text handling. The output is rendered as plain text inside a `<pre>` element.
AI-generated descriptionA program that loads and parses some CSV data.