.data(birthdatacondensed)// Using the condensed data
.encode(
vl.x().fieldT("Year"),
vl.y().fieldQ("Births"),
vl.column().fieldN("Country"),
vl.tooltip(["Year","Births"])
)
.render()
vl
.markBar()
.data(birthdatacondensed)// Using the condensed data
.encode(
vl.x().fieldT("Year"),
vl.y().fieldQ("Births"),
vl.color().fieldN("Country"),
vl.tooltip(["Year","Births"])
)
.render()
vl
.markPoint({filled:true})
.data(birthdatacondensed)
.encode(
vl.x().fieldT('Year'),
vl.y().fieldQ('Births'),
vl.color().fieldN('Country')
)
.render()
md`
Trying out one more chart as an exploration of the data set.
`
vl
.markRect({filled:false})
.data(birthdatacondensed)
.encode(
vl.x().fieldO('Country'),
vl.y().fieldQ('Births'),
vl.tooltip(["Year","Births"])
)
.render()
import{vl}from"@vega/vega-lite-api"
import{printTable}from'@uwdata/data-utilities'
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.