Published unlisted
Edited
Aug 3, 2021
Insert cell
Insert cell
import { data } from "@observablehq/plot-exploration-penguins"
Insert cell
Insert cell
Plot.barY(
data,
Plot.reverse(
Plot.sort(
"y", // 🌶 fails to sort (since it returns undefined)
Plot.groupX({ y: "count" }, { x: "island", fill: "sex" })
)
)
).plot()
Insert cell
Insert cell
Plot.barY(
data,
Plot.reverse(
Plot.sort(
(bin) => bin.length,
Plot.groupX({ y: "count" }, { x: "island", fill: "sex" })
)
)
).plot()
Insert cell
Plot = require(await FileAttachment("plot.umd.js").url())
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more