Palmer Penguins dataset

A Brightfield dashboard of the Palmer Penguins. The main panel plots bill depth against bill length, coloured by species, under the title "Longer bills are shallower across all penguins (r = −0.24), but deeper within each species (r = 0.39 to 0.65): the overall trend is the species mix". Below it, a histogram of flipper length; beside it, counts by species, by island, and of complete records.

Bill length and depth, flipper length, body mass and sex for 344 Adélie, Chinstrap and Gentoo penguins on three islands near Palmer Station, Antarctica, from 2007 to 2009. Dr. Kristen Gorman collected the data with the Palmer Station Long Term Ecological Research program, and Allison Horst, Alison Hill and Kristen Gorman published it in the palmerpenguins R package under CC0. The source writes a missing value as NA, and the recipe reads it as missing.

Load it

These commands install arc, Meridian’s open-source Protocol runner, clone the open-analytics repository and run this Protocol, which writes build/penguins.parquet in open-analytics/examples/palmer-penguins.

shell
curl -fsSL https://install.meridian.online/arc | bash
git clone https://github.com/meridian-online/open-analytics
cd open-analytics/examples/palmer-penguins && arc run

arc runs the Protocol’s SQL on DuckDB 2.x, which its installer puts in place when no DuckDB is on your PATH, saying what to add to PATH; the last step, which describes the Parquet, needs finetype 0.6.54 or later on your PATH.

Columns

NameTypeDescription
speciesstringAdelie, Chinstrap or Gentoo.
islandstringBiscoe, Dream or Torgersen, in the Palmer Archipelago.
bill_length_mmnumberBill (culmen) length, in millimetres. Missing for two penguins whose bill was not measured.
bill_depth_mmnumberBill (culmen) depth, in millimetres.
flipper_length_mmintegerFlipper length, in millimetres.
body_mass_gintegerBody mass, in grams.
sexstringfemale or male, as recorded; missing where the source has NA.
yearyearThe year the penguin was studied, 2007 to 2009.
record_statusstringcomplete, bill not measured, or sex not recorded: which part of the record, if any, the source left as NA.

Source and licence

Licence

Sources

Meridian hosts none of this data: the Protocol downloads it, from the address its fetch step names, when you run it.

The steps

5 stepsduckdb >=1.2

Every step runs in order. op: steps are typed, versioned operators; sql: steps are DuckDB models.

  1. 01fetch_penguinsop: http_fetch@1

    Fetch penguins.csv from the palmerpenguins package's own repository, pinned to a commit and by sha256.

    producesbuild/penguins.csv
    with
    url: https://raw.githubusercontent.com/allisonhorst/palmerpenguins/8957207b78d6ccd1b4654a9dd9c9041b657478ab/inst/extdata/penguins.csv
    out: build/penguins.csv
    sha256: f204db2c753b0937caac3cb35258562c14f073e4bbc76be24b4c51ce22767a93
    headers:
      User-Agent: Meridian Protocol (open-analytics demo; research@meridian.online)
  2. 02raw_penguinssql: models/01_raw_penguins.sql

    Read the CSV as it arrives, every column as text, since it writes a missing value as the string NA.

    readsbuild/penguins.csvproducesraw_penguins
    model
    models/01_raw_penguins.sql
  3. 03penguinssql: models/02_penguins.sql

    Read NA as missing, type each measure, and say whether each penguin's record is complete.

    producespenguins
    model
    models/02_penguins.sql
  4. 04export_penguinsop: parquet_export@1

    Write build/penguins.parquet, the file this Protocol ends in, on your own disk. ORDER BY ALL makes the bytes reproducible.

    readspenguinsproducesbuild/penguins.parquet
    with
    input: penguins
    dest: build/penguins.parquet
    compression: zstd
    order_by: ALL
  5. 05describeop: datapackage_describe@1

    Emit datapackage.json from the built Parquet: finetype types every column, and descriptor.overrides.json adds the curated title, licence, sources and per-field prose.

    readsbuild/penguins.parquetdescriptor.overrides.jsonproducesdatapackage.json
    with
    parquet: build/penguins.parquet
    overrides: descriptor.overrides.json
    out: datapackage.json