Tech Blog 7: Plot a map with Eurostat NUTS2 regions in 7 easy steps
During our continued work on the C3S Energy project (a component of Copernicus Climate Change), we’ve been using Eurostat NUTS areas (nomenclature of territorial units for statistics) to define our European regions, both at country (NUTS0) and regional (NUTS2) levels.
Whilst there are plenty of resources available online for identifying the NUTS0 areas, there isn’t much out there detailing the NUTS2 regions and where they appear on a map.
After some research and experimentation at the behest of one of our colleagues, we were able to generate the resource here as a high resolution png file. Read on to find out how we did it.
How to show NUTS2 regions on a map
In this tutorial we will go though a workflow to produce a map with labelled regions. This should work for any geographic shapefiles.
Using Jupyter Notebooks, import the following packages:
Load up your NUTS shapefile (obtain from eurostat)
The next piece of code defines a central point within each shape for labelling use
Using matplotlib, plot the map.
And that’s it, we’ve plotted the NUTS2 regions!
But as you can see, it still needs some tweaking to make the regions clearer for the user.
Let’s first change the map x,y limits to focus on the EU domain.
Then Matplotlib can call the open source natural earth map resources for use as map elements (such as land/sea areas etc).
Finally, looping through the central points in the shapefiles as defined earlier, gives us the labelling for each NUTS2 area.
There you have it.
We know that the London regions are quite densely clustered at this level and as a result, the labels are overlapping, so it’s not ideal. But this does demonstrate one way you can visualize NUTS2 Eurostat regions in the EU domain.
Luke Sanger (WEMC Data Engineer)