Islands and species

Published

October 30, 2023

Introduction

In this analysis we take a look at how body masses of penguins vary across islands and species.

Code
import pandas as pd
import seaborn as sns 
from palmerpenguins import load_penguins

sns.set_style('whitegrid')
penguins = load_penguins()

Analysis

The side-by-side box plots reveal that penguins’ body masses across islands and species, except for Gentoo penguins which weigh more, on average.

Code
g = sns.boxplot(x = 'island',
            y ='body_mass_g',
            hue = 'species',
            data = penguins,
            palette=['#FF8C00','#159090','#A034F0'],
            linewidth=0.3)
g.set_xlabel('Island')
g.set_ylabel('Body Mass')
Text(0, 0.5, 'Body Mass')