Public
Edited
Jan 27, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.dot(cars, {x: "power (hp)", y: "weight (lb)", stroke: "cylinders"})
]
})
Insert cell
Insert cell
Insert cell
cars
Insert cell
table_by_rows = [{person: "Ian", country: "United States"}, {person: "Enora", country: "France"}]
Insert cell
table_by_columns = ({name: ["Ian", "Enora"], country: ["United States", "France"]})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
FileAttachment("data101.xlsx").xlsx()
Insert cell
Insert cell
nycSpreadsheet = FileAttachment("data101.xlsx").xlsx()
Insert cell
Insert cell
nycData = nycSpreadsheet.sheet(0, { headers: true })
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.dot(nycData, {x: "date", y: "medianAskingPrice"})
]
})
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.dot(nycData, {x: "date", y: "medianAskingPrice", fill: "neighborhood"})
],
marginLeft: 100
})
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.dot(nycData, {x: "date", y: "medianAskingPrice", fill: "neighborhood"})
],
color: { legend: true },
marginLeft: 100
})
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.dot(nycData, {x: "date", y: "medianAskingPrice", r: "priceCutShare", fill: "neighborhood"})
],
color: { legend: true },
marginLeft: 100
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.ruleY([0]),
Plot.line(nycData, { x: "date", y: "medianAskingPrice", stroke: "neighborhood"}),
Plot.dot(nycData, {x: "date", y: "medianAskingPrice", fill: "neighborhood", r: "priceCutShare"}),
],
color: { legend: true },
marginLeft: 100,
})
Insert cell
Insert cell
Insert cell
Plot.plot({
facet: {
data: nycData,
y: "borough",
marginRight: 100,
},
marks: [
Plot.frame({ stroke: "lightgray" }),
Plot.ruleY([0]),
Plot.dot(nycData, {x: "date", y: "medianAskingPrice", fill: "neighborhood", r: "priceCutShare"}),
Plot.line(nycData, { x: "date", y: "medianAskingPrice", stroke: "neighborhood", z: "neighborhood"}),
],
color: { legend: true },
marginLeft: 100,
})
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