Exercise 2: Part 1: Calculate vulnerability index#
Aim of the exercise#
We want to create an overview of different vulnerability indicators. From the Covid-19 risk indicators dataset we take % permanent wall type
, % permanent roof type
and poverty incidence
. From the Uganda population statistics we calculate the % of under fives
and % of elderly
. By combining the data, we are now able to visualize the areas in Uganda that are most vulnerable.
Links to Wiki articles#
Data#
Download all datasets and save the folder on your computer and unzip the file. The zip folder includes:
uga_admbnda_adm2_ubos_20200824.shp
: Uganda district boundaries (Admin level 2)COVID19_RISK_INDEX.shp
: Covid-19 risk indicators
Hint
All files still have their original names. However, feel free to modify their names if necessary to identify them more easily.
Task#
This first part of the exercise will prepare the data for subsequent non-spatial geodataprocessing, such as working with the attribute table. To calculate the vulnerability index, we will join all the relevant data using spatial geodataprocessing into a single vector layer.
Load the Uganda district boundaries (admin level 2) (
uga_admbnda_adm2_ubos_20200824.shp
), as well as population statistics (uga_admpop_adm2_2020proj_1y.csv
) and the Covid-19 risk indicators (COVID19_RISK_INDEX.shp
) into QGIS.Make sure to reproject the dataset with the district boundaries and the dataset with the Covid-19 risk indicators into UTM zone 36N. Use the tool
Reproject layer
for this process. See the Wiki entry on projections for further information.
Attention
Before you start doing any GIS operations, always explore the data. Always check if the projections of the different layers are the same.
Hint
The projected coordinate system for Uganda is EPSG:32636 WGS 84 / UTM zone 36N
. If you are looking for a suitable projected coordinate system for any region on earth, you can find a good one on epsg.io.
We can see that the polygons are different in shape and amount! It is likely that the risk data is using an older version of the admin boundaries. This is an issue we need to resolve in order to work properly with the data.
We will use the following solution for this problem:
We can take the closest district centroid (from the dataset with the most to the dataset with the fewest records). This is the solution we will use for this exercise as the difference between the two datasets is not drastically.
Calculate the
Centroids
for the dataset containing the most elements, which are the district boundaries. You can find the tool underVector
–>Geometry Tools
–>Centroids
. See the Wiki entry on Geoprocessing for further information.Edit the points so they are inside the correct polygons. This is necessary because the centroid of a polygon may fall outside of it when it has an unusual shape. To move a centroid that is outside its boundaries into the district boundaries, first activate the
Toggle editing mode
button, which can be found by clicking on while activating the centroid layer. Then, select theMove Feature
tool. Search for the centroid that is outside its boundaries and move it to the appropriate district boundary. Save the changes and end the editing mode.
There is an issue that can be found when joining the datasets, but it can be solved by using the
Fix geometries
tool on the Covid-19 risk dataset.
Use the tool
Join attributes by location
to join the Covid-19 risk polygons onto the centroids. As a spatial relationship selectwithin
and select the columns%permrooft
,%permwallt
andPovertyinc
as the fields that should be added. See the Wiki entry on spatial joins for further information.
Use the tool
Join attributes by location
again to join the previously enriched points onto the Uganda district boundaries. Now select as a spatial relationship contain and again select the same three columns for joining.
The next steps of the vulnerability index calculation will be completed in the second part of this exercise, the Non-spatial Geodataprocessing section. Please refer to the provided link for this exercise.