Reporting on the bill length of penguins

Author

Myles Mitchell & Parisa Gregg

Published

December 14, 2022

Abstract

Prepare yourself for a life-changing article about penguins…

Introduction

Penguins are a family (Spheniscidae) of aquatic flightless birds that live primarily in the Southern Hemisphere. Their diet consists of:

  • Krill
  • Fish
  • Squid
  • More fish

There are 18 species of penguin, including:

  1. Macaroni penguin (Eudyptes chrysolophus)
  2. Chinstrap penguin (Pygoscelis antarcticus)
  3. Gentoo penguin (Pygoscelis papua)

Methods

To determine whether a higher body mass implies a longer bill, we loaded a penguins dataset using pandas:

import pandas as pd

data = pd.read_csv(
    'https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-28/penguins.csv'
)
data.head()
species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g sex year
0 Adelie Torgersen 39.1 18.7 181.0 3750.0 male 2007
1 Adelie Torgersen 39.5 17.4 186.0 3800.0 female 2007
2 Adelie Torgersen 40.3 18.0 195.0 3250.0 female 2007
3 Adelie Torgersen NaN NaN NaN NaN NaN 2007
4 Adelie Torgersen 36.7 19.3 193.0 3450.0 female 2007

Results

The figure below shows the bill length plotted as a function of the body mass for three species across a 3-year period.

Bill length as a function of body mass

According to our data, the average bill length is 43.9 mm.