Public
Edited
Jun 9, 2023
Insert cell
Insert cell
Insert cell
pizzeriaDB
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
classicOrders
X
order_date
Y
sum
orders
Color
day_of_week
Size
Facet X
Facet Y
Mark
area
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.auto(classicOrders, {
x: "order_date",
y: { value: "orders", reduce: "sum" },
color: "day_of_week",
mark: "area"
}).plot({ color: { legend: true, scheme: "Blues" }, marginLeft: 100 }) //어 팝업 왜 자동으로 뜨지..?
Insert cell
Plot.auto(classicOrders, {
x: "order_date",
y: { value: "orders", reduce: "sum" },
color: "day_of_week"
}).plot({ color: { legend: true, scheme: "Magma" }, marginLeft: 100 })
Insert cell
mta = FileAttachment("MTA_Daily_Ridership_Data__Beginning_2020.csv").csv()
Insert cell
viewof file = Inputs.file({label: "Data"})
Insert cell
pizzeriaDB
select * from stores
Insert cell
Insert cell
Insert cell
MTA_Daily_Ridership_Data__Beginning_2020.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
subways
X
Buses
Y
Subways
Color
Subways
Size
Buses
Facet X
Facet Y
Mark
dot
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.auto(subways, {
x: "Buses",
y: "Subways",
color: "Subways",
size: "Buses",
mark: "dot"
}).plot({ marginLeft: 100, color: { legend: true } })
Insert cell
Insert cell
viewof range = Inputs.range([0, 28], {label: "Moving Average Units", step: 1})
Insert cell
viewof color = Inputs.color({label: "Favorite color", value: "#4682b4"})
Insert cell
Plot.plot({
grid:true,
marks: [
Plot.ruleY([0]),
Plot.lineY(subways,{
x: "Date",
y: "Subways",
interval: d3.utcDay,
stroke:color
}),
Plot.lineY(subways,Plot.windowY({x: "Date", y: "Subways", interval: d3.utcDay, k:range}))
],
marginLeft:100,
marginRight: 50
})
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