Published
Edited
Sep 11, 2022
1 fork
Insert cell
Insert cell
pota = d3.json("https://api.pota.app/spot/activator")
Insert cell
viewof parks = {
const landmass = vl.markGeoshape()
//.data(vl.topojson("https://unpkg.com/world-atlas@2/countries-110m.json").feature("countries"));
.data(vl.topojson("https://unpkg.com/us-atlas@3/nation-10m.json").feature("nation"))
.encode(vl.stroke().value("lightgray"),
vl.color().value(null));
const points = vl.markCircle()
.data(pota)
.encode(
vl.longitude().fieldQ("longitude"),
vl.latitude().fieldQ("latitude"),
vl.color().fieldO("mode"));
return vl.layer(landmass, points)
.project(vl.projection("albersUsa"))
.render()
}
Insert cell
dotplot.legend("color")
Insert cell
dotplot=Plot.plot(
{y:{grid:true},
marks: [
Plot.dot(pota, {x:"longitude",y:"latitude",fill:"mode",size:"count"}),
Plot.text(pota, {x:"longitude",y:"latitude",text: ["x"]})
]});

Insert cell
Inputs.table(pota)
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