Public
Edited
Apr 12, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
x: {
grid: true
},
marks: [
Plot.barX(
pizzaorders,
Plot.groupY(
{
x: "count",
title: "count"
},
{ y: (d) => d.category }
)
),
Plot.ruleX([0])
]
})
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.barY(
pizzaorders,
Plot.groupX(
{ y: "count" },
{
x: "state",
fill: "category",
title: "category"
}
)
),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
y: {
grid: true
},
marks: [
Plot.barY(
pizzaorders,
Plot.groupX(
{ y: "count" },
{
x: "category",
fill: "day_of_week",
title: "day_of_week"
}
)
),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.barY(
dayFiltered,
Plot.groupX(
{ y: "count" },
{
x: "category",
fill: "day_of_week",
title: (d) => `Day ${d.day_of_week}`
}
)
)
],
y: {
label: "Orders ↑"
},
width,
label: "Days of week",
color: {
scheme: "ylorrd",
legend: true,
type: "threshold",
domain: [1, 2, 3, 4, 5, 6]
}
})
Insert cell
Insert cell
Insert cell
import { pizzaorders } from "@observablehq/data-vis-course-assignment"
Insert cell
import { Plot } from "@mkfreeman/plot-tooltip"
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