🐧 Palmer Penguins

Massage data in python - visualize in ObservableJS

Run all python cells, then change and run the body-mass quantile cell below, to have the plot update.

from palmerpenguins import load_penguins
penguins = load_penguins()
penguins_clean = penguins  \
                 .dropna() \
                 .drop(columns=['island', 'year'])
penguins_clean
1.5s
bmqt = penguins_clean["body_mass_g"].quantile(0.95)
df = penguins_clean[penguins_clean["body_mass_g"] < bmqt]
df.to_csv('/results/penguins.csv', index=False)
body-mass quantile
0.1s
data = FileAttachment("penguins.csv").csv({typed: true})
Plot.dot(data, {x: "flipper_length_mm", 
                y: "body_mass_g", 
                fill: "species", 
                title: "species"}).plot({ grid: true })

Appendix

pip install palmerpenguins
3.5s

Runtimes (3)