render({
mark: { type: 'point', filled: true },
data: { values: data2000 },
encoding: {
x: { field: 'fertility', type: 'Q' },
y: { field: 'life_expect', type: 'Q' },
size: { field: 'pop', type: 'Q', scale: { range: [0, 1000] } },
color: { field: 'cluster', type: 'N' },
opacity: { value: 0.5 },
order: { field: 'pop', sort: 'descending' },
tooltip: [
{ field: 'country', type: 'N' },
{ field: 'fertility', type: 'Q' },
{ field: 'life_expect', type: 'Q' }
]
}
})