projection = {
const [ bottomLeft, topRight ] = d3.geoBounds(germany)
const lambda = -(topRight[0] + bottomLeft[0]) / 2
const center = [
(topRight[0] + bottomLeft[0]) / 2 + lambda,
(topRight[1] + bottomLeft[1]) / 2
]
const scale = Math.min(
width / (topRight[0] + bottomLeft[0]),
height / (topRight[1] - bottomLeft[1])
)
return d3.geoAlbers()
.parallels([bottomLeft[1], topRight[1]])
.translate([width / 2, height / 2])
.rotate([lambda, 0, 0])
.center(center)
.scale(scale * 200)
}