Skip to main content
100%

dv2020-ep15-viz16 - Parsing Data with D3 (short way)

✓ Published0🌍 Public
Zzach b.
Last edited Mar 12, 2023
Created on Mar 12, 2023

This example displays a simple text report about a remote CSV dataset, showing its size in kilobytes, row count, and column count directly in the browser. It fetches the data from a GitHub gist using the `d3.csv` method, then parses the loaded rows to compute these statistics. The code formats the data back into a CSV string with `d3.csvFormat` to measure its length, and accesses the parsed array’s `length` and `columns` properties. The results are rendered into a `<pre>` element using standard DOM text content assignment.

AI-generated description

Uses d3's csv method to fetch and parse data from URL

Episode 15

MIT Licensed

Similar vizzes