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
YYohR
Last edited Oct 27, 2021
Created on Oct 27, 2021
Forked from HTML Starter

This example demonstrates how to load and parse a CSV file using D3.js, displaying a summary of the data’s key metrics: size in kilobytes, row count, and column count, rendered inside an HTML `<pre>` element. The code fetches a remote CSV containing CSS named colors via `d3.csv`, which parses the file into an array of objects. Using the parsed result, it calls `d3.csvFormat` to compute the formatted string length, and accesses the `data.length` and `data.columns.length` properties. The page relies on a large font size for the output message, making the stats highly visible.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed