Skip to content

Instantly share code, notes, and snippets.

var projection = d3.geo.albers()
.center([3.582022, 40.9582426])
.rotate([350, 0])
.parallels([35, 45])
.scale(scale)
.translate([width / 2, height / 2]);
var path = d3.geo.path().projection(projection);
var svg = d3.select("heramap").append("svg")
.style("border", "1px solid black")
.attr("width", "100%")