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
Sstellnew
Last edited Aug 10, 2020
Created on Aug 10, 2020

This example demonstrates loading and parsing a CSV file with D3 v5, displaying the resulting dataset’s size, row count, and column count in a large preformatted text element. It fetches a remote CSV of CSS named colors using `d3.csv`, then formats the resulting parsed data with `d3.csvFormat` to compute its kilobyte size. The code also includes commented alternatives using the Fetch API and async/await with `d3.csvParse`, though only the primary `d3.csv` promise-based method is active.

AI-generated description

loading data with fetch

Comments

Sign in to join the discussion.

MIT Licensed