Skip to main content
100%

Loading and parsing csv data

✓ Published0🌍 Public
Bbjfmbeck
Last edited Mar 6, 2023
Created on Mar 6, 2023
Forked from HTML Starter

This example demonstrates how to load and parse CSV data using D3.js, displaying a summary of the dataset in a large preformatted text element. The visualization shows the number of rows, columns, and file size in kilobytes for a dataset of CSS named colors fetched from a GitHub gist. The code uses the `d3.csv` method to asynchronously fetch and parse the remote CSV file, then counts rows via `data.length`, columns via `data.columns.length`, and computes the approximate file size with `d3.csvFormat` and `Math.round`. Alternative fetching with `fetch` and `d3.csvParse` appears in a commented section.

AI-generated description

A program that laods and parses some CSV data.

MIT Licensed

Similar vizzes