🌍 Public
Viewing a saved revision (read-only)
6e51a62b37a44febbf33fae5cef08bf3
Loading and Parsing CSV Data
This example demonstrates how to load and parse CSV data using D3 v5. It fetches a remote CSV file containing named CSS colors and displays three summary statistics: the file size in kilobytes, the number of rows, and the number of columns. The primary implementation uses d3.csv with a Promise, while commented-out code shows an alternative approach using fetch, async/await, and d3.csvParse. The parsed data is rendered as plain text inside a pre element, with results formatted using d3.csvFormat to calculate the data length.
AI-generated descriptionA bare minimum HTML page.