🌍 Public
Viewing a saved revision (read-only)
6ecb43eb021e4ebda3a91f42e38d5b50
Loading and Parsing CSV Data
This example demonstrates how to load and parse a CSV file using D3 v5, displaying the file size, row count, and column count in large text. It uses `d3.csv` to fetch and parse the dataset asynchronously via a promise, then formats a summary message with `d3.csvFormat` to calculate kilobyte size. The data source is a GitHub-hosted CSV containing CSS named colors. An alternate approach using the Fetch API with `async` and `await`, plus `d3.csvParse`, is included as commented-out code for comparison.
AI-generated description