Friday, April 25, 2014

Liquid wealth?


Creating a 3D map with QGIS to visualize the spatial relation between raster and vector data. 


Looking at Kenya’s GDP, the African country has the highest gross domestic product per capita in the East African Community and still only reaches a value that is less than 2 per cent of the GDP of my home country Germany

I wanted to learn more about the well-heeled and the poor in Kenya. The platform OpenData Kenya offers detailed statistics that also include information on poverty. The Database County Data Sheet Indicators 2009 provides various indicators that are related more or less to wealth and poverty. I decided to join that database to a county Shapefile to examine the distribution of wealth by looking at each county's poverty rate. According to that database, the poverty line is defined by 1562 KSH (~18$) in rural areas and 2913 KSH (~33.5$) in urban areas per month.

Distribution of poverty by Kenyan counties
The allocation of poverty shows a heterogeneous geographical distribution of poverty. Especially the North and some Counties close to the coast seem to struggle, whereas the counties south of the equator are much wealthier.
For sure, there are numerous effects that cause that distribution. For example, Kenya’s north is close to the current “lost countries” South Sudan and Somalia and also Ethiopia is struggling economically. The region is thus challenged by frequent security issues and less profitable for investors and entrepreneurship.

But there is one factor that I wanted to highlight in this project. Due to my work around Kisumu, I talk a lot to people that are involved in horticultural businesses through their family owned farms for income generation. This business is strongly bound to rain and it is obvious, that the availability of water is thus important to avoid poverty. To tackle the question, whether there is really a relation between rain/precipitation you could easily do some statistic tests like calculating the correlation and creating a scatter plot. 


As you can see, there is at least some correlation, although it is pretty weak. Nevertheless, the results indicate a higher relation as soon as you disregard some of the extreme values which are mainly the counties with large cities like Mombasa, Nairobi and Kisumu.

Anita Graser’s blog inspired me once again to use a plugin that she presented. In one of her recent posts, she introduced the mighty Qgis2threejs tool. She shows how to create a 3D map including trees, buildings, a basemap and a DEM (Digital Elevation Model). According to the values of the raster data (in Anita’s post the DEM), the overlaying vector data will be distorted to include hills and holes, but you can also use that tool to visualize other raster data.
Our initial map of counties per poverty can thus be combined with a raster data about precipitation. You just have to add the styled county Shapefile and the appropriate raster tiles and run the tool. It will create a well working HTML document that presents your interactive 3D map. 

To finalize my project, I used my terrible HTML skills and I must admit to be quite proud of the result. You can see that there is nearly no precipitation, especially in the poor, northern counties like Turkana, Marsabit and more. I also like that you can see that the rainfalls increase slightly close to the coast because of the marine influence. I think it is a great tool to visualize possible relations between raster data and vector data.
Below an animated GIF to highlight which regions experience the lowest rain falls.

Counties with highest poverty are challenged by low precipitation

Summarizing my results, I must admit that the assumption of a strong connection between wealth and precipitation cannot be proofed because there are, as already mentioned, a lot of factors that influence poverty. Nevertheless, I think a visualization can support to create awareness and it will stick in your head.

No comments: