Public
Edited
May 13
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
bar_chat = vl.markBar()
.data(countries)
.encode(
vl.x()
.fieldN("country")
.sort("-y"),
vl.y()
.aggregate("mean")
.fieldQ("fertility")
)
.render()


Insert cell
Insert cell
scatterplots = vl.hconcat(
// Scatterplot 1: 1980
vl.markCircle()
.data(countries)
.transform(
vl.filter("datum.year == 1980"))
.encode(
vl.x().fieldQ("fertility"),
vl.y().fieldQ("life_expect")
)
.title("1980"),

// Scatterplot 2: 1990
vl.markCircle()
.data(countries)
.transform(
vl.filter("datum.year == 1990"))
.encode(
vl.x().fieldQ("fertility"),
vl.y().fieldQ("life_expect")
)
.title("1990"),

// Scatterplot 3: 2000
vl.markCircle()
.data(countries)
.transform(
vl.filter("datum.year == 2000"))
.encode(
vl.x().fieldQ("fertility"),
vl.y().fieldQ("life_expect")
)
.title("2000")
)
.render()



Insert cell
Insert cell
> Modifique esta célula com o link:
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