Create a gist now

Instantly share code, notes, and snippets.

@mbostock /.block
Last active Feb 9, 2016

Mercator Projection
license: gpl-3.0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<meta charset="utf-8">
<title>Mercator Projection</title>
path {
fill: #ccc;
stroke: #fff;
<svg width="960" height="500"></svg>
<script src="//"></script>
var projection = d3.geo.mercator();
var path = d3.geo.path()
var svg ="svg");
d3.json("countries.json", function(error, collection) {
if (error) throw error;
.attr("d", path);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment