Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Parsing CSV Data with D3

Public visualization

Viewing a saved revision (read-only)

cda6a755164245a28c703d3c6982e65c

Parsing CSV Data with D3

0 stars0🌍 Public
AAman Singh
Last edited Mar 31, 2023
Created on Mar 24, 2023

This example demonstrates how D3 parses a remote CSV file and summarizes its contents. The page displays three statistics about the data: its approximate size in kilobytes, its row count, and its column count. The code uses `d3.csv()` to fetch and parse the dataset from a GitHub Gist, then `d3.csvFormat()` calculates the formatted string length. The resulting message is rendered inside a `<pre>` element with large font styling. The implementation relies solely on D3 v7 and native JavaScript promises, with commented alternatives using `fetch` and `async/await`.

AI-generated description

A program that loads and parses some CSV data.