Published
Edited
May 20, 2022
Insert cell
# My First Scatterplot
Insert cell
Plot.plot({
marks: [
Plot.dot(cars, {x: "power (hp)", y: "economy (mpg)"})
]
})
Insert cell
cars
Insert cell
data101 = FileAttachment("data101.xlsx").xlsx()
Insert cell
nycData = data101.sheet(0, { headers: true })
Insert cell
Plot.plot({
marks: [
Plot.dot(nycData, {x: "date", y: "medianAskingPrice", fill: "neighborhood"})
],
color: { legend: true },
marginLeft: 60
})
Insert cell
Plot.plot({
marks: [
Plot.dot(nycData, {x: "date", y: "medianAskingPrice", fill: "neighborhood", r: "priceCutShare"})
],
color: { legend: true },
marginLeft: 60
})
Insert cell
Plot.plot({
marks: [
Plot.dot(nycData, {x: "date", y: "medianAskingPrice", fill: "neighborhood", r: "priceCutShare"}),
Plot.line(nycData, { x: "date", y: "medianAskingPrice", stroke: "neighborhood"}),
Plot.ruleY([0])
],
color: { legend: true },
marginLeft: 60
})
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