home Range calculation with QGIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today i will show you how to calculate the home range of animals using the method of meaning complex polygon using qgis we start from model the moodle page of our data analysis module and we scroll down to the section of this week where we have the coordinates that we use for the practical today this is the job is gps complete 2005 file this is a csv comma separated value file that we can save on in this case i save it on my desktop and it is a file that contains coordinates of two troops of baboons that were followed by researchers over several months and in this fight we have a few months from the 2005 season and one of the researchers involved in this project is dr harry marshas who's probably also involved in collecting these coordinates so i have now saved the coordinates on desktop let's have a look with the microsoft excel to what we can see inside the file so these are the uh there are a few columns of data the first column is for the troop and we have the two troops let's zoom in a little bit we have the two troops j and and and then we have information about the date of the observation month year and day then we have a time stamp and this is a code id of each observation the time of the day when the observation was collected and then the two coordinates of longitude and latitude in this case y of course is latitude and axis longitude in degrees and then the researchers in this case i think dr marshall have created the two more columns to simplify the analysis of this data set one with the information about the month and one with information about the year of the of the data and then this last column troop month takes together the information about the troop and the month which is useful if we want to subset the data to plot some smaller data set or to conduct analysis on a particular month and year of the troop i opened qgis this is qgis version 3.10 this is a free open source software that you can download at home and i start a new project where i will plot these coordinates the first step that i need to do is that i need to read the coordinates now you cannot see the the new bar on my computer but what i'm going to do is that i um select i go to the layer menu add layer and add the limited text layer this window opens when i need to select the file from which i need to read the coordinates so i choose the file and in this case i open that service gps complete file i can check that the coordinates that i'm reading that the file is interpreted correctly in particular the delimiters that i use by observing that the columns in this preview reflect actually the data that i have in the file if i for instance i didn't have the comma separator in this case i or everything would be condensed in a single column and i wouldn't be really able to to analyze the data to open the data the other thing that i need to check is that the i'm plotting latitude and longitude in the right field in this case the name of the columns is the same as the name of the field so it's difficult to get it wrong but you usually have something like longitude and latitude and now you need to think about latitude is something that we usually plot on the y-axis of the map while launching to do something that we usually plot on the x-axis of a map okay so i need to make sure that i get it right here and then i need to specify the geometry in this case these are geographic coordinates of latitude and longitude so i need a coordinate reference system crs that is appropriate for this and for most practical purposes you can just use this wgs 84 which is a model of the entire surface of earth which is quite accurate independently of the region that you are going to focus on of course if you focus on a very specific region you may have a slightly better model but for our purpose this wgs 84 is what you need and so once you have selected the good reference systems you just add the coordinates to the map and close and you see that we see these data points correspond to the positions of all the observations that we have in the data set and there is still no map behind the data and all the the points are the same colors we don't know which points correspond to different months or two different troops of baboons and so on this is all the information that we don't see yet in this map so what we want to do now one of the first thing that we want to do is to add the map which we do with it from this xyz tiles menu now you have already in my a version of qgis i already have this menu and i open one which is a google satellite this is a connection to google satellite images that will download the google satellite image and plot as a new layer on my project you probably do not have this connection yet so what you do is that you go on the xyz tiles and then right click or control click and create a new connection like this you need to give a name to this new connection let's say i don't know my connection to google satellite today say of course you just give a name that is easier simpler than this let's call it google satellite or something else but because i already had other connections i gave another name and then i paste the the web address for this connection this is something that you need to copy from somewhere else or to to find and and now i can just drag and drop i see this map appear and the coordinates have disappeared this is a deserted region in namibia we can see easily there is a river not much water flowing in the river but this is an important place for by boards because there is some vegetation along the river so it is a place where they can probably find food and sometimes also water i don't see the coordinates of my boots but i can just see if i drag the layer with the map behind the layer with the coordinates now this is also something that i can check i can zoom out to check that we are actually here in namibia and to too much okay and we can see that here is where the coordinates come from so i checked that everything is fine and if i want to zoom back to the original layer i just go to the layer right click or ctrl click and then i need to and zoom to the layer which is here okay and now i see these coordinates on the map i cannot check that the coordinates follow the geography you see they tend to follow the river which tells me that the projection to the map is good they they i can see that the animals interact with their environment from from the good projection of coordinates and map but now all the colors are the same so what i need to do is that i can change the color then i go to the properties tab and here in the symbology section i can change different aspects of minecraft let's say that i want them i like yellow i put them in a bright yellow color and i can also change the size of the marker and then apply and i see the new coordinates appear here in yellow but what i want to do today is more to have different colors for the two troops i go to this categorized item and i want to give different colors based on the troop of baboon okay so i go here and select true by categorize my troop and then classify i see up here two labels for j and l and then another marker for all other coordinates but i do not have anything else i remove it and i can also change the color of these for instance i may want to have a troop in say yellow and same symbol size and another troop i can use say red for instance and i go to pick a color that i like okay and then apply and i see now the two troops we can see easily that these two troops uh occupy different regions they don't overlap too much except here in this area and there is something that i need to tell you that you probably cannot know which is in this particular point here there is a water source so this is a place where the two troops of baboons need to come often for instance to find water and this is part probably one of the reasons why the the coordinates overlap in this particular point okay now what i want to do is i said before i want to calculate the whole range of these coordinates but before i can do this i need to go and check that i have the toolbox visible in the processing manual now it is appeared and then i go back and make the toolbox visible again and i will use a tool that is here in the vects or geometry section which is the um minimum bounding geometry here so i select the minimum bounding geometry i want to plot the service gps complete as my layer file and then i want to add a field that i use to categorize this data by troop in this case i want a home range for each troop and then the geometry type i choose convex hull which is a synonym for minimum convex polygon and then i can run and i see already two big regions appear which seems good except that they are the same color and my data points have disappeared behind these regions so i what i can do is that i can drag and drop the layer behind the layers with the coordinates and then i can also change the colors and appearance of these regions so i navigate to the property tab and again to this symbology and set to categorized in this case by troop again so classify i remove the one that doesn't apply and apply everything now i see the regions but there is something that else that i may want to do here the regions are clear but i want to change maybe some other static parameters of these regions for instance i may want to set the different color in particular different transparency so that i can see the map behind the region i do it for the j and here i do it for a using a slightly different method now i change the transparency let's see how it comes and this seems good another thing that i may want to do is to have colors that are consistent for these two troops say that i use colors in the red dish range for one troop and colors in the yellow which range for the other strokes i'll go back to this property menu and i can change the color individually of each of these regions so i said that this one would be red i choose another slightly different value of red from the darts and the other troop would be say something around the yellow and i choose another value of yellow slightly different from the one they use for the dots okay apply and okay and this seems quite nice but they lost the transparency for this one so i need to go back and and do it so i i put back the transparency to 50 percent okay now that we have these home ranges we can use them to calculate the area of the home range directly from qgs but before i do this i need to go in the settings of the project it's in the project menu properties and here you have the units that are used to measure to measure distances and areas in the center of this and as you can see by default this is in meters and square meters or maybe something else for you i don't know but we because we are measuring large areas we we want something bigger we want kilometers and maybe for the area we want square kilometers and that once we have done this we can just uh continue let's press ok and close now we can to calculate the area we go to the menu to to the layer which select the attribute table and we can see that there are already some values for r and perimeter but these values actually don't make any sense right now because the values for red and perimeter come from the units that we had before which are latitude and longitude so we need to recalculate them i go here to the um edit tab and i can assign new values here to the different um information that i have here so id troop error and perimeter of course i do not want to change the id or the true i only want to recalculate the area and the perimeter so be careful not to do this i just reassign the id i go to the area and i go to the geometry tab and then this area with the dollar which assigns the error for each particular component of footage and then update and i see that the values of there have now changed to something that is meaningful around 23 and 61 kilometers square for each troop but the perimeter is still in the old units so this is wrong i need to update the perimeter as well so i go to perimeter and i do exactly the same thing except that this time i go to the geometry tab again but instead of clicking area i need to pick the the knowledge the perimeter the perimeter so i go down to perimeter with the dollar here and of course i need to remove area and geometry i just want the perimeter and when i'm ready i press on okay and i update all the calculations and i see that now the numbers for perimeter make sense as well okay so i've saved i've done the item perimeter i forgot to say these values are varying parameters something that you may want to save on your computer because you can make graphs from those values for instance to check out the error and the perimeter of the two troops different or as we can see later how these values can change over time so the last thing that we can do is that we can add the decoration so the in particular the scale bar for the for the map so we enable the scale bar we need to select maybe a font that is the the good size and in this case um let's say that he i don't know let's let's pick a slightly 36 let's do a font size i don't know about the font type uh let's go with these parameters and then we need to decide where we put the bar in this case let's put it at the bottom right of the screen but maybe a little bit shifted and set it to 30 millimeters and do the same for vertical from from the corner and okay and you see that the scale bar applies it is five kilometers for this distance which probably makes sense also given the values of area and perimeter that we obtained before and i can zoom in and out and the scale bar remains there and this is a figure that they could take a screenshot and orders export in other ways i always need to be careful when i export these figures if there is too much information then the figure is not clear so i could decide that i removed the map as i did now or maybe that i remove the data points because if there are too many layers too many data points then the map becomes unclear and so there is no point in exporting a map that is not possible to read and so we have done this part now i want to show you something else we can we have this information not just about the troops but we could also want to categorize for each troop and for each month so i first tried this um to categorize my troop month and i need to replace the previous categorization and they see that now i have a lot of colors for each troop and each month if i do this apply i see that okay it is very confused on the map because i have many colors um yeah so so what i could do is that instead i i go back let's for now let's go back to the original categorization for this only by troop so i go back classify again yes and i apply okay and what i want to do instead is to calculate the home range for each troop and months so so that i can have a measure of how my range changes over time so i go to the same manu minimum bounding geometry but this time was field i choose through month and again geometry type is the minimum convex hull and run so now i get a huge number of areas each for one for each month that i can for which i can calculate the air in the same mat way that i've done before okay i could also change the the color of these areas as before i can do all this previous analysis but what is important is that i can visualize maybe all the areas all together they don't make any sense because they are not visible on the map so i can decide that i only choose what to visualize so let me go back for a moment to the the change the colors again for the um for the original uh data points okay i could decide that in this case i could decide that i remove some of these areas so that they focus maybe on only one single month like here but i also need to do the same for the coordinates so i go back to the properties and categorize again by troop and month so that they have different groups for uh different symbols for each troop and month apply and okay in this case i can do the same and just show the coordinates for the month number 10 here so and this makes a figure that i could export that is not too cluttered and it is quite nice and it seems that in on this particular month the bones are closer to the river as you can see maybe the area is a little bit smaller even if the minimum convex polygon doesn't reflect this very well but we can imagine that if this is for instance a dry month which is possible then the baboons will spend more time closer to the river because this is where the vegetation is persisting a little bit longer and this this is something that maybe is reflected in the home range unfortunately from this date it is not so clear because of course they converge closer to the river but they need to move a longer distance along the river and i can try and do different maps for each month and maybe export each map separately let's have a look very quickly here so what i do is that here is for instance for month 11 have the data and the range is much more circular and then it could do the same for uh for all the amounts let's let's just have a look quickly at the change in the habitat use by these baboons over each month i try now every single as every single month let's just do it with a coordinates so this is uh june and then july and then august and september here we see in this case they are getting closer to the river so this is probably a dry season october and they are still in the river in november here but they seem to move back to use a larger area okay so you have seen how to plot coordinate some qgs and on the map and how to measure the home range with the method of the minimum convex polygon
Info
Channel: Andrea Perna
Views: 984
Rating: 5 out of 5
Keywords:
Id: ZRmxLCu5KE4
Channel Id: undefined
Length: 25min 19sec (1519 seconds)
Published: Fri Nov 06 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.