Skip to content

Instantly share code, notes, and snippets.

@jgaffuri
Last active January 9, 2020 20:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgaffuri/0d6e1b1c6f9e1297829f38b9c37737fe to your computer and use it in GitHub Desktop.
Save jgaffuri/0d6e1b1c6f9e1297829f38b9c37737fe to your computer and use it in GitHub Desktop.
Population of Europe
license: EUPL-1.1
height: 780
scrolling: no
border: no
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-queue.v3.min.js"></script>
<script src="https://d3js.org/topojson.v1.min.js"></script>
<script src="https://d3js.org/d3-color.v1.min.js"></script>
<script src="https://d3js.org/d3-interpolate.v1.min.js"></script>
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3-legend/2.25.6/d3-legend.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jsonstat@0.13.3/json-stat.js"></script>
<script src="https://cdn.jsdelivr.net/gh/eurostat/eurostat.js@0.9.15/js/eurostat-lib.js"></script>
<script src="https://cdn.jsdelivr.net/gh/eurostat/eurostat.js@0.9.15/js/eurostat-map.js"></script>
<script src="https://cdn.jsdelivr.net/gh/eurostat/eurostat.js@0.9.15/js/eurostat-tooltip.js"></script>
<svg id="map"></svg>
<script>
EstLib.map()
.width(900)
.scale("20M")
.NUTSyear(2016)
.datasetCode("demo_r_d3dens")
.classifMethod("threshold").threshold([50,75,100,150,300,850])
.unitText("people/km²")
.tooltipShowFlags(false)
.legendTitleText("Population density (people/km²)")
.legendLabelDecNb(0)
.legendBoxHeight(210)
.legendBoxWidth(190)
.build();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment