Seuraa

How can I join tabular data to GIS data and create a thematic map?

Statistical data and research data are usually in tabular form. However, in order to discover and visualise the spatial aspects of the data it is useful to join the tabular data with GIS data. For example, if we have data on early childhood education and want to see if participation differs geographically. 

We can do this in QGIS, instructions below.

 

Eurostat  is the statistical office of the European union. They collect and provide statistics and data on various themes on Europe. The early childhood education data is downloaded using Eurostat Data Browser. (Population and social conditions > Education and training >  Participation in education and training > Pupils and students - enrolments > Early childhood education and primary education > Pupils enrolled in early childhood education by sex and NUTS2 regions). You can use some other statistical data for this exercise but make sure it mentions the NUTS2 regions, as we are going to use these statistic regions. 

 

Download the data and open it in spreadsheet software like Libre Office Calc or Ms Excel. 

The data is in csv-format (comma separated values), LibreOffice automatically opens text import window.

csvimport.png

 

Most likely comma is the symbol used as a separator but you can explore other options and see what the data looks like in the preview. You should have one type of information in one column. Click ok. The data opens up in a spreadsheet.

data.png

Row one has column headings, make sure you don’t have more rows above the data. Column headings should be descriptive. OBS_value is not, this column holds the data we wanted, that is Pupils enrolled in early childhood education. So let’s rename OBS_value, early_edu. Make note of column geo as it holds the geographical reference. Save in .csv format and close the spreadsheet.

 

In order to present the data on a map, we need GIS data. Eurostat also provides statistical regions data, NUTS (Nomenclature of territorial units for statistics). The NUTS data can be downloaded from here. Use the following options.

dwnld_nuts.png

Now start QGIS and open the NUTS dataset you just downloaded. 

 

The NUTS are a hierarchical system divided into 3 levels. We want to observe early childhood education on regional level NUTS 2, so first we need to filter the layer.

Open filter menu by left clicking the layer name or from Layer tab in the top of the QGIS window. 

filteringNUTSdata.png

Next, let’s bring the early education data. Open Datasource manager, and go to Delimited text. Click the three dots next to the file name and find your data. Check that the data looks ok in the sample data preview. Click open the geometry definition and check no geometry option. Click add and close.


datasourcemanager.png

 Now we have everything we need in QGIS, and it is time to make the join. This is done in the properties of the GIS data, that is the NUTS layer. Open the properties 

properties.png

Then go to Joins. Click the green plus symbol to add a new join. We are joining the geo field with NUTS_ID field, make sure you have the correct fields. Click ok and ok.

joins.png

Open the attribute table of NUTS data and you should see all the fields from the early childhood data at the end of the table. If you scroll down, you can see that not all the rows have data. This data was not available for all the NUTS 2 regions. 

Now we can visualise our data and create a thematic map. 

visualization.png

Tip! You can open the Layer styling panel by pressing F7

 

Note that you have now created a so-called virtual join that exists only in your project, and did not make any changes to your data. If you want to use the joint data later on you can save it as a new GIS dataset. 

savefeaturesas.png

Look at the map you created. Does it make sense? Maybe having the data per capita would be more informative. You can download population data from the Eurostat Data Browser, make a new join and see how that looks!

Oliko tämä artikkeli hyödyllinen?
0/0 koki tästä olevan apua
Lisäkysymyksiä? Lähetä pyyntö

Kommentit