World Map with D3.js and TopoJSON data from World Atlas in
https://github.com/d3/d3
https://github.com/topojson/topojson
https://github.com/topojson/world-atlas
xxxxxxxxxx
<meta charset="utf-8">
<style>svg{width:100%;height:500px;margin:0px auto;}</style>
<body>
<script src="https://unpkg.com/d3@4"></script>
<script src="https://unpkg.com/topojson-client@3"></script>
<script>
var svg = d3.select("body").append("svg");
var path = d3.geoPath().projection(d3.geoMercator());
d3.json("https://unpkg.com/world-atlas@1/world/110m.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/topojson-client@3