Public
Edited
Dec 12, 2023
Insert cell
Insert cell
Plot.plot({
width: 640,
height: 640,
inset: 2,
marks: [
Plot.dot(capitals, {x: "longitude", y: "latitude", r: 2.5, fill: "currentColor"}),
Plot.voronoi(capitals, {x: "latitude", y: "longitude", title: "state", pointerEvents: "all"}),
Plot.voronoi(capitals, {x: "longitude", y: "latitude", title: "state", pointerEvents: "all"})
]
})
Insert cell
us = FileAttachment("us-counties-10m.json").json()
Insert cell
nation = topojson.feature(us, us.objects.nation)
Insert cell
capitals = FileAttachment("us-state-capitals.csv").csv({typed: true})
Insert cell
factors = [ {factor:"emotion" ,x:3, y:6, intensity1:0, intensity2:5, status:"normal", category: "drug"},{factor:"body", x:-3, y:6, intensity1:75, intensity2:10, status:"normal", category: "body"},{factor:"self", x:3, y:-6, intensity1:45, intensity2:90, status:"normal", category: "consciousness"}]

Insert cell
Plot.plot({
width: 640,
height: 640,
inset: 200,
marks: [
Plot.dot(factors, {x: "x", y: "y", r: 2.5, fill: "pink"}),
Plot.voronoi(factors, {x: "x", y: "y", title: "state", pointerEvents: "all",stroke:"pink"}),
Plot.dot(factors, {x: "x", y: "intensity1", r: 2.5, fill: "black"}),
Plot.voronoi(factors, {x: "x", y:"intensity1", title: "state", pointerEvents: "all", stroke:"black"}),
Plot.dot(factors, {x: "x", y: "intensity2", r: 2.5, fill: "red"}),
Plot.voronoi(factors, {x: "x", y:"intensity2", title: "state", pointerEvents: "all", stroke:"red"}),
]
})
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