penguins
Morphological measurements for 344 penguins (Palmer Archipelago).
Each row is one penguin observation. Columns:
species(string:"Adelie","Chinstrap","Gentoo").island(string:"Torgersen","Biscoe","Dream")."bill-len"(culmen length, mm; float, may benone)."bill-dep"(culmen depth, mm; float, may benone)."flipper-len"(flipper length, mm; int, may benone)."body-mass"(body mass, g; int, may benone).sex(string:"male","female"; may benone).year(int: 2007, 2008, or 2009).
The bundled literal is stored in column-store form; plot accepts either column-store or row-store input and normalises internally.
Source: bundled from the R datasets package; see help("penguins") in R. Compiled for R by Kaye E, Turner H, Gorman KB, Horst AM, Presmanes Hill A (2025), doi:10.5281/zenodo.14902740.
Original data: Palmer Station Antarctica LTER, Gorman KB (2020):
- Adelie: doi:10.6073/pasta/98b16d7d563f265cb52372c8ca99e60f.
- Gentoo: doi:10.6073/pasta/7fca67fb28d56ee2ffa3d9370ebda689.
- Chinstrap: doi:10.6073/pasta/c14dfcfada8ea13a17536e73eb6fbe9e.
References:
- Gorman KB, Williams TD, Fraser WR (2014). Ecological Sexual Dimorphism and Environmental Variability within a Community of Antarctic Penguins (Genus Pygoscelis). PLoS ONE, 9(3), e90081, doi:10.1371/journal.pone.0090081.
- Horst AM, Presmanes Hill A, Gorman KB (2022). Palmer Archipelago Penguins Data in the palmerpenguins R Package: An Alternative to Anderson’s Irises. The R Journal, 14(1), 244-254, doi:10.32614/RJ-2022-020.
Usage
penguinsExamples
Preview the first five entries (out of 344).
#let cols = penguins.pairs()
#let cell(v) = if v == none { text(fill: gray, [_none_]) } else { [#v] }
#table(
columns: cols.len(),
align: center + horizon,
inset: 5pt,
stroke: 0.5pt,
..cols.map(p => strong(raw(p.at(0)))),
..range(5).map(i => cols.map(p => cell(p.at(1).at(i)))).flatten(),
)Flipper length vs body mass, coloured, filled, and shaped by species.
#plot(
data: penguins,
mapping: aes(
x: "flipper-len",
y: "body-mass",
colour: "species",
fill: "species",
shape: "species",
),
layers: (
geom-point(size: 2pt, stroke: 0.5pt, alpha: 0.5),
geom-smooth(method: "lm", se: true, alpha: 0.2),
),
scales: (
scale-x-continuous(),
scale-y-continuous(),
scale-colour-discrete(
palette: (rgb("#ff8c00"), rgb("#800080"), rgb("#008B8B")),
),
scale-fill-discrete(
palette: (rgb("#ff8c00"), rgb("#800080"), rgb("#008B8B")),
),
),
labs: labs(
title: "Penguins Dataset",
subtitle: "Flipper length vs body mass by species",
caption: "Palmer Archipelago (Antarctica) penguin dataset",
colour: "Species",
fill: "Species",
shape: "Species",
x: "Flipper Length (mm)",
y: "Body Mass (g)",
),
theme: theme-minimal(),
width: 11cm,
height: 7cm,
)