Skip to main content
100%

Loading Data - Coffee

✓ Published0🌍 Public
MMatt Hagger
Last edited Sep 3, 2025
Created on Sep 3, 2025
Forked from Loading Data

A D3.js example demonstrates asynchronous data loading from a CSV file. It displays the raw parsed dataset as JSON in a `<pre>` element, showing coffee purchase records with fields like time of day, coffee type, and price. The visualization uses `d3.csvParse` to convert the CSV text, then explicitly coerces numeric columns like `hour_of_day` and `money` to numbers. State management tracks loading status, transitioning from undefined to `'LOADING'` to the final array of objects via `fetch` and promises.

AI-generated description
MIT Licensed

Similar vizzes