This 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) using D3.js.
For a more up to date code example with React & D3, see (VizHub: Stylized Scatter Plot)[https://vizhub.com/curran/3d631093c2334030a6b27fa979bb4a0d?edit=files&file=index.js].
I read the file for the iris data set from the URL at the UCI Machine Learning Website. The python code is below:
Import package
from urllib.request import urlretrieve
Import pandas
import pandas as pd
Assign url of file: url
iris = 'http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data'
Save file locally
urlretrieve(iris)
Read file into a DataFrame and print its head
df = pd.read_csv(iris, sep=',')
Add column names to the data frame
attributes = ["sepal_length", "sepal_width", "petal_length", "petal_width", "class"]
df.columns = attributes
View the first five lines of data frame
print(df.head())