Sample Tabular Data: Fisher Iris

Source Notebook

Fisher's iris tabular data

Details

The data set consists of 50 samples from each of three species of iris flowers: setosa, versicolor, virginica. Four features were measured from each sample: sepal length and width, petal length and width.

Examples

Basic Examples (2) 

In[1]:=
ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Fisher Iris\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Fisher Iris-Input",
AutoDelete->True]\)]
Out[1]=

Dimensions:

In[2]:=
Dimensions[ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Fisher Iris\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Fisher Iris-Input",
AutoDelete->True]\)]]
Out[2]=

Column keys and types:

In[3]:=
ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Fisher Iris\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Fisher Iris-Input",
AutoDelete->True]\), "ColumnKeys"]
Out[3]=
In[4]:=
ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Fisher Iris\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Fisher Iris-Input",
AutoDelete->True]\), "ColumnTypes"]
Out[4]=

Scope & Additional Elements (1) 

Compute the mean of each measurement for each species variety:
In[5]:=
AggregateRows[ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Fisher Iris\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Fisher Iris-Input",
AutoDelete->True]\)], {"SepalLengthMean" -> Function[Mean[#SepalLength]], "SepalWidthMean" -> Function[Mean[#SepalWidth]], "PetalLengthMean" -> Function[Mean[#PetalLength]], "PetalWidthMean" -> Function[Mean[#PetalWidth]]}, "Species"]
Out[5]=

Visualizations (1) 

Plot sepal width vs sepal length for each iris species:

In[6]:=
iris2 = PivotToColumns[ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Fisher Iris\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Fisher Iris-Input",
AutoDelete->True]\)], "Species" -> {"SepalLength", "SepalWidth"}];

ListPlot[
 iris2 -> {{ExtendedKey["SepalLength", "setosa"], ExtendedKey["SepalWidth", "setosa"]}, {ExtendedKey["SepalLength", "versicolor"], ExtendedKey["SepalWidth", "versicolor"]}, {ExtendedKey[
     "SepalLength", "virginica"], ExtendedKey["SepalWidth", "virginica"]}}, AxesLabel -> {"SepalLength", "SepalWidth"}, PlotLegends -> {"setosa", "versicolor", "virginica"}]
Out[7]=

Gosia Konwerska, "Sample Tabular Data: Fisher Iris" from the Wolfram Data Repository (2024)  

Data Resource History

Source Metadata

See Also

Publisher Information