🌍 Public
Viewing a saved revision (read-only)
4f798cf8fe194db687d51d1fad857b7f
Loading and Parsing CSV Data
This example demonstrates the basic workflow of loading and parsing CSV data using D3.js v6. It displays the file size in kilobytes, the number of rows, and the number of columns from a remote CSV file containing CSS named colors. The code uses `d3.csv()` to fetch and parse the data, then `d3.csvFormat()` to calculate the formatted size, and reads the parsed array’s `length` and `columns` properties. The resulting statistics are rendered as large text inside a `<pre>` element via the DOM API.
AI-generated descriptionA program that loads and parses some CSV data.