Sample Tabular Data: Palmer Penguins

Source Notebook

Palmer penguins data

Details

Data for 344 of three different species of penguins, collected from three islands in the Palmer Archipelago, Antarctica.

Examples

Basic Examples (2) 

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

Dimensions:

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

Column keys and types:

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

Scope & Additional Elements (3) 

Tally each species per island:

In[5]:=
AggregateRows[ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Palmer Penguins\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Palmer Penguins-Input",
AutoDelete->True]\)], "species_count" -> Function[Length[#species]], {"species", "island"}]
Out[5]=

Find the mean body weight and max bill length for each species and each sex:

In[6]:=
AggregateRows[ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Palmer Penguins\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Palmer Penguins-Input",
AutoDelete->True]\)], {"body_mass_mean" -> Function[Mean[#"body_mass"]], "max_bill_length" -> Function[Max[#"bill_length"]]}, {"species", "sex"}]
Out[6]=

Find the mean body weight of each species at each island:

In[7]:=
PivotTable[ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Palmer Penguins\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Palmer Penguins-Input",
AutoDelete->True]\)], Function[Mean[#"body_mass"]], "species", "island"]
Out[7]=

Visualizations (3) 

Number of each species:

In[8]:=
Histogram[ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Palmer Penguins\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Palmer Penguins-Input",
AutoDelete->True]\)] -> "species"]
Out[8]=

Number of penguins on each island:

In[9]:=
AggregateRows[ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Palmer Penguins\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Palmer Penguins-Input",
AutoDelete->True]\)], "count" -> Function[Length[#island]], "island"]
Out[9]=
In[10]:=
PieChart[% -> "count", ChartLabels -> Normal[%[All, "island"]]]
Out[10]=

Plot bill depth vs bill length for each penguin species:

In[11]:=
ppenguins = PivotToColumns[ResourceData[\!\(\*
TagBox["\"\<Sample Tabular Data: Palmer Penguins\>\"",
#& ,
BoxID -> "ResourceTag-Sample Tabular Data: Palmer Penguins-Input",
AutoDelete->True]\)], "species" -> {"bill_length", "bill_depth"}];

ListPlot[
 ppenguins -> {{ExtendedKey["bill_length", "Adelie"], ExtendedKey["bill_depth", "Adelie"]}, {ExtendedKey["bill_length", "Gentoo"], ExtendedKey["bill_depth", "Gentoo"]}, {ExtendedKey["bill_length", "Chinstrap"], ExtendedKey["bill_depth", "Chinstrap"]}}, AxesLabel -> {"bill_length", "bill_depth"}, PlotLegends -> {"Adelie", "Gentoo", "Chinstrap"}]
Out[12]=

Gosia Konwerska, "Sample Tabular Data: Palmer Penguins" from the Wolfram Data Repository (2024)  

Data Resource History

Source Metadata

See Also

Data Downloads

Publisher Information