map = {
const svg = d3.create("svg").attr("viewBox", [0, 0, width, 600]);
let projection = d3
.geoAzimuthalEqualArea()
.rotate([0, -52])
.scale(5000)
.translate([800, -800]);
let toRadius = function (area) {
return 0.8 * 0.005 * Math.sqrt(area);
};
svg
.append("g")
.selectAll("path")
.data(topojson.feature(n2jrg, n2jrg.objects.nutsbn).features)
.enter()
.append("path")
.attr("d", d3.geoPath().projection(projection))
.attr("fill", "none")
.attr("stroke", "#f20666");
svg
.append("g")
.selectAll("circle")
.data(n2j.features)
.enter()
.append("circle")
.attr("cx", (f) => projection(f.geometry.coordinates)[0])
.attr("cy", (f) => projection(f.geometry.coordinates)[1])
.attr("r", (f) => toRadius(+sizeDataIndex[f.properties.id]))
.attr("fill", "black");
return svg.node();
}