Public
Edited
Feb 14
1 fork
4 stars
Insert cell
Insert cell
Plot.plot({
projection: { type: "albers-usa" },
color: {
type: "linear",
scheme: "RdYlBu",
domain: [0, 2.5],
legend: true,
label: "Water vapor (cm)"
},
marks: [
Plot.raster(vapor, {
fill: Plot.identity,
width: 360,
height: 180,
x1: -180,
y1: 90,
x2: 180,
y2: -90,
interpolate: "barycentric",
blur: 10,
clip: nation
}),
Plot.contour(vapor, {
value: Plot.identity,
width: 360,
height: 180,
x1: -180,
y1: 90,
x2: 180,
y2: -90,
interpolate: "barycentric",
blur: 10,
thresholds: 40,
strokeWidth: 0.5,
clip: nation
}),
Plot.geo(nation)
]
})
Insert cell
vapor = FileAttachment("water-vapor.csv").csv({array: true}).then(rows => rows.flat().map((x) => (x === "99999.0" ? NaN : +x)))
Insert cell
us = FileAttachment("us-counties-10m.json").json()
Insert cell
nation = topojson.feature(us, us.objects.nation)
Insert cell
Plot = import("https://cdn.jsdelivr.net/npm/@observablehq/plot@0.6.17/+esm") // TODO remove
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