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)

dc1d0e6b1f9e4e07819cbb28ba10c4a2

Fork of Loading and Parsing CSV Data

0 stars0🌍 Public
DDhiraj Gede
Last edited Jan 7, 2022
Created on Jan 7, 2022

This example demonstrates how to load and parse CSV data by displaying the file size, row count, and column count of a CSS Named Colors dataset pulled from a GitHub gist. It uses the D3 v5 `d3.csv()` method to fetch and parse the data asynchronously, then formats the summary with `d3.csvFormat()` and updates the page via `document.getElementById()`. Commented-out alternatives show equivalent approaches using the Fetch API with `fetch()` and `response.text()`, alongside `d3.csvParse()` and `async`/`await` syntax.

AI-generated description