Public
Edited
Apr 24, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mta
Insert cell
Plot.plot({
marks: [
Plot.barY(alphabet, {
x: "letter",
y: "frequency",
fill:"beige",
sort: {x: "y", reverse: true}
}),
Plot.ruleY([0])
]
})
Insert cell
d3.json("https://data.ny.gov/resource/vxuj-8kew.json")
Insert cell
Insert cell
import {pizzeriaDB} from "@observablehq/pizza-paradise-data"
Insert cell
pizzeriaDB
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
pizzeriaDB
SELECT "orderDate"::date as "Date"
, count(*)::int as orders
,sum(nItems::int)::int as items
, sum(total::int)::int as revenue
FROM "orders"
GROUP BY 1
ORDER BY 1 ASC
Insert cell
viewof color = Inputs.color({label: "Favorite color", value: "#26c6a6"})
Insert cell
viewof range = Inputs.range([0, 100], {label: "Amount", step: 1})
Insert cell
SSENsVisualization = Plot.plot({
marks: [
Plot.lineY(ordersByDay, {
x: "Date",
y: "orders",
interval: d3.utcDay, //utcDay, utcMonth
stroke:"lightgrey"
}),
Plot.lineY(ordersByDay, Plot.windowY({
x: "Date",
y: "orders",
interval: d3.utcDay, //utcDay, utcMonth
k:range,
stroke:color
})),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
Insert cell
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