🌍 Public
Viewing a saved revision (read-only)
8fe14954e19449a89966645675bed742
Loading and Parsing CSV Data
This example demonstrates loading and parsing a CSV file of CSS named colors from a remote URL, displaying the file size in kilobytes, row count, and column count. The preferred method uses the `d3.csv(URL).then(...)` API to fetch and parse the data asynchronously, then calculates metrics from the resulting data object and its `columns` array. The code also includes commented-out alternatives using `fetch` and `d3.csvParse` for comparison. The sparse text output is presented in a large-format `<pre>` element.
AI-generated descriptionA program that loads and parses some CSV data.