Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading and Parsing CSV Data

Public visualization

Viewing a saved revision (read-only)

5c95a324e1cf4adf983882330e38cee0

Fork of Loading and Parsing CSV Data

0 stars0🌍 Public
Nnatsgeorge.ng@gmail.com
Last edited Jul 2, 2024
Created on Jul 2, 2024

This example demonstrates how to load and parse CSV data using D3 v5 and the Fetch API. It displays the file size in kilobytes, the number of rows, and the number of columns from a dataset of CSS named colors. The code uses `d3.csv` for direct parsing and a commented alternative with `fetchText` and `d3.csvParse`. It highlights both the promise-based `then` pattern and the async/await approach, while avoiding the "pyramid of doom" by chaining promises.

AI-generated description