vl
.markCircle()
.title({
text: "Countries with higher fertility tend to have lower life expectancy",
subtitle: "source: gapminder.json"
})
.data(data_2000)
.encode(
vl
.x()
.fieldQ("fertility")
.axis({ grid: false })
.title("Fertility (children per woman)"),
vl
.y()
.fieldQ("life_expect")
.axis({ grid: false })
.title("Life Expectancy (years)"),
vl.color().fieldN("cluster"),
vl
.size()
.fieldQ("pop")
.scale({ range: [0, 1200] })
)
.render()