Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
.land {
fill: #ccc;
fill-opacity: 0.8;
stroke: #3b3b3b;
stroke-width: 0.3px;
.graticule {
fill: none;
stroke: #777;
stroke-width: 0.3px;
<script src=""></script>
<script src=""></script>
<script src=""></script>
var width = 960,
height = 500;
var projection = d3.geo.satellite()
.center([30, 50])
.rotate([3, -51.3849401, -45])
.clipAngle(Math.acos(1 / 1.1) * 180 / Math.PI - 1e-6);
var path = d3.geo.path()
var graticule = d3.geo.graticule()
.step([5, 5]);
var svg ="body").append("svg")
.attr("width", width)
.attr("height", height);
.attr("class", "graticule")
.attr("d", path);
var land = svg.append("g");
d3.json('europe.topo.json', function(err, data) {
.datum(topojson.object(data, data.objects.europe))
.attr("class", "land")
.attr("d", path);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment