Public
Edited
May 14
Insert cell
Insert cell
Insert cell
Insert cell
countries = data['countries.json']()
Insert cell
countries
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
barra = {
const bar = vl.markBar({color:"#1F77B4"})
.data(countries)
.encode(
vl.x().median("life_expect"),
vl.y().fieldN("country").sort("-x")
)
return bar.render()
}
Insert cell
Insert cell
scatter = {
const scatterplot = vl.markPoint()
.data(countries)
.transform(vl.filter("datum.year == 1980 || datum.year == 1990 || datum.year == 2000"))
.encode(
vl.x().fieldQ("life_expect"),
vl.y().fieldQ("fertility"),
vl.tooltip(["life_expect", "fertility", "country"]),
vl.column().fieldN("year")
).title("life_expect x fertility")
return scatterplot.render()
}
Insert cell
Insert cell
https://gabrielsilva08.github.io/vis_veras/
Insert cell
import {vl} from '@vega/vega-lite-api-v5'
Insert cell
data = require('vega-datasets')
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