- Interactive SVG maps rendered using D3.js.
- TypeScript support with built-in definition typings.
- NUTS geometries fetched dynamically via the Nuts2json API (TopoJSON format).
- Eurostat API integration using the JSON-stat standard.
npm install eurostat-mapimport eurostatmap from 'eurostat-map'or
const eurostatmap = require('eurostat-map')or
<script src="https://unpkg.com/eurostat-map"></script>then
eurostatmap
.map('choropleth')
.title('Population density in Europe')
.stat({ eurostatDatasetCode: 'demo_r_d3dens', unitText: 'people/km²' })
.legend({ x: 500, y: 180, title: 'Density, people/km²' })
.build()Want a guided setup? Try the notebook: https://observablehq.com/@joewdavies/eurostat-map-js
For detailed documentation on what eurostat-map can do, see the documentation page.
For generated, signature-accurate API docs from TypeScript/JSDoc, see the API docs.
Anything unclear or missing? Feel free to ask!
Here are some public projects and publications built with eurostat-map:
- IMAGE - Eurostat's interactive map generator.
- Regions in Europe 2025 - interactive publication.
- Eurostat Regional Yearbook - interactive publication.
- Women make up 53% of science & technology ranks
- Average work week nearly 36 hours in the EU in 2025
- Tourism nights booked via platforms hit nearly 1 billion
- EU rail passengers made 8.7 billion trips in 2024
- EU life expectancy increases again and hits 81.5 years
eurostat-map is an open-source JavaScript library for building interactive, publication-ready statistical maps focused on Europe. It combines D3-based SVG rendering with direct support for Eurostat datasets (JSON-stat), NUTS geographies from Nuts2json, and custom data workflows, and includes map types such as choropleth, proportional symbols, cartograms, flow maps, and composition charts. The project is designed for analysts, journalists, and institutions that need reproducible, configurable map visualizations for both exploratory analysis and official communication.
| contributors | |
| version | See npm |
| status | Since 2018 |
| license | EUPL 1.2 |
Feel free to ask for assistance, fork the project or simply star it (it's always a pleasure).
The Eurostat NUTS dataset is copyrighted. There are specific provisions for the usage of this dataset which must be respected. The usage of these data is subject to their acceptance. See the Eurostat-GISCO website for more information.
The designations employed and the presentation of material on these maps do not imply the expression of any opinion whatsoever on the part of the European Union concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Kosovo*: This designation is without prejudice to positions on status, and is in line with UNSCR 1244/1999 and the ICJ Opinion on the Kosovo declaration of independence. Palestine*: This designation shall not be construed as recognition of a State of Palestine and is without prejudice to the individual positions of the Member States on this issue.








