Skip to main content
100%

Parsing data with D3 csv

✓ Published0🌍 Public
RRuanzhenglin
Last edited Apr 14, 2021
Created on Apr 14, 2021

This example demonstrates how to parse CSV data from a remote URL using D3’s `d3.csv` method, then summarizes the dataset’s size and structure in plain text on a web page. The code fetches CSS named colors from a GitHub gist, counts the number of rows and columns, and calculates the formatted data’s size in kilobytes. It then displays these statistics in a large `<pre>` element, using `d3.csvFormat` and `data.columns` to inspect the parsed result. The page uses D3 v6 and vanilla JavaScript, with styling controlled by CSS.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes