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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more