Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

7.00 Load & Parse CSV

Public visualization

Viewing a saved revision (read-only)

739d278e63ae4bcbae15ce381f806d94

7.00 Load & Parse CSV

0 stars0🌍 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