bertin.draw({
params: { projection: d3.geoPolyhedralWaterman(), clip: true },
layers: [
{
type: "bubble",
geojson: data,
leg_round: 0,
k: k,
values: "pop",
leg_divisor: 1000000,
leg_title: "Population (million inh.)",
fill: {
type: "choro",
method: method,
nbreaks: nbreaks,
values: "gdppc",
colors: pal,
leg_title: "GDP per capita\n(in $)",
leg_x: 100,
leg_y: 270,
leg_round: -2
},
tooltip: ["$name", "$gdppc", "(current US$)"],
leg_x: 800,
leg_y: 270
},
{
type: "layer",
geojson: data,
stroke: "none",
fill: "white",
fillOpacity: 0.5
},
{ type: "graticule" },
{ type: "outline" }
]
})