Public
Edited
Jan 10, 2024
1 fork
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
value = data.filter(aq.escape((d) => d.radionuclide === rdn)).array("concentration")
Insert cell
depth = data.filter(aq.escape((d) => d.radionuclide === rdn)).array("depth")
Insert cell
time = data.filter(aq.escape((d) => d.radionuclide === rdn)).array("time")
Insert cell
formatTime = d3.timeFormat("%B %Y")
Insert cell
binsTime = d3.bin().thresholds(nBins)(time)
Insert cell
rangeTime = binsTime.map(
(d) => `${formatTime(d3.min(d))} - ${formatTime(d3.max(d))}`
)
Insert cell
domainTime = binsTime.map((d) => d3.min(d)).slice(1)
Insert cell
timeScale = d3.scaleThreshold().domain(domainTime).range(rangeTime)
Insert cell
timeScale(new Date("1989-08-01"))
Insert cell
binsDepth = d3.bin().thresholds(nBins)(depth)
Insert cell
domainDepth = binsDepth.map((d) => d.x0).slice(1)
Insert cell
rangeDepth = binsDepth.map((d) => `${d.x0}-${d.x1}`)
Insert cell
depthScale = d3.scaleThreshold().domain(domainDepth).range(rangeDepth)
Insert cell
formatDate = d3.timeFormat("%Y-%m-%d")
Insert cell
world = (
await fetch("https://cdn.jsdelivr.net/npm/world-atlas@2/land-50m.json")
).json()
Insert cell
land = topojson.feature(world, world.objects.land)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// source: https://observablehq.com/@mkfreeman/plot-tooltip
import { Plot } from "@mkfreeman/plot-tooltip"
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