Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
AAn Jingyi
Last edited Apr 29, 2020
Created on Apr 29, 2020

This example demonstrates how to load and parse CSV data using D3 v5, displaying the file’s size, row count, and column count as text. It fetches the CSS Named Colors dataset from a GitHub gist via `d3.csv`, then formats the result with `d3.csvFormat` to compute the kilobyte size. The visualization also includes commented alternatives using `fetch` with `async`/`await` and `d3.csvParse`, highlighting different parsing approaches. The output appears in a `<pre>` element with large font styling, showing only textual metadata rather than a graphical chart.

AI-generated description

A program that loads and parses some CSV data: CSS Named Colors.

MIT Licensed

Similar vizzes