map = {
let svg = d3.create("svg").attr("width", w).attr("height", h);
svg
.append("path")
.attr("d", path(d3.geoGraticule10()))
.attr("fill", "none")
.attr("stroke", "#333")
.attr("stroke-width", 0.4);
let country_group = svg.append("g");
country_group
.selectAll("path")
.data(countries.features)
.join("path")
.attr("d", path)
.attr("data-pop", (d) => console.log(d.properties.POP_EST))
.attr("fill", "#eee")
.attr("stroke", "black")
.attr("stroke-width", 1);
let max_pop = d3.max(countries.features.map((o) => o.properties.POP_EST));
let bubble_group = svg.append("g");
bubble_group
.selectAll("circle")
.data(countries.features)
.join("circle")
.attr("cx", (d) => path.centroid(d)[0])
.attr("cy", (d) => path.centroid(d)[1])
.attr("r", (d) => 20 * Math.sqrt(d.properties.POP_EST / max_pop))
.attr("fill", "lightblue")
.attr("stroke", "black");
return svg.node();
}