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
// escreva aqui a sua resposta
view2 = vl.markBar()
.data(countries)
.encode(
vl.y().average('life_expect'),
vl.x().fieldN('country').sort({ field: 'life_expect', op: 'average', order: 'descending' })
)
.render()
Insert cell
Insert cell
view = vl.markCircle({ size: 60 })
.data(countries)
.transform(
vl.filter("datum.year == 1980 || datum.year == 1990 || datum.year == 2000")
)
.encode(
vl.x().fieldQ("fertility").title("Fertility"),
vl.y().fieldQ("life_expect").title("Life Expectancy"),
vl.tooltip(["country:N", "fertility:Q", "life_expect:Q", "year:N"]),
vl.column().fieldN("year").title("Year")
)
.width(200)
.height(200)
.render()

Insert cell
Insert cell
> Modifique esta célula com o link:
> https://ryanerik.github.io/visualizacao_de_dados/export.html
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