Public
Edited
Jan 1, 2023
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width,
height: width / 2,
marks: [
Plot.ruleY([0]),
...data.map((d) =>
Plot.lineY(getMinuteInfo(d.solarNoon), {
x: "hour",
y: "altitudeDegrees",
strokeOpacity: 0.1
})
),
Plot.lineY(getMinuteInfo(date), {
x: "hour",
y: "altitudeDegrees",
stroke: "#01579b"
}),
Plot.dot([getSunInfo(date)], {
x: "hour",
y: "altitudeDegrees",
fill: "#01579b",
r: 5
})
]
})
Insert cell
Insert cell
data = dateRange(startOfYear(date), endOfYear(date)).map((d) => getSunInfo(d))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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