Built with blockbuilder.org
xxxxxxxxxx
<meta charset="utf-8">
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
svg { width:100%; height: 100% }
</style>
<body>
<script src="https://unpkg.com/d3@4"></script>
<script src="https://unpkg.com/d3-geo-projection@2"></script>
<script src="https://unpkg.com/topojson-client@3"></script>
<script>
var width = 900;
var height = 500;
var svg = d3.select("body").append("svg")
var projection = d3.geoMercator();
var path = d3.geoPath().projection(projection);
d3.json("https://unpkg.com/world-atlas@1/world/50m.json", function(error, world) {
if (error) throw error;
svg.selectAll("path")
.data(topojson.feature(world, world.objects.countries).features)
.enter().append("path")
.attr("d", path);
});
</script>
https://unpkg.com/d3@4
https://unpkg.com/d3-geo-projection@2
https://unpkg.com/topojson-client@3