Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading and Parsing CSV Data

Public visualization

Loading and Parsing CSV Data

0 stars0🌍 Public
CChinedu Ozodi
Last edited Oct 7, 2021
Created on Oct 7, 2021

This example demonstrates the basic workflow of loading and parsing CSV data with D3. It fetches a CSV file containing CSS named colors from a GitHub gist and displays summary statistics—file size in kilobytes, row count, and column count—in a large text element. The code uses `d3.csv` and the Promise-based `.then()` method to handle asynchronous loading. An alternative commented-out section shows the same process using the Fetch API with `async`/`await` and `d3.csvParse`. The final output presents three lines of calculated metrics derived from the parsed dataset.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed