Skip to main content
100%

7.00 Load & Parse CSV

✓ Published0🌍 Public
EEric Weiss
Last edited Apr 6, 2021
Created on Apr 6, 2021
Forked from HTML Starter

This example demonstrates how to load and parse a CSV file using D3 v6, displaying the row and column counts of the dataset as large text on the page. It fetches a CSV of CSS named colors from a GitHub gist via the `d3.csv()` method, which returns a promise. The resulting parsed data array is used to extract `data.length` for rows and `data.columns.length` for columns, which are then written to the document body. A commented-out alternative using JavaScript’s native `fetch` with `d3.csvParse` is also included for comparison.

AI-generated description
MIT Licensed

Similar vizzes