Public
Edited
Mar 26, 2023
1 fork
Insert cell
Insert cell
import {pizzaorders} from "@observablehq/data-vis-course-assignment"
Insert cell
pizzaorders
Insert cell
Plot.plot({
marks: [
Plot.barY(pizzaorders, Plot.groupX({y: "sum"}, {x: "day_of_week", y: "orders", fill: "state"})),
Plot.ruleY([0])
],
y: {
label: "↑ Orders (x 1000)",
grid: true,
transform: d => d / 1000
},
color: {
legend: true
},
marginLeft: 50
})
Insert cell
Plot.plot({
// facet: {
// data: pizzaorders,
// x: "state"
// },
marks: [
Plot.lineY( pizzaorders, Plot.groupX({y: "sum"}, {x: "orderDate", y:"total", z: "category", stroke: "category"}))
],
color: {
legend: true
},
marginLeft: 50
})
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