Skip to main content
100%

Fork of Loading and Parsing CSV Data

✓ Published0🌍 Public
JJason Summercamp
Last edited Jun 14, 2022
Created on Jun 14, 2022

This example demonstrates the basic mechanics of loading and parsing CSV data in a web browser, displaying the file size, row count, and column count of the CSS Named Colors dataset from a GitHub gist. The primary implementation uses D3 v5’s `d3.csv` method with a promise chain, while commented-out alternatives show the same task using `fetch` with `async`/`await` and `d3.csvParse`, plus a nested promise “pyramid of doom” pattern. The rendered output is plain text in a large `<pre>` element, with a React-based counterpart provided in `index.js` using the `useEffect` hook to load data asynchronously.

AI-generated description
MIT Licensed

Similar vizzes