Public
Edited
Sep 25, 2023
Insert cell
Insert cell
viewof aggregation = Inputs.select(["day", "week", "month", "quarter"], {label: "Aggregation", value: "week"})
Insert cell
Plot.plot({
marks: [
Plot.ruleY([0]),
Plot.lineY(ordersByPeriod, {x: "start_date", y: "revenue"})
],
y: {tickFormat: "$s"}
})
Insert cell
pizzaOrders
SELECT DATE_TRUNC(${aggregation}, order_date) as start_date, sum(revenue) as revenue
FROM pizzaOrders
GROUP BY start_date
ORDER BY start_date
Insert cell
pizza
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
mta_daily_ridership_data__beginning_20209 = FileAttachment("MTA_Daily_Ridership_Data__Beginning_2020-9.csv").csv()
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