Published
Edited
Jan 8, 2022
13 stars
Insert cell
Insert cell
Insert cell
highlights = [
d3.timeHour.range(
new Date("2022-01-06").setHours(16),
new Date("2022-01-06").setHours(21),
1
),
d3.timeHour.range(
new Date("2022-01-07").setHours(16),
new Date("2022-01-07").setHours(21),
1
),
d3.timeHour.range(
new Date("2022-01-08").setHours(16),
new Date("2022-01-08").setHours(21),
1
)
].flat()
Insert cell
Plot.plot({
marks: [
Plot.line(all_data, {
x: "azimuth",
y: "altitude",
z: "day",
curve: "natural",
stroke: "#ddd"
}),
Plot.line(highlights_data, {
x: "azimuth",
y: "altitude",
z: "day",
curve: "natural"
}),
Plot.ruleY([0]),
Plot.ruleX([kitchen[0].cone[0], kitchen[0].cone[1]])
]
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
fetchMoonDataWithZ = (weekDays) =>
weekDays
.map((t) => {
const data = SunCalc.getMoonPosition(t, 52.48, 13.43);
return {
datetime: t,
day: d3.timeFormat("%Y/%m/%d")(t),
altitude: radianToDegrees(data.altitude),
azimuth: radianToDegrees(data.azimuth) + 166
};
})
.flat()
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