embed(
{
$schema: "https://vega.github.io/schema/vega-lite/v5.json",
height: 300,
width: 400,
data: {values: data_2000},
mark: {type: "circle"},
encoding: {
x: {field: "fertility", type: "quantitative", axis: {grid: false}, title: "Fertility (children per woman)"},
y: {field: "life_expect", type: "quantitative", axis: {grid: false}, title: "Life Expectancy (years)"},
color: {field: "cluster", type: "nominal", title: "Cluster"},
size: {field: "pop", type: "quantitative", scale: {range: [0, 1200]}, title: "Pop"}
},
title: {text: "Countries with higher fertility tend to have lower life expectancy",
subtitle: "source: gapminder.json"}
})