Skip to main content
100%

Parsing CSV with D3

✓ Published0🌍 Public
IIlgar Akalın
Last edited Sep 19, 2021
Created on Sep 17, 2021

This example demonstrates how to parse CSV data with D3, displaying a concise summary of the dataset's size and structure. It fetches a CSS named colors CSV from a GitHub gist, then uses `d3.csv` to asynchronously load and parse the data. The code counts the rows and columns, estimates the file size in kilobytes using `d3.csvFormat`, and presents the results as text in a `<pre>` element. An alternative commented-out approach using `fetch`, `d3.csvParse`, and `csvFormat` is also included.

AI-generated description

Parsing CSV Data with D3

Includes:

  • Parsing the csv..
  • Counting rows & columns..
  • Estimating data size..
  • Constructing & displaying text D3 & CSS.
  • Using d3.csv, csvParse & csvFormat.
MIT Licensed

Similar vizzes