globe={
let svg=d3.create("svg")
.attr('width',width)
.attr('height',height)
let defs=svg.append('defs')
defs.append("path")
.attr("id", "outline")
.attr("d", path(outline));
defs.append("clipPath")
.attr("id", "clip")
.append("use")
.attr("xlink:href", 'url("#outline")');
let g=svg.append('g')
g.selectAll('path')
.data(countries.features, d => d.properties.name)
.enter().append('path')
.attr('class', 'geometry')
.attr('d', path)
.attr('stroke', lineColor)
.attr('stroke-width', 1).attr('fill', landColor)
.on('mouseover', function (d) {
d3.select(this)
.attr('opacity',0.7)
.attr("stroke", '#fffff0')
.attr("stroke-width", 5);
})
.on('mouseout', function (d) {
d3.select(this)
.attr('opacity',1)
.attr("stroke", lineColor)
.attr("stroke-width", 1);
});
svg.append('path')
.datum(graticule)
.attr('d',path)
.attr('stroke','#ccc')
.attr('fill','none')
.attr('stroke-width',0.5);
svg.append("path")
.datum(outline)
.attr("d", path)
.attr("fill", "none")
.attr("stroke", lineColor)
return svg.node();
}