Public
Edited
Oct 19, 2022
Insert cell
Insert cell
Insert cell
Insert cell
choromap = vl.markGeoshape({stroke: '#aaa', strokeWidth: 0.25})
.data(vl.topojson(usa).feature('counties'))
.transform(
vl.lookup('id').from(vl.data(unemployment).key('id').fields('rate'))
)
.encode(
vl.color().fieldQ('rate').scale({domain: [0.01, 0.19], type:'quantize', clamp: true, scheme: {name: 'yellowgreenblue', count: 9}}).legend({format: '%', title: 'Taxa'}),
vl.tooltip().fieldQ('rate').format('.0%')
)
.project(vl.projection('albersUsa'))
.width(890).height(500)
.render()
Insert cell
unemployment = d3.tsv(datasets['unemployment.tsv'].url)
Insert cell
usa = datasets['us-10m.json']()
Insert cell
import {vl} from '@vega/vega-lite-api-v5'
Insert cell
datasets = require('vega-datasets')
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