Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
Jjay-chitsakdanon
Last edited Aug 31, 2021
Created on Aug 30, 2021
Forked from HTML Starter

This example demonstrates how to load and parse remote CSV data using D3 v7, displaying the file size, row count, and column count of the dataset on the page. It fetches the text from a GitHub Gist containing CSS named colors, then parses it with `d3.csvParse`. The parsed result exposes the number of rows via `data.length` and column names via `data.columns`, which are written into a `<pre>` element with large font styling. The code uses the Fetch API's `fetch` and `response.text()` to retrieve the raw CSV string before parsing.

AI-generated description

Loading and Parsing CSV Data

MIT Licensed

Similar vizzes