Public
Edited
Apr 8, 2023
Insert cell
Insert cell
import {pizzaorders} from "@observablehq/data-vis-course-assignment"
Insert cell
pizzaorders
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({
marks: [
Plot.barX(pizzaorders, Plot.groupY({x: "count"}, {y: "name", sort: {y: "x", reverse: false},
fill: d => d.category === "Vegetarian" ? "#b6d7a8" : (d.category === "Specialty" ? "#8e81b7" : "lightgray")})),
Plot.ruleX([0])
],
marginLeft: 50,
width
})
Insert cell
Plot.plot({
marks: [
Plot.dot(pizzaorders, {x: "total", y: "orders", fill: d => d.category === "Vegetarian" ? "#b6d7a8" : (d.category === "Specialty" ? "#8e81b7" : "lightgray")})
]
})
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