Fork of Loading Data
✓ Published0🌍 Public
This example demonstrates asynchronous data loading with D3 v7 by fetching and parsing the Iris Dataset from a local CSV file. It shows the raw parsed data as a JSON-formatted text preview inside a `<pre>` element, updating the view once the data arrives. The visualization uses `fetch()` to request `data.csv`, converts the response text with `d3.csvParse`, and coerces numeric columns to numbers before storing them in state. The `viz.js` module manages a loading state, initially rendering nothing until the data is processed, then displaying the full dataset structure.
AI-generated descriptionLoading a CSV file, the Iris Dataset.
MIT Licensed