Learning Object


Making the population map of Spain

by Manuel Martín García


What is a population map?

A population map is a particular case of choropleth map, which is a map that shows the distribution of a statistical variable across a region, like for example a country, by using a color scale. In the case of a population map the variable is the number of inhabitants or population of that region. The aim of a population map is to easily identify which areas are more populated and which ones are less populated.

What do we need to make a population map?

We need basically three things: First, of course, the population data of the region we want to work with. In our case, we're gonna make the population map of Spain by municipalities, so we need the population data of all the municipalities of Spain. We'll talk about how to get this information later on. The second thing we need is the administrative boundaries of all the municipalities. And finally we need a GIS software like for example Carto, which is a free web mapping service.


Let's do it!

Getting the population data

The first step is to get the population data. We can download it at the Instituto Nacional de Estadística web site where we can find, not only data about population but also about many other statistical variables. So, in our case, we just have to find the population section, select the geographic scope (municipalities) and go to the download link. Both the .csv and .xlsx file formats that are available would be fine.

Getting the administrative boundaries

For that we'll go to the Instituto Geográfico Nacional web site where the official Spanish cartography is available for free. There we'll have to find any of the products that include the municipal boundaries and we'll download it.

Making the map with Carto

Merging the alphanumeric and the geospatial data

Once we have both the population data, which is alphanumeric, this is, a table containing numbers and text, and the municipal boundaries, which is geospatial, this is, polygons, what we have to do is to link them so that each polygon is associated with one record in the table. We can do that with the web mapping service Carto in just four steps: First, we'd create a new map. Secondly we'd upload the municipal boundaries file. Thirdly we'd upload the population data file. Finally we'd merge them. As a result, each municipal boundary polygon will have its population data.

Configuring the choropleth symbology

At this point the only thing left is configuring the choropleth symbology by using the Carto corresponding tool. We'd select the column that contains the population data and leave the rest of the options as they come by default. Automatically we'll see how the map symbology changes and we'll be able to explore the differences on population of all the municipalities.


© Copyleft 2016, Content and Language Integrated Learning and ICT Group