block by bricedev b485239a37ca57722603

Europe

Full Screen

Europe projection

index.html

<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.19/topojson.min.js"></script>
<script>

var width = 960,
    height = 700;

var projection = d3.geo.conicConformal()
    .rotate([-10, 0])
    .center([0, 53])
    .parallels([29.5, 45.5])
    .scale(1100)
    .translate([width / 2, height / 2]);

var path = d3.geo.path()
    .projection(projection);

var svg = d3.select("body").append("svg")
    .attr("width", width)
    .attr("height", height);

d3.json("europe.json", function(error, europe) {
  if (error) throw error;
  console.log(europe);

  svg.selectAll(".countries")
      .data(topojson.feature(europe, europe.objects.countries).features)
  .enter().append("path")
      .attr("class", "countries")
      .style("fill", "#e2e2e2")
      .style("stroke","#9a9a9a")
      .style("stroke-width","0.3px")
      .attr("d", path);

});

d3.select(self.frameElement).style("height", height + "px");

</script>

makefile.md

ogr2ogr \
  -f GeoJSON \
  -where "Continent IN ('Europe')" \
  countries.json \
  ne_10m_admin_0_countries.shp

topojson \
  -o topoeurope.json \
  --id-property SU_A3 \
  -- \
  countries.json