{
const height = Math.ceil(width / 1.92);
const svg = d3.create("svg")
.attr("width", width)
.attr("height", height)
.attr("viewBox", [0, 0, width, height])
.attr("style", "max-width: 100%; height: auto;");
const x = d3.scaleLinear(d3.extent(geo.features, d => d.properties.Easting), [0, width]);
const y = d3.scaleLinear(d3.extent(geo.features, d => d.properties.Northing),[0, height]);
const projection = d3.geoTransform({
point: function(px, py) {
this.stream.point(x(px), y(py));
}
});
const path = d3.geoPath(projection);
svg.append("path")
.datum(geo)
.attr("fill", "lightgray")
.attr("stroke", "#333")
.attr("d", path);
return svg.node();
}