knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(palmerpenguins)
You can also get this penguin data directly from the Environmental Data Initiative (EDI) using the R code below. Thanks to Julien Brun for the reminder and code below to access & combine them (will get you same data as penguins_raw
):
# Adelie penguin data from: https://doi.org/10.6073/pasta/abc50eed9138b75f54eaada0841b9b86 uri_adelie <- "https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-pal.219.3&entityid=002f3893385f710df69eeebe893144ff" # Gentoo penguin data from: https://doi.org/10.6073/pasta/2b1cff60f81640f182433d23e68541ce uri_gentoo <- "https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-pal.220.3&entityid=e03b43c924f226486f2f0ab6709d2381" # Chinstrap penguin data from: https://doi.org/10.6073/pasta/409c808f8fc9899d02401bdb04580af7 uri_chinstrap <- "https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-pal.221.2&entityid=fe853aa8f7a59aa84cdd3197619ef462" # Combining the URIs uris <- c(uri_adelie, uri_gentoo, uri_chinstrap) # Downloading and importing data library(purrr) library(readr) penguins_lter <- map_dfr(uris, read_csv)
Compared to ?penguins_raw
:
head(penguins_raw)
But if that looks too messy for you, ?penguins
is simpler and tidier:
head(penguins)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.