forked from mbostock's block: Albers USA Projection
Created
April 16, 2016 06:33
-
-
Save sirwart/d64f5df50954feb3fdf66bb5d6d88b69 to your computer and use it in GitHub Desktop.
Albers USA Projection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<title>Albers Projection</title> | |
<style> | |
path { | |
fill: #ccc; | |
stroke: #fff; | |
stroke-linejoin: round; | |
} | |
</style> | |
<svg width="960" height="500"></svg> | |
<script src="//d3js.org/d3.v3.min.js"></script> | |
<script src="//d3js.org/topojson.v1.min.js"></script> | |
<script> | |
d3.json("https://gist.githubusercontent.com/mbostock/4090846/raw/d534aba169207548a8a3d670c9c2cc719ff05c47/us.json", function(error, us) { | |
if (error) throw error; | |
d3.select("svg").append("path") | |
.datum(topojson.feature(us, us.objects.states)) | |
.attr("d", d3.geo.path()); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment