Public
Edited
Apr 16, 2023
Paused
Insert cell
Insert cell
Plot.plot({
caption: "The river breakup time varies a bunch, but it has been tending towards earlier days of the year.",
width,
nice: true,
color: {
legend: true
},
x: {
tickFormat: "d",
},
y: {
grid: true
},
marks: [
// Plot.ruleY([0]),
Plot.line(iceClassic, { y: "Decimal Day of Year", x: "Year" }),
Plot.dot(iceClassic, {
y: "Decimal Day of Year",
x: "Year",
fill: d => d.am ? "AM" : "PM",
r: 4,
title: "date"
}),
Plot.linearRegressionY(iceClassic, { y: "Decimal Day of Year", x: "Year" }),
]
})
Insert cell
Plot.plot({
caption: "The majority of river breakups since 1917 have happened in the afternoon and evening.",
marks: [
Plot.rectY(iceClassic, Plot.binX({y: "count"}, {x: "hour", thresholds: 30, title: "hour", fill: "am"})),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
Insert cell
months = ({
"April": 4,
"May": 5
})
Insert cell
iceClassic = T.tidy(
nenana,
T.mutate({
date: d => new Date(2000, months[d.Month] - 1, d.Day, d.Time.split(":")[0], d.Time.split(":")[1]),
hour: d => +d.Time.split(':')[0],
am: d => d.hour < 12
})
)
Insert cell
NenanaIceClassic_1917-2021.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

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