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)

5da1ba548c7b4002a7edf2992fdb56f9

Fork of Loading and Parsing CSV Data

0 stars0🌍 Public
PPratik Raja
Last edited Aug 4, 2024
Created on Aug 4, 2024

This example demonstrates how to load and parse CSV data using D3 v5’s `d3.csv` method, displaying summary statistics about the dataset in a large HTML `<pre>` element. The data source is a CSV file containing CSS named colors fetched from a GitHub gist. The code computes the file size in kilobytes, the number of rows, and the number of columns, then updates the page text via `textContent`. An alternative approach using `fetch`, `async/await`, and `d3.csvParse` is included as commented-out code for comparison.

AI-generated description