Published
Edited
Jun 11, 2020
Insert cell
Insert cell
{
const spot = vl.selectSingle().on('click')
const map = vl.markGeoshape({fill: '#ddd', stroke: '#fff', strokeWidth: 1})
.data(vl.topojson('data/us-10m.json').feature('states'))
.encode(
vl.tooltip('datum.latitude')
)
.project(vl.projection('albersUsa'))
return map.render({renderer: "svg"})
}
Insert cell
import { vl } from "@vega/vega-lite-api"
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