The Iris Dataset
This example visualizes the classic Iris dataset, showing the first row of data as formatted JSON in a large monospace font on the page. It demonstrates how to load and import a CSV dataset using a custom `index.js` module, parsing numeric columns with unary plus operators. The visualization uses plain DOM manipulation via `container.innerHTML` to render the data, with a fixed font size of 51 pixels and a left margin. The data originates from the UCI Machine Learning Repository and is imported from a local `data.csv` file.
AI-generated descriptionThis is the "Iris" dataset. Originally published at UCI Machine Learning Repository: Iris Data Set, this small dataset from 1936 is often used for testing out machine learning algorithms and visualizations (for example, Scatter Plot). Each row of the table represents an iris flower, including its species and dimensions of its botanical parts, sepal and petal, in centimeters.
The HTML page provides the basic code required to load the data and display it on the page (as JSON).
See also https://gist.github.com/curran/a08a1080b88344b0c8a7
You can import this dataset in your viz like this:
import { data } from '@curran/iris-dataset';
As an example of that kind of import, see Interactive Color Legend.