penguins

Morphological measurements for 344 penguins (Palmer Archipelago).

Each row is one penguin observation. Columns:

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):

References:

Usage

penguins

Examples

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(),
)

Table of the first five rows of the penguins dataset with columns species, island, bill measurements, flipper length, body mass, and sex.

Table of the first five rows of the penguins dataset with columns species, island, bill measurements, flipper length, body mass, and sex.

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,
)

Scatter chart of body mass against flipper length for 344 penguins, coloured, filled, and shaped by species (Adelie, Chinstrap, Gentoo), with a linear smoother and 95 percent confidence band per species; mass rises with flipper length and Gentoo separates clearly.

Scatter chart of body mass against flipper length for 344 penguins, coloured, filled, and shaped by species (Adelie, Chinstrap, Gentoo), with a linear smoother and 95 percent confidence band per species; mass rises with flipper length and Gentoo separates clearly.

Back to top