 Okay, let's start. Welcome to this session. My name is Björn Sanvik and I'm a core developer here in Oslo on the GIS app. We're going to look at the maps app and also we're going to move beyond the map, only not creating the map that you can look at, but also see how you can use GIS tools to do spatial analysis. And to do that, we currently need to move out of the GIS tool and into GIS application. So just briefly about myself, as I said, I've been here since in five years. So I started on the old GIS app, which I think quite a few of you have used as well. And this one is now replaced by the current maps app, which is now the core GIS app. I have a master degree in geographical information science at the University of Edinburgh. Often you will see the term GIS in these presentations and elsewhere when we talk about map and often at university level GIS means geographical information science while we're more talking about the programs and software it's geographical information systems and that is what we will focus on today. Previously I worked for various clients. I worked for the UN, the national broadcaster here in Norway. I love mountains and trekking and I've done quite a bit of work for the Norwegian trekking association and also the Norwegian Polar Institute. But everything has to be done, have been circling around making mapping platforms for these organizations. So there is a community of the HS2 community page where you can post questions during this session. You'll find a link on the agenda. I will try to have a look if we have time at the end and try to answer the questions at the end of this session. I think we will have time for it. We won't also keep an eye on that so I'll let you know if there are any important questions that come up. Great, thanks. What will be covered? So we will have two sections. The first we will have a closer look at the maps app and we will go a bit more in detail than what Lars could do on his session on Monday. And especially I've written you-ish because not all these features are from the last version. Actually one or two of them go back to 230 worm but they are maybe less used but still quite powerful. So we will especially look at new features for event layers and we will also have a look at thematic layers and then especially how you can map change which has been difficult until we launch the split view and timeline maps. And then we will also see how you can include population data in DHIS2 maps but at the same time see what the limitations are and that will lead us over to the next session where we will do analysis with the same population data in a desktop program called QGIS. And what we will do there is that we will export data from DHIS2 and then combine it with the population data from a different source and then measure the population within for example your own unit boundaries or around your health facilities which is a highly requested feature to be able to do. So I will start with the maps app. I plan to use the release candidate for 235 to demo so wish me good luck. This is just a short overview of when we added the different features that I will demo. So you see from 231 and then 235. So you can look where your own version is and sort of what you can do use from this session yourself. For the second session with QGIS we will only use the layer data download. I think most of you should be on 231. So you should be able to use that feature. So I will start with the event layers. So I move over to the maps app. So I will start by creating an event layer. So I go here. I will select the malaria case registration and then for period we also made a change for this version because previously we didn't use the setting that is available in the general settings. There you have a default relative period for analysis and this one is last 12 months. Before this was not used by the maps app but now it's present. So basically the only thing you need now to create a map is just to select an indicator and then go with the defaults and you should have a map already. So I will just now make a change and say last six months and then update the layer. So this is the view that you are probably used to. When you add a lot of events they will be clustered like this. So if I zoom out we will see that there are more than 50,000 events on this map and then as you zoom in they will go into more detailed clusters. And this one is fairly fast to use because this is clustered on the server. So the only thing we actually download is the circles with the numbers inside. We don't download all the individual events. So this is very good for on low bandwidth instances but what you're now able to do is that you can actually show all the 50,000 events at the same time. So if I'm going to switch to view all events I'm also going to look to style this by gender. So we'll not only have black dots but we will have one color for male and one for female. So this feature was added in 231 and then update the layer. We'll take a little time to load but now here we actually have 50,000 events showing at the same time and this is only possible after 234 version because what we did then was to change the whole mapping platform or the mapping engine of the to use a web technology called WebGL which are capable of doing this. So that's a very good reason to upgrade if you have problems of showing a lot of data at the same time and you will also see that this is very smooth. You can zoom in and out very fast and it's no problem for the browser. And also in this version before you had like fixed zoom level so it will go in but now it's a continuous zoom so you can very easily adapt the view to directly the bounds of your data. So what happens then if we have this view and we still feel that this is a bit messed we don't want to see every all the 50,000 at the same time we can go back and group them so we go back and have a cluster and previously this will show back to the as the black circles. But now we have added something called the donut charts. This looks like donuts with a hole in the middle and so there in the middle you see the number and then you will see the distribution within. So for the gender it's quite equally set. We can have a look at this number six so here it's one male and then five females within this group and if we zoom in we will see that this is dividing further so in the three groups and then we in this one we have one male one female and then you zoom in and you see the individual. So the good thing with this is that you can sort of see the pattern of your data also with the clusters that was not possible previously and so basically any data element that is connected to the program can be used so for here also you can we can select age in years and then you can also have the same legend possibility as you do with a thematic layer. So I'll choose an automatic equal intervals can change the color scale and then update the layer and then especially if you have like a population where there may be elderly people on the country control areas this would easily show in on this map and okay I will show you one more feature of the event layers that is actually added in 35 hopefully coming in a week or two. If I select this in patient morbidity and mortality program and then I can still take style by gender here you see if you have more data elements to use for for styling and then add layer. No I don't want to have the clusters so I select view all events last 12 months. One thing you have to show here is that we also have flaws in our data or errors so the reason why it zooms like this is that we have one male who unfortunately died at the age of 50 on the something called the new island so often with if you don't have a coordinate or if you have if you add zero zero to your location it's it's it's still a valid coordinate so it happens it ends up on something that is named the new island so it's actually nothing there it's it's the place on the earth that don't exist that actually has the most health facilities and very often if you can't find an event or a facility often go and look at new island and there is plenty there so we'll try to fix this one but now I will zoom into this and then show you the new feature and that is the data table which has been available for other layers like the thematic and boundary layer but not for events and I think this is quite powerful because this allows you to filter your data to sort of dig in and see the patterns directly in the browser because now we have downloaded all the events and we all the filtering is done here directly and the map is instantly updated and you will also see that we have added some extra data elements here and this you can define in the in this one when you said when you do the maintenance of the program so when you select the data elementary program you have an option to select display in reports so those who are checked here they will also show in the event data table as well as when you click on the individual events it will also show in the pop-up so what you can do now is that we can for example filter on all females and then you see instantly the map is updating maybe we only want to look below year 30 which will further mode of discharge died and maybe with a certain diagnosis and 390 so you can see very quickly we can sort of explore and get down the data set and now we are down to four individual cases so this can be a very fast and quick way to to explore your event data when if you save this map this view won't be saved because this is all in the browser but if you want to have this filter activated on the dashboard for example you can do the same in the filter tab for the event here so here we can add the same with the gender and and age and when you do it like this this will be done on the server and you can save it with the map okay so that's all I plan to say with the event layer so I'll move on to the thematic layers so so far we have only supported one thematic type and we haven't named it before because we only had one type and that is called the choroplet so now I will create a map from a data element with the way that you are used to see it so I select malaria and then malaria refers I will use and then we can go with the defaults again this last 12 months will show be selected by default here so it should be very quick to create a map and the problem with this one is that these are raw numbers these are not per capita and this is not the recommended way of showing this data because it's quite easy to interpret the user who sees this map could easily think that this is district is doing very good or very bad depending on the data compared to the neighboring ones but that is because also because the data is not normalized so if there's not much more people living here than the neighboring district maybe this one is actually doing better per capita so for that reason we have no added support for it's we call it the bubble map or very often you will see proportional symbol map for this type the bubble map is getting a bit more popular word and we might also support bubbles charts later on so we would like to use the same term so if we switch to this one and then just update instead of colorizing the whole the districts we are calculating the center or a center point within the polygon we still show the boundary so you can get an idea of the area the circle is covering but then we are making these circles that are scaled according to the data value so actually here they are scaled they're scaled and colorized according to the data value and this is the recommended technique if you have for example the number of COVID-19 cases this is the raw numbers this is the map you should use and not the other one the coroplets so we have also some options here you can select the radius up to 50 since we have two with these are called visual variables maybe you don't want to use both color and size to show the same variable so we can switch to just a single color and maybe turn on the labels we can make them a bit bigger and then update the layer so here you have one color with labels and the legend here on the left side so if you look at Kinema here we can see that for the last 12 months they had 1292 malaria referrals if you are interested in knowing how this has changed over the last 12 months this has been a bit difficult until we launched the the time maps which I will now show so what you can do is to go and edit and then under period if you have selected a relative period you have two more options so this is still the default one is to aggregate the data over the 12 last months and then show that as a single map but you can also select timeline and we click update and what then happens I think I will go back to also have the colors so we have some more idea on how it's changing so we go back to this one update so what you know have is that a month by month view for the last 12 months so then you can see it like for this district this was 100 in September last year and then it's also possible to click this play button and you will go through the last 12 months and you can see how the situation is changing you can also instead of this just click on the single months to go directly to this so this is one of the options we added but still it can be a bit hard because your mine needs to remember how it was the previous month so you it's a good way to sort of maybe get an indication if it's going up and down especially if you're following one one district but it's still a bit hard to follow so for that reason we also added another option and that is to have the split view maps so instead of a timeline we will actually add one map per month you can see that this is getting a little bit cramped because the maps are of course much more smaller when we show 12 at the same time so i will change the styling a bit i will turn off the labels and then having the max radius to 25 and then update the layer and then it should be easier to see and also a good feature we added i think in the 234 version was to have the full screen view so this is especially useful on the dashboard but also in the maps app if you click on this the map will cover the whole screen so you can have all the space available and this split view maps operates that whenever you are zooming in or interacting with one of the maps it will do the same with all the other maps so we'll always have the side by side view of the same same bounds of the map so here i think it's much easier to sort of see the outliers or how that there are very few referrals in one month compared to another and so on to have this side by side view okay so that's the new bubble map timeline map on split view map in the for the thematic layer so then we i will move on to the population layer which we will look at for the rest of the section actually uh so we're going new for those of you who have google earth engine enables for instance you will see these six layers so this is what we have added so far with data so google earth engine is just that google offers uh server space in the in the cloud and and as well computing power which allows different organizations so for example the population density layer is from world pop and then they can host it there and then it's made accessible for users like us so it's a free resource but for every instance you need a separate agreement with google and a special like token to to be able to use these layers so now if i add the population density so select the year there for this layer here there are different countries from for different layers so for now i'll just use the the latest one can you also check change the styling here the colors so it sort of matches the population if you are a contrary with a very small population you can adjust these numbers so so it applies to to your population distribution and then add the layer so here you see just just have data for a few countries but you should find for most of them if you select a different year and we will also try to improve this to get more data available for for different years actually so you can see the change so if i zoom in what you will see that this is made up of small small squares so these squares here is 100 by 100 meters so this is the resolution for the data set quite high quite high resolution for this one and what you also can do is that you can right click anywhere on the map and then select population density and you will get the population density per square kilometer at that particular area so you can see here is 310 we click here it's more almost 3,000 2800 but then it sort of stops this is what you can do with a population layer in in the DHS2 maps you could of course add the facilities on top here and see where it's a dense population where it's not but you can't get the actual numbers and that is what we will do now for the next part of the session switch back to this one so there is one important distinction if you worked a little bit with GIS tools you will already notice uh we haven't bothered to make this distinction in the maps app because we mostly work with only one of the data types with vector data and we also try our best to make the maps up very simple to use so you don't need to to know have all this background knowledge but now when we are moving out from DHS2 maps into another program this distinction is quite important so we have two types of data when we talk about mapping or GIS and one is vector data and these are represented by simple geometry types so for example or it's most often it's just points which just have a latitude longitude location so that will be for example your facilities and then we can have lines these are often used to map roads and rivers and we also use them to map tracked entity relationships then we draw a line between two points to track the entities and then we have polygons which is like an area which we use to represent your org units hierarchy above the facility level where you have the districts for example and the good thing about this is that all of these have unique IDs and then it can easily be linked to the other data tables that we have in DHS2 so we can link it to the indicators you have data elements and then we use this to create the maps so we can store vector data now for organization units events and tracked entities so far in DHS2 raster data on the other hand it's instead of represented by these geometry types this is a grid of cells or pixels so the one the population data we just looked at was represented as a raster data and that had the resolution of 100 by 100 meters and then for each and every cell within this raster data there will be one or sometimes more than one value so it could be the population elevation data or whatever so we don't support storing of raster data in DHS2 so far but you can import the data so there are two ways you can import raster data so far you could even go through the google earth engine they will all be raster data or you can use the external layer where you can add for example data from ArcGIS which is also raster data so then we are moving over to QGIS QGIS is free to use desktop application it's an open source program you can do this is just an example and i'm selected QGIS not only because it's a great application but it's unfreely available of course so so that is the reason it's and it's also open source like DHS2 there are other GIS program i think quite a few of you might know ArcGIS so the things i'm showing you here you can also easily do in ArcGIS these are quite basic GIS operations but the examples here will be in QGIS which should be accessible for for everyone of the audience so you can download QGIS from this website i would recommend just to try to follow along i think this session or i know this session is recorded so you can go back and and see what i'm doing and then i've also added quite detailed slides i will do this live in QGIS but you should be able to follow these slides also where i've marked different tools and and how you should do it so first we need some population data so now instead of going to google earth engine we will go directly to the source and worldpop is a great great site with lots of data up to date and and covering a vast majority of of the earth so you can read about how these data sets are graded i don't want i don't have time to go into the details but we will use the population data which is available here so there are population counts which we will access and then there are different methods of how you can can calculate or make these data sets of the population so i'm not going into details about this but i'm using the constrained individual countries you and adjusted so it means that the total population is adjusted to the official figures so they should match these data sets so if i click on this one you have all for all the countries so the quickest is just to to search for the country so i'm taking Sierra Leone as we already have the demo data for this one and then download and then download at the end here so when you have the the data we can go to qeis so when you open qeis it looks like this might be a bit more overwhelming than the maps app because you have a lot of more possibilities and tools but it's also a little bit similar that you have the mapping area here and then you have the laid layer panel to the left so we also try to make it this like a standard in for gis tools so i'll show you the two ways of import your data one is to go to layer and then add layer and here you need to know the distinction between vector and roster and the population data is the roster layer so we go and add roster and then we can select the layer and then open add and close and then we have the population layer here i'm also going to show you a quick way which i normally use a remove layer and that is just to have your folder with your data set and just drag it over so when you use this it just looks at the extension of the file to figure out what sort of file it is so then you don't need to remember if the vector or roster it will most of the time just work if you just drag the file to the to the program so this one is just shown in black and white so we would like to style this layer so two ways you can do it either right click and properties or just double click the layer and you get this similar to the layer dialogue that we have in the maps app but here many many more possibilities so the first thing we could do is to change the layer name so we could just call it population and then we would like to style this layer and the tool i often use is the histogram what that will do is that it will show you a graph of the distribution of your layer so here we can see that most of the values are between zero and 50 so we can use this when we want to style the layer we can see here that the highest value is 323 but there are very very few so we don't need to have it like a separate class about 300 for example it will only be probably only be one one of these tiny squares which is part of that group so we can go to some symbology and we will now go from gray to color and here we can set the min and max so we will go new set zero to to the start value and then 50 that's the maximum value for the classification and then we can have this color scale here you can select another one and we will have make a nice scale so we'll try to make for every 10 so we will take equal intervals and then six classes so you should then have for every 10 there are lots of options very often it's just nice to have this open and then if you click apply you can see the changes on the map so you can still make adjustments but then when you're done you click okay and then we can zoom in to the layer and here to here you will also see the individual 100 by 100 meters square and if we want to check the the individual values here you have this tool here identifier tool so click on that one and then you can click on a square and then it will show you the value so within these 100 by 100 meters is estimated are 40 people living on this one 18 people are living so what the first thing we would like to do now is to finding the total population for Sierra Leone so that we can do by sum the values of every cell grid cell in this data set so for this we need to use a tool some processing tools that are available these are okay available up here you can see it's a toolbox under processing a quick way to reach it is to click on this button here and here there are a couple of hundreds tools that you can do analysis on your data so it's very lot you can do very powerful we will just demo a few of them so i find a nice way to find them is just to search for them so i i when i want to have statistics of this layer so there is one tool called raster layer statistics so if i double click that one and then it has already selected the layer for me because it's only layer i've added and there there can be multiple values for each of these raster data set and then they will be called different they will have different band they will be called band but for the one we are using here is only one value which is the population count so then i click run and then this one will calculate the total population for this data set which is nine nine seven point 97 million almost 8 million this was from 2020 and if i did a search here on the population Sierra Leone i'll see that that was matching the value so this could also be used to make a check of the of the data set what we should also do now is to save the project so we have a backup at least so i just okay so what we are now going to do is that we are going to measure the population within our own org units so the first thing we will do is to go back to the maps app create some boundaries and then download them to use so i'll add a new boundary layer select level i will select district and then add layer so now we have the districts here and then this is the important thing you need to use to download the data from this context menu and this will download the data together with some metadata with the name and so on id in a format called geogasin which is supported by i would say all almost all gis programs out there and again the easy way is to just drag the file over and you will have your district what you see here that these are not really only boundaries or lines these are polygons so they also have a fill by default and now it's covering the population of course we can just drag and drop this as you can in a map app to have the population on top but i think we would like only to show the boundaries so for that you double click and you click on the fill for the color and then you can change the fill style to be no brush and then okay and then we will only have the boundaries so what we now can do is to calculate the population within each of these boundaries so we'll then go back to the processing toolbox move this to the button so click on this one and then it's another statistics tool we're not doing it for the whole raster layer but just for the different polygons and that one is called sonal statistics double click that one and then the raster layer is still the same only one value band one and then the vector layer we want to use as the zones are the boundaries layer this will add some properties or columns to our data so i will just prefix this with population and you can also see here i'll go with the default but you can also see the sort of calculation you can do from the from this menu here and then we go to run and then it has by counting every square that falls within each of these districts it has measured the population and this can of course be any sort of polygon it doesn't need to be the district we maybe have the population already it can be any sort of area you can define and then if i use the identifier tool and click on this you will see the population count so in this district is 21 000 this one now sorry this is the population count it's just a number of these cells 100 by 100 meters population sum is the total population so in this it's 850 000 people living in this district we can also open the attribute table which is called data table in the maps app and then we will have a list this is a long table so i will just make it shorter by right clicking here organize columns deselect all and then i select only name and population sum and then you have a list here of every every district and if you click on this you can sort them from the highest population 1.7 million to the lowest which is only 200 000 people living within so this was how what you can do with your org unit polygons if we would like to see people living around facilities like a hospital we need to use a different technique so i'll go back to the maps app i will add some facilities so go to facility layer and for this just to not get too many i will only have of group hospital add layer and then we have this same procedure so you click on this menu download the data download and then what you can do is to go back to QGIS open your data folder and miss this one okay i'll do the other way layer add layer vector layer and then select the facilities layer and open and then add and close and now this will just show as tiny small dots on the map so we would like to style this one as well so i double click the layer i can change the name to hospitals and then to style it i would like to use a special symbol for hospital so i search for it here and i find a hospital icon and then i add this to the map and you have this small red crosses i will also just rename the boundaries layer to districts so now we have the facilities there is one extra complexity here and that is that these facilities are in latitude longitude degrees and what i would like to do is that i will find the population living within five kilometers from this and that is a bit hard for most of us to express in in latitude and longitude degrees so i need to change the map projection of this to be able to do that so i will do that by exporting the labor layer save the same features i haven't and then i can just name it hospitals projected and then here i can select a map projection this is a very complex field within mapping so we'll not go into detail but basically you should know what your national projection is for your country and use that one you could also search for a country and see projections that are meant for that country so i will use this one and then okay so this should now have been done and already added again to the map so now we have two hospital layers and then we will use this last one to calculate the zone around each hospital so we'll basically make a buffer that you can also do in the in the maps app so again we go back to the toolbox we search for buffer and then you can see if i switch between the if i take the hospitals you get a warning and this is also in degrees so it's you can't give a distance here in meters so but the one we converted we have the possibility to add a distance in meters so we i would like to have five kilometers from buffer around each hospital so i write 5000 and then run and then we will have this added and these two are sort of covering the the hospital and data we could move it below the at least the hospitals and then if we double click them we can change the style so i will select a yellow color and then make it transparent like this and then we select okay and then you get this view and you can see what's contained inside so what we now want to do is that to count every population square within each of these circles and then we can use the same tools as we did with the polygons because now these are just turned into circular polygons on our map so we search on statistics sonar statistics and then raster layer will still be the same population layer and then we select the buffers for the population and then we also add the same column prefix and then run and if we now click on this this and to see you will see you have the population count so around this hospital here there is the population of 52 000 while this one is having a population of 10 000 and again when we create these buffers all the metadata from the facilities were included so we can also make look at the attribute table for this one and we can decide to organize the columns and then deselect all and only see the name and the population sum and then you will have a list of all the hospitals with the population here in this column so we can see which one has the most population in within five kilometers and this one who only has 623 people within five kilometers I think we need to stop there I see that the time is going I will just show you there is one more possibility and there is that plug-in for QEIS which allows you not only to to select the five kilometers buffers around but you can actually check the travel distance so how far can you travel within for example 30 minutes and 60 meters either by walking or by car and then you can get the polygons for these areas and then measure the population which of course will be very different than just taking the the radius okay I'm running out of time just to mention we have a had the GIS academy the first ever we had last year in India and this is a possibility something we can organize for other his groups he's supposed to get with his pd where we can teach you more of these techniques we really want more of you to use the the mapping tools and the more advanced capabilities okay I have maybe have a few minutes for question Austin do you know if anything has arrived thanks for the great presentation there was one question that I kind of answered but I'll bring it up to you as well in case you have any other insights the question was about cases where staff ends up entering events with coordinate zero zero uh is there a way to edit this in bulk or the only way to fix this is to go in the capture or tracker app find the find and edit each event individually I think I'm more I'm more I'm less than to deal those interface than the maps up but I think you need to to fix it individually yeah so my my suggestion there I'll just share it with the with the group here was that you can so the second half of that question was something that can help staff correct these errors faster if there are a lot is to get an export file from the maps app containing only the outliers it can be a new select feature option where you select all the points and export all data associated with them in a spreadsheet or json so I mentioned that there is the download data capabilities in the event layer for the maps app so you could download all of the files as a geo json file and then edit them in qgs for instance if you wanted to um obviously you need to know where the points are actually supposed to be so bulk editing is kind of difficult um because they might not all be this supposed to be in the same place even though they all ended up at zero zero um I also mentioned that you should be possible to export the events directly from the uh the import export app and then re-import them to the import export app so you could edit them manually in qgis or something um when you do the the export and then re-import them into the import export app that's probably the best we have now and I mentioned that it'd be it'd be nice to have some sort of an invalid geometry search function and bulk edit capabilities um but that's not currently in the core of dhs2 yeah any other thoughts on that I mean it's it's hard to I think it's hard to rectify those errors because you don't necessarily know where that coordinate is supposed to be when it when it's entered at zero zero now that's the challenge you sort of needs to to take an individual account on each of them view on them so yeah but I would just say that like it also strong arguments for not allowing coordinates of zero zero since it's basically nothing at least within our field of work it's nothing it should never be be located there yeah so that's that's a good feature request maybe for the capture app that was the only question it looks like that same person is is responding now so they might have a follow-up question but there's no other questions on the community practice at the moment there are a couple more in the zoom Q&A if you want to take a look at that I see two there um sure I'll just mention them and Bjorn you can answer maybe so the first one is how are the colored squares calculated is it population density in a specific area and what is the area measurement so for the population data I showed now they are with this 100 by 100 meter square there is the total population living within this I don't have the details of how these maps are are are created and how accurate they are I think they are looking at building footprints and some advanced once tools there to sort of measure the data so when we add our own polygons on top these tools are basically just counting the the squares the 100 and 100 by 100 meter squares as fall within this polygon and then just sum up all the values for each square um and then the second question which I think you did but it came in at the very end so maybe they missed it was kindly walk us through how to get the population density from google engine into dhs2 so maybe that's getting the actual data into dhs2 maybe that's the question so maybe I can is that the last question I can just do my summary and mention it yeah yeah so just a quick summary that dhs2 maps is mostly just to make maps so to view your data it has still quite limited capabilities of analysis and then you need to move out to other GIS program which is not very easy with the download data functionality we have we have also interoperability as the main focus for the next maps app so we want to make it even easier to move the data between dhs2 maps and other tools and there are also some new very recent initiatives to actually add these capabilities into the maps app itself so we are looking both in to into this with google and asry now to see if you can just import population data add your boundaries or facilities and then do this calculation directly within the maps app so yeah I think that is it where we have been through the session we have spent the time thanks a lot for following I will still look at the questions in this community channel so you can please continue to post them there and I will try to answer thank you