Population density map of Europe, by NUTS 3 region.
This is an example based on eurostat-map.js library, Nuts2json, d3js and Eurostat statistical data API.
license: EUPL-1.1 | |
height: 780 | |
scrolling: no | |
border: no |
Population density map of Europe, by NUTS 3 region.
This is an example based on eurostat-map.js library, Nuts2json, d3js and Eurostat statistical data API.
<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> |