Public
Edited
Mar 9, 2023
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.ruleY([0]),
Plot.lineY(aapl, {x: "Date", y: "Close"})
]
})
Insert cell
Insert cell
Insert cell
data = teamFile.map(d => {
const year = parseInt(d.yearID)
const name = d.name
const HR = parseInt(d.HR)
return {year:year,name:name,HR:HR}
})
.filter(d=> d.year >= decade)
.filter(d => d.year <= decade+9)
.filter(d => d.name == select)

Insert cell
data
Insert cell
Insert cell
Insert cell
Plot.plot({
x:{domain:[decade,decade+9],tickFormat:".0f"},
y:{domain: [0,300]},
marks: [
Plot.ruleY([0]),
Plot.lineY(data, {x: "year", y: "HR"}),
Plot.dot(data,{x:"year",y:"HR"})
]
})
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