🌍 Public
Viewing a saved revision (read-only)
c2afd216b4ac40c888a6479fe8bc9139
Loading and Parsing CSV Data
This example demonstrates how to load and parse CSV data in D3.js, displaying a summary of the resulting dataset. It fetches a CSV file containing CSS named colors from a GitHub gist using `d3.csv`, then formats the parsed data with `d3.csvFormat` to calculate its size in kilobytes. The visualization presents three key metrics as plain text: the data size, row count, and column count, all rendered in a large `<pre>` element. The code also includes commented alternatives using the Fetch API with `d3.csvParse` to show different parsing approaches.
AI-generated descriptionA program that loads and parses some CSV data.