Penguins

Published

Saturday, the 5 of August, 2023

Gentoo Penguins - Kerguelen Islands Antoine Lamielle, CC BY-SA 4.0, via Wikimedia Commons

Penguins dataset contains size measurements from adults foraging near Palmer Station, Antarctica.

Let us load the dataset. It is a CSV file.

penguins = FileAttachment("./data/penguins.csv").csv(
    { typed: true }
)

Descriptive statistics

Let us plot the body mass against the flipper length.

theme_obj = FileAttachment("../../../styles/plots/geekus.ojs.json").json()
theme = theme_obj.scheme
Plot.plot({
    color: {
        legend: true,
        range: theme
    },
    marks: [
        Plot.dot(penguins, {
            x: "body_mass_g",
            y: "flipper_length_mm",
            color: "species",
            size: "body_mass_g",
            tooltip: "species"
        })
    ]
})