Unlisted
Edited
Aug 25, 2023
Insert cell
Insert cell
import { mobydick as letters } from "@observablehq/plot-group"
Insert cell
letterTable = aq
.table({ letter: letters })
.groupby("letter")
.count()
.orderby("count") // explictly ordered by count.
.reify()
Insert cell
Inputs.table(letterTable)
Insert cell
letterTable.objects().slice(0, 5) // the underlying object view is also in ascending order
Insert cell
Plot.plot({
marginLeft: 50,
y: {
grid: true
},
x: {
// Yet, I have to specify the domain to order it as the Arquero table is ordered. Why?
domain: letterTable.columnArray("letter")
},
marks: [Plot.barY(letterTable, { x: "letter", y: "count" }), Plot.ruleY([0])],
height: 170
})
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