David Tetteh Kwao 2022-10-31
The Palmer Penguins dataset is comprising various measurements of three different penguin species, namely Adelie, Gentoo, and Chinstrap. The dataset contains 344 observations.
The rigorous study was conducted in the islands of the Palmer Archipelago, Antarctica. These data were collected from 2007 to 2009 by Dr. Kristen Gorman with the Palmer Station Long Term Ecological Research Program, part of the US Long Term Ecological Research Network.
library(tidyverse)## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6 ✔ purrr 0.3.5
## ✔ tibble 3.1.8 ✔ dplyr 1.0.10
## ✔ tidyr 1.2.1 ✔ stringr 1.4.1
## ✔ readr 2.1.3 ✔ forcats 0.5.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
library(palmerpenguins)Here we will go through a series of visualization
Here, we plot flipper length against body mass
ggplot(data = penguins, aes(x = flipper_length_mm, y = body_mass_g))+
geom_point(color = "purple")## Warning: Removed 2 rows containing missing values (geom_point).
Here, we plot filpper body length against body mass and look at the breakdown by species
ggplot(data = penguins, aes(x = flipper_length_mm, y = body_mass_g))+
geom_point(aes(shape = species))## Warning: Removed 2 rows containing missing values (geom_point).
Here, we plot flipper length against body mass and look at and look at the break down by species and sex
ggplot(data = penguins, aes(x = flipper_length_mm, y = body_mass_g))+
geom_point(aes(color = species
, shape = species))+
facet_wrap(~sex)## Warning: Removed 2 rows containing missing values (geom_point).