Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading and Parsing CSV Data

Public visualization

Viewing a saved revision (read-only)

bf420ce219594eb09b80441eeb12fc2c

Loading and Parsing CSV Data

0 stars0🌍 Public
DDon-eime
Last edited Nov 3, 2021
Created on Nov 3, 2021

This visualization demonstrates how to load and parse CSV data using D3.js version 5, fetching a dataset of CSS named colors from a GitHub gist. The example displays three key metrics—the file size in kilobytes, the number of data rows, and the number of columns—in large, bold text. It showcases two alternative approaches: using the `d3.csv` method with a promise chain, and a commented-out version using the native `fetch` API with `async`/`await` and `d3.csvParse`. Both methods retrieve the CSV, parse it into a structured data object, and report the dataset's dimensions.

AI-generated description