{
const svg = d3.create("svg").attr("width", width).attr("height", height);
svg.append("path").attr("d", d3.geoPath(projection)(outlineShape)).attr("fill", "none").attr("stroke", "black")
svg.selectAll("path.country").data(allCountries.features)
.join("path")
.attr("class", "country")
.attr("stroke", "black")
.attr("fill", d => d.properties.name === clickedCountry? "steelblue" : "lightgrey")
.attr("d", mapPath)
.on("click", (event, d) => mutable clickedCountry = d.properties.name);
svg.selectAll("circle.name").data(allCountries.features)
.join("circle")
.attr("class", "name")
.attr("cx", d => mapPath.centroid(d)[0])
.attr("cy", d => mapPath.centroid(d)[1])
.attr("r", 3)
.attr("fill", "red");
return svg.node();
}