Load the Palmer penguins dataset, an alternative to the Iris dataset, in Julia.
The Palmer penguins dataset by Allison Horst, Alison Hill, and Kristen Gorman is a dataset for data exploration & visualization, as an alternative to the Iris dataset.
The dataset contains data for 344 penguins. There are 3 different species of penguins in this dataset, collected from 3 islands in the Palmer Archipelago, Antarctica.
Data were collected and made available by Dr. Kristen Gorman and the Palmer Station, Antarctica LTER, a member of the Long Term Ecological Research Network.
Data are available by CC-0 license in accordance with the Palmer Station LTER Data Policy and the LTER Data Access Policy for Type I data.
More information about the dataset is available in its official documentation.
The simplified version of the raw data can be loaded by
julia> using PalmerPenguins
julia> table = PalmerPenguins.load()
This will download the data (both the simplified and the raw version) once using DataDeps.jl, displaying the information above and making it available for future use.
The prompt and the confirmation before downloading the data for the first time can be bypassed by setting the DATADEPS_ALWAYS_ACCEPT
environment variable.
In particular, this is required for non-interactive use such as in continuous integration tests.
The function PalmerPenguins.load()
returns a CSV.File
object that supports the Tables.jl interface.
For instance, it can be converted to a DataFrame
by executing
julia> using DataFrames
julia> df = DataFrame(table)
The raw data can be loaded with
julia> tableraw = PalmerPenguins.load(; raw = true)
If raw = false
(the default), then the simplified version is returned.
Gorman KB, Williams TD, Fraser WR (2014) Ecological Sexual Dimorphism and Environmental Variability within a Community of Antarctic Penguins (Genus Pygoscelis). PLoS ONE 9(3): e90081. https://doi.org/10.1371/journal.pone.0090081