Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 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

MIT Licensed

Similar vizzes