Public
Edited
Sep 20, 2023
7 stars
Insert cell
Insert cell
Plot.plot({
style: `background-color: rgb(145,203,217)`,
width,
height: width,
axis: null,
marks: [
Plot.areaY(
msl,
Plot.windowY({
x: time,
y: msl,
k: 3,
curve: "basis",
fill: "rgb(7,92,156)"
})
)
]
})
Insert cell
Insert cell
Insert cell
nc = import("https://esm.sh/netcdfjs@3?min")
Insert cell
data = FileAttachment("ESACCI-SEALEVEL-IND-MSL-MERGED-20161202000000-fv02.nc")
.arrayBuffer()
.then((buffer) => new nc.NetCDFReader(buffer))
Insert cell
data.variables
Insert cell
Insert cell
msl = data.getDataVariable("global_msl")
Insert cell
Insert cell
day0 = d3.isoParse("1950-01-01")
Insert cell
time = data.getDataVariable("time").map((d) => d3.utcDay.offset(day0, d))
Insert cell
Insert cell
Plot.areaY(msl, { x: time, y: msl }).plot()
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