Accurate sized Alaska (but not accurate position, of course)
Forked from mbostock's block: AlbersUSA + PR
forked from Fil's block: AlbersUSA inverse proj parameters
xxxxxxxxxx
<meta charset="utf-8">
<style>
path {
fill: #ccc;
stroke: #aaa;
stroke-linejoin: round;
}
</style>
<body>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/topojson.v2.min.js"></script>
<script src="albers-usa-pr.js"></script>
<script>
var width = 960,
height = 500;
var projection = albersUsaPr()
.scale(1070)
.translate([width / 2, height / 2]);
var path = d3.geoPath()
.projection(projection);
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
d3.json("https://gist.githubusercontent.com/mbostock/4090846/raw/d534aba169207548a8a3d670c9c2cc719ff05c47/us.json", function(error, us) {
if (error) throw error;
svg.append('g')
.selectAll("path")
.data(topojson.feature(us, us.objects.states).features)
.enter()
.append("path")
.attr("class", "mesh")
.attr("d", path);
});
</script>
https://d3js.org/d3.v4.min.js
https://d3js.org/topojson.v2.min.js