Public
Edited
Jul 15, 2023
Insert cell
Insert cell
Insert cell
Calendar(weather, {
value: "daily_rainfall_total",
textFill: "black",
color: { scheme: "blues", type: "sqrt", legend: true }
})
Insert cell
import { Calendar } from "@observablehq/calendar-component"
Insert cell
// // Plot goes here
// addTooltips(
// Plot.plot({
// height: 1000,
// width: 0.9 * width,
// x: {
// axis: null,
// padding: 0
// },
// y: {
// padding: 0,
// tickFormat: Plot.formatWeekday("en", "narrow"),
// tickSize: 0
// },
// fy: {
// reverse: true
// },
// facet: {
// data: weather,
// y: (d) => String(d.dateParsed.getUTCFullYear())
// },
// color: {
// type: "diverging",
// scheme: "GnBu"
// },
// style: {
// fontSize: 15
// },
// marks: [
// Plot.cell(weather, {
// x: (d) => d3.utcWeek.count(d3.utcYear(d.dateParsed), d.dateParsed),
// y: (d) => d.dateParsed.getUTCDay(),
// fill: (d) => d.daily_rainfall_total,
// title: (d) => `${d.daily_rainfall_total}mm\non ${d.date}`
// // inset: 0.5
// }),
// // manually marking out the week of the year that August starts...
// Plot.ruleX([30])
// ]
// })
// )
Insert cell
Insert cell
// Only one weather station?

weatherStations = [...new Set(weather.columnArray("station"))]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more