{"id":1016,"date":"2015-05-12T04:47:50","date_gmt":"2015-05-12T04:47:50","guid":{"rendered":"http:\/\/blogs.lincoln.ac.nz\/gis\/?p=1016"},"modified":"2023-05-07T04:11:55","modified_gmt":"2023-05-07T04:11:55","slug":"home-on-the-range","status":"publish","type":"post","link":"https:\/\/blogs.lincoln.ac.nz\/gis\/home-on-the-range\/","title":{"rendered":"Home on the Range"},"content":{"rendered":"<p><em>In this post we&#8217;ll cover the ins and outs of creating home ranges for animals based on point locations. \u00a0This was mainly written as a tutorial for Ecology students but by all means, feel free to have a go.<\/em><\/p>\n<p>In animal ecology there&#8217;s an important concept around home ranges for animals, which could be thought of as their territory, for lack of a better word.\u00a0 If animal ecologists are lucky to have locational data for their animals of interest, they are also often concerned with identifying this territory and some of the environmental characteristics that go with that territory. \u00a0Home ranges tend to look something like this when plotted on a map:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1045\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult.jpg\" alt=\"EndResult\" width=\"1361\" height=\"729\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult.jpg 1361w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult-300x161.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult-1024x548.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult-768x411.jpg 768w\" sizes=\"auto, (max-width: 1361px) 100vw, 1361px\" \/><\/a><\/p>\n<p>So here we can see isolpleths (contour lines) that contain 50 and 95% of all the locations.\u00a0 Splitting the home range into 50% and 95% contour lines is important to animal ecologists as it enables the researcher to see activity patterns. For example, within the 50% contour is where the animals was estimated to have spent 50% of its time during the period of interest. We can also see the Landcover Database underneath and also the attribute table from a spatial join that allows us to know how many points occurred in each of the landcovers within the 95% isopleth.\u00a0 Sweet, huh?<\/p>\n<p>In this post I&#8217;ll take you through how home ranges are derived and what you can then do with them.\u00a0 There are some built in tools in ArcGIS that allow us to derive some crude home ranges, but as we&#8217;ll see, to do it properly means going outside ArcGIS a bit and working with some other software.\u00a0 I&#8217;ll cover what you need and how to install the extra bits.<\/p>\n<p>In many cases, their data have been collected from GPS (Global Positioning System) collars fitted to the animals.\u00a0 Left to wander freely, the GPS records their positions over time which can then be downloaded for analysis later.\u00a0 Below is an example of this in an Excel spreadsheet:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/05\/SpreadSheetwithGPS2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1051\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/05\/SpreadSheetwithGPS2.jpg\" alt=\"SpreadSheetwithGPS2\" width=\"1364\" height=\"703\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/05\/SpreadSheetwithGPS2.jpg 1364w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/05\/SpreadSheetwithGPS2-300x155.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/05\/SpreadSheetwithGPS2-1024x528.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/05\/SpreadSheetwithGPS2-768x396.jpg 768w\" sizes=\"auto, (max-width: 1364px) 100vw, 1364px\" \/><\/a><\/p>\n<p>(<a href=\"http:\/\/gis.lincoln.ac.nz\/Edith2.xlsx\">click here<\/a> for a copy of this speadsheet.<\/p>\n<p>The first column is an identifier for the individual.\u00a0 In this case, each record relates to the location of a Wapiti known as Edith.<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/wapiti.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1018\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/wapiti.jpg\" alt=\"wapiti\" width=\"253\" height=\"199\" \/><\/a><\/p>\n<p>(That isn&#8217;t Edith as far as I know &#8211; unless females are now growing antlers.\u00a0 Kids these days&#8230;)<\/p>\n<p>From a GIS point of view, the important columns are the Latitude and Longitude ones &#8211; these are the x- and y-coordinates that will allow us to map their locations.\u00a0 This spreadsheet can be added to ArcMap in the usual way (though note than when you add it you need to navigate down to the individual sheet, here it&#8217;s called &#8216;Edit 2$&#8217;) &#8211; here it is shown in my Table of Contents (you&#8217;ll need to click the List by Source button to see the table):<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/TOC.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1020\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/TOC.jpg\" alt=\"TOC\" width=\"216\" height=\"144\" \/><\/a><\/p>\n<p>In order to map the points, right-click on the table name and go to &#8220;Display X Y Data&#8230;&#8221; \u00a0and set it up with the field name for the x-coordinate (Longitude) and the field name for the y-coordinate (Latitude).\u00a0 We haven&#8217;t got a z-coordinate (elevation) in these data, but if we did we could also set that.<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/DisplayXY.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1021\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/DisplayXY.jpg\" alt=\"DisplayXY\" width=\"355\" height=\"559\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/DisplayXY.jpg 355w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/DisplayXY-191x300.jpg 191w\" sizes=\"auto, (max-width: 355px) 100vw, 355px\" \/><\/a><\/p>\n<p>When the window first opens, the Coordinate System Description will be blank.\u00a0 We could leave it that way, but a better practice is to set it.\u00a0 We know that these data were collected with a GPS unit and that GPS uses the WGS84 (World Geodetic System 1984) as its coordinate system, so to set it, click the Edit button and wind your way down the path of: Geographic Coordinate Systems &gt; World &gt; WGS84.\u00a0 (If you&#8217;re going to use this one a lot, click the &#8220;Add to Favorites&#8221; (sic) button, <a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/AddToFavorites.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1022\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/AddToFavorites.jpg\" alt=\"AddToFavorites\" width=\"27\" height=\"24\" \/><\/a>, and it&#8217;ll be there for you next time without having to click through all the folders.\u00a0 Once I&#8217;ve clicked okay, the points are then mapped:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MappedPoints.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1023\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MappedPoints.jpg\" alt=\"MappedPoints\" width=\"1362\" height=\"701\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MappedPoints.jpg 1362w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MappedPoints-300x154.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MappedPoints-1024x527.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MappedPoints-768x395.jpg 768w\" sizes=\"auto, (max-width: 1362px) 100vw, 1362px\" \/><\/a><\/p>\n<p>She&#8217;s been busy.\u00a0 Note the points are in a new layer called &#8220;&#8216;Edith 2$&#8217; Events&#8221;\u00a0 An event layer is a temporary layer and to do any substantial analysis we should really save it as a permanent file.\u00a0 Even better, we should convert it (project it) from Latitude\/Longitude (which is really a 3 dimensional coordinate system) to a 2D flat map projection, which will make area and distance measurements easier and more accurate.\u00a0 The standard projection for New Zealand is <a href=\"http:\/\/www.linz.govt.nz\/data\/geodetic-system\/datums-projections-and-heights\/projections\/new-zealand-transverse-mercator-2000\" target=\"_blank\" rel=\"noopener\">New Zealand Transverse Mercator<\/a> (NZTM), a projection that was designed to play very nicely with GPS data.\u00a0 So we&#8217;ve got a two step process up next: export the events layer to a shapefile and then project that file from WGS84 to NZTM.<\/p>\n<ul>\n<li>Right-click on the Events layer and go to Data &gt; Export Data.\u00a0 Save your output as a shapefile (you could just as easily save it as a feature class in a geodatabase if you prefer).\u00a0 Here I&#8217;m saving it to a HomeRanges folder in my Dropbox (I&#8217;m doing this on a laptop) and calling it EdithPointsWGS84.shp:<\/li>\n<\/ul>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/ExportPoints.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1024\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/ExportPoints.jpg\" alt=\"ExportPoints\" width=\"403\" height=\"331\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/ExportPoints.jpg 403w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/ExportPoints-300x246.jpg 300w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/a><\/p>\n<ul>\n<li>To project these points, open ArcToolbox and go to Data Management Tools &gt; Projections and Transformation &gt; Project (note that this tool only projects vector data; there&#8217;s a different tool to project rasters in the Raster folder).<\/li>\n<\/ul>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/PorjectTool.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1025\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/PorjectTool.jpg\" alt=\"PorjectTool\" width=\"298\" height=\"681\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/PorjectTool.jpg 298w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/PorjectTool-131x300.jpg 131w\" sizes=\"auto, (max-width: 298px) 100vw, 298px\" \/><\/a><\/p>\n<ul>\n<li>The Project tool window opens:<\/li>\n<\/ul>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/ProjectWindow.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1029\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/ProjectWindow.jpg\" alt=\"ProjectWindow\" width=\"605\" height=\"418\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/ProjectWindow.jpg 605w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/ProjectWindow-300x207.jpg 300w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/a><\/p>\n<ul>\n<li>Once you&#8217;ve set the layer to project (EdithPointsWGS84.shp in this case) note that coordinate system gets automatically picked up from that layer.<\/li>\n<li>Give the new, projected layer a useful name.\u00a0 Here I&#8217;ve used EdithPointsNZTM.shp.<\/li>\n<li>The Output Coordinate system can be set by clicking the Edit button at right.\u00a0 The path is Projected Coordinate Systems &gt; National Grids &gt; New Zealand &gt; NZGD2000 New Zealand Transverse Mercator about six pages down (note the dizzying array of NZ systems).<\/li>\n<li>The Geographic Transformation gets picked up automatically &#8211; in this case the default is fine.<\/li>\n<li>Click OK and a new layer gets created and added to your map.<\/li>\n<\/ul>\n<p>When added to the map it will overlay on top of the original one even though it&#8217;s in a completely different coordinate system.\u00a0 The coordinate system of the map is usually set to the first layer added, which in this case was WGS84 (check out the coordinates at lower right of the map window).\u00a0 We&#8217;re going to work from here on in in NZTM, so remove all the layers except the NZTM layer.\u00a0 Then right-click on &#8220;<strong>Layers<\/strong>&#8221; (the name of the data frame) and go to Properties &gt; Coordinate System and set it to NZTM (path above) and then click apply.\u00a0 The last thing we need to do it to change the display units so switch over to the General tab and change the Display units from Decimal Degrees to Meters:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GeneralTab.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1031\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GeneralTab.jpg\" alt=\"GeneralTab\" width=\"477\" height=\"619\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GeneralTab.jpg 477w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GeneralTab-231x300.jpg 231w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><\/a><\/p>\n<p>Okay, so we&#8217;re just about ready to get started on our home ranges.\u00a0 ArcGIS has a few built in tools to derive rough home ranges.\u00a0 The main one is the Minimum Bounding Geometry tool (ArcToolbox &gt; Data Management Tools &gt; Features).\u00a0 What this does is create the smallest polygon that surrounds all the data points.\u00a0 It&#8217;s pretty crude and doesn&#8217;t really allow you to do anything special:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MBG.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1033\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MBG.jpg\" alt=\"MBG\" width=\"608\" height=\"419\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MBG.jpg 608w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MBG-300x207.jpg 300w\" sizes=\"auto, (max-width: 608px) 100vw, 608px\" \/><\/a><\/p>\n<p>Setting the Geometry Type to CONVEX_HULL produces this:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MGBPolygon.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1034\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MGBPolygon.jpg\" alt=\"MGBPolygon\" width=\"1365\" height=\"729\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MGBPolygon.jpg 1365w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MGBPolygon-300x160.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MGBPolygon-1024x547.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/MGBPolygon-768x410.jpg 768w\" sizes=\"auto, (max-width: 1365px) 100vw, 1365px\" \/><\/a><\/p>\n<p>That&#8217;s useful, but from an animal ecologist&#8217;s point of view it&#8217;s not quite robust\u00a0enough.\u00a0 The literature demands a different approach, that of kernel density estimations.\u00a0 It sounds a bit involved, but really it&#8217;s just a way to objectively measure how densely grouped\u00a0a given set of points are.\u00a0 This is done by moving a fixed &#8220;neighbourhood&#8221; over each point (this is the kernel) and see how many other points are within that neighbourhood, thus allowing us to estimate the density.\u00a0 Conceptually, you&#8217;re fitting a smooth curve over each of\u00a0the point locations and then adding up all where any of the curves overlap.\u00a0 The kernel is usually a 3 x 3 neighbourhood of grid cells.\u00a0 This is essentially a raster analysis &#8211; the output is a grid where each grid cell has a measure of density.\u00a0 The next step is to create contours (or isopleths) based on the grid values and use these to define the polygon home ranges.\u00a0 Animal ecologists are often particularly interested in the 95% and 50% isopleths, those contours that contain within them either 95% or 50% of all the points (the 95% isopleth is often used to define the home range while the 50% isopleth is the core range).\u00a0 So far, so straightforward (right?).\u00a0 So how do we do it?<\/p>\n<p>ArcGIS does have a kernel density estimator tool which works fine (ArcToolbox &gt; Spatial Analyst Tools &gt; Density).\u00a0 The issue really is isopleths.\u00a0 Determining the 95% points is not so straightforward but there is another option that allows us to do both in a reasonably easy way &#8211; the <a href=\"http:\/\/www.spatialecology.com\/gme\/index.htm\" target=\"_blank\" rel=\"noopener\">Geospatial Modelling Environmen<\/a>t (GME).\u00a0 This is an independent bit of software that does all sorts of great spatial analysis (some similar to built in ArcGIS tools, but there are also more specialised tools that apply to specific disciplines).\u00a0 So before we do our home ranges we need to download and install GME.<\/p>\n<h5><strong>Installing GME<\/strong><\/h5>\n<p>GME is a command line program which a huge array of tools built in.\u00a0 Some of those tools are actually using <a href=\"http:\/\/www.r-project.org\/\" target=\"_blank\" rel=\"noopener\">R<\/a>, the open source statistical modelling tool set, so we&#8217;re also going to need to ensure that the correct version of R is also installed.<\/p>\n<p>Going to the <a href=\"http:\/\/www.spatialecology.com\/gme\/gmedownload.htm\" target=\"_blank\" rel=\"noopener\">GME download page<\/a>, you&#8217;ll see that there are various versions that run against ArcGIS.\u00a0 Most campus machines are running ArcGIS 10.3 so the version you would want to download is probably 0.7.4. \u00a0(Check which version you have on your computer before downloading GME.), plus the right version of R (I&#8217;m using the latest which is 3.2.0).<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEPage.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1035\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEPage.jpg\" alt=\"GMEPage\" width=\"808\" height=\"595\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEPage.jpg 808w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEPage-300x221.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEPage-768x566.jpg 768w\" sizes=\"auto, (max-width: 808px) 100vw, 808px\" \/><\/a><\/p>\n<p>Further down the page are installation instructions.\u00a0 What you end up downloading is a zip file that needs to be extracted somewhere.\u00a0 I&#8217;d try to put it somewhere safe\u00a0and run the Setup.exe file. \u00a0(If you&#8217;re trying this on an LU computer, you&#8217;ll probably need to contact ITS and request it to be installed).<\/p>\n<p>Next, get the latest version of R and have it installed if you don&#8217;t already have it.\u00a0 There are a few libraries that need to be added to the basic installation so when you start up R, copy and paste the line below at the R cursor, hit return, pick a mirror site (scroll down to New Zealand &#8211; there&#8217;s a mirror at Auckland Uni):<\/p>\n<p>install.packages(pkgs=c(&#8220;CircStats&#8221;, &#8220;deSolve&#8221;, &#8220;coda&#8221;, &#8220;deldir&#8221;, &#8220;igraph&#8221;, &#8220;RandomFields&#8221;, &#8220;ks&#8221;))<\/p>\n<p>That&#8217;s all we should need to do in R once those new libraries are installed.<\/p>\n<p>To check and make sure that everything&#8217;s set up properly for GME, open it and go to Help &gt; Citation.\u00a0 If you see lines for both GME and R than you&#8217;re good to go.\u00a0 If not, well I think it may be time to consider a new career path&#8230;<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/RCitation.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1036\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/RCitation.jpg\" alt=\"RCitation\" width=\"758\" height=\"543\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/RCitation.jpg 758w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/RCitation-300x215.jpg 300w\" sizes=\"auto, (max-width: 758px) 100vw, 758px\" \/><\/a><\/p>\n<p>(Are we ever going to get to the home ranges?\u00a0 Yes.)<\/p>\n<p>So now were ready to crank out some home ranges (told you).\u00a0 Back in the main GME window, type &#8220;kde&#8221; in to the Commands window at upper left of the window.\u00a0 It will pop up in the box below it, so click once on it and a set of entry windows appears at the right, as shown below:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEKDE.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1037\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEKDE.jpg\" alt=\"GMEKDE\" width=\"758\" height=\"544\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEKDE.jpg 758w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEKDE-300x215.jpg 300w\" sizes=\"auto, (max-width: 758px) 100vw, 758px\" \/><\/a><\/p>\n<p>You can now populate it with your parameters.\u00a0 We&#8217;ll set EdithPointsNZTM.shp as the &#8220;in&#8221; file and save the &#8220;out&#8221; grid as EdithKDE.\u00a0 The bandwidth entry is an important one and one of the reasons why using GME is preferable (ArcGIS doesn&#8217;t have this option).\u00a0 There are several options but the one most favoured in the literature seems to be LSCV (Least Squares Cross Validation).\u00a0 (I don&#8217;t claim to understand how this works, but then I don&#8217;t understand what my dog thinks).<\/p>\n<p>Here are the settings I&#8217;ve used as a first go.\u00a0 I&#8217;ve opted to use the defaults for the remaining parameters:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDE1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1039\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDE1.jpg\" alt=\"EdithKDE1\" width=\"764\" height=\"548\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDE1.jpg 764w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDE1-300x215.jpg 300w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/>A<\/a>fter clicking Run at bottom,\u00a0here&#8217;s the result on my map (I had to manually add the layer from my folder):<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDEMap.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1040\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDEMap.jpg\" alt=\"EdithKDEMap\" width=\"1360\" height=\"728\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDEMap.jpg 1360w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDEMap-300x161.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDEMap-1024x548.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDEMap-768x411.jpg 768w\" sizes=\"auto, (max-width: 1360px) 100vw, 1360px\" \/><\/a><\/p>\n<p>Just for kicks, here&#8217;s what it looks like in 3D to give you a sense of what it&#8217;s created:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDE3D.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1041\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDE3D.jpg\" alt=\"EdithKDE3D\" width=\"1136\" height=\"605\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDE3D.jpg 1136w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDE3D-300x160.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDE3D-1024x545.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithKDE3D-768x409.jpg 768w\" sizes=\"auto, (max-width: 1136px) 100vw, 1136px\" \/><\/a><\/p>\n<p>So you can (hopefully) see that the surface is higher where the points are denser.\u00a0 We&#8217;re not quite done yet.\u00a0 Next we need to derive our isopleths.\u00a0 Back to GME and type &#8220;isopleth&#8221; in the command window.<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEIsoplethWindow.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1042\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEIsoplethWindow.jpg\" alt=\"GMEIsoplethWindow\" width=\"762\" height=\"544\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEIsoplethWindow.jpg 762w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/GMEIsoplethWindow-300x214.jpg 300w\" sizes=\"auto, (max-width: 762px) 100vw, 762px\" \/><\/a><\/p>\n<p>Key settings here are the input, output and Quantiles.\u00a0 With the Quantiles I can set which levels I want. &#8221;\u00a0<strong>c(0.5,0.95)<\/strong>&#8221; tells GME I was the 50% and 95% isopleths.\u00a0 If I leave this blank it will do the 100% isopleth.\u00a0 Also of note, I&#8217;ve specified a polygon output.\u00a0 Isopleth lines are good for display but having a polygon means I could use that clip out other layers or do some spatial analysis to see the distribution of stuff inside a given isopleth as we&#8217;ll see later.\u00a0 Here&#8217;s the output.<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithIsoandPoly.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1043\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithIsoandPoly.jpg\" alt=\"EdithIsoandPoly\" width=\"1361\" height=\"721\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithIsoandPoly.jpg 1361w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithIsoandPoly-300x159.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithIsoandPoly-1024x542.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EdithIsoandPoly-768x407.jpg 768w\" sizes=\"auto, (max-width: 1361px) 100vw, 1361px\" \/><\/a><\/p>\n<p>You can see here that I&#8217;ve got two separate polygons for each isopleth, plus the isopleths themselves.\u00a0 As a next step I can add a layer like the Landcover Database and get a sense of what landcovers Edith\u00a0spends her\u00a0time in:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/KDEwithLCDB.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1047\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/KDEwithLCDB.jpg\" alt=\"KDEwithLCDB\" width=\"1361\" height=\"729\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/KDEwithLCDB.jpg 1361w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/KDEwithLCDB-300x161.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/KDEwithLCDB-1024x548.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/KDEwithLCDB-768x411.jpg 768w\" sizes=\"auto, (max-width: 1361px) 100vw, 1361px\" \/><\/a><\/p>\n<p>Great, so now we can visually see which landcovers fall within the isopleths.\u00a0 If we want to be a bit more analytical then a good next step is to clip out the LCDB polygons within the isopleths.\u00a0 Here&#8217;s where the polygons come in handy &#8211; I can use one of the polygons to clip out what I need.\u00a0 I first went into the polygon attribute table and selected the record with 0.95 in the isopleth field.\u00a0 Then I used the Clip tool (ArcToolbox &gt; Analysis &gt; Extract or Geoprocessing menu &gt; Clip).\u00a0 Here&#8217;s the output.<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/LCDBClip.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1048\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/LCDBClip.jpg\" alt=\"LCDBClip\" width=\"1365\" height=\"728\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/LCDBClip.jpg 1365w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/LCDBClip-300x160.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/LCDBClip-1024x546.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/LCDBClip-768x410.jpg 768w\" sizes=\"auto, (max-width: 1365px) 100vw, 1365px\" \/><\/a><\/p>\n<p>Next, I&#8217;d like to get a sense of how many of the 95% points fall within each of the three landcover classes.\u00a0 There are a few ways to do this &#8211; one handy way is to use the <a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/\/00080000000q000000\" target=\"_blank\" rel=\"noopener\">Spatial Join<\/a> tool (ArcToolbox &gt; Analysis &gt; Overlay).\u00a0 This tool is very similar to the <a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/\/00080000000n000000\" target=\"_blank\" rel=\"noopener\">Identity<\/a> with one useful exception.\u00a0 Depending on how you set it up, one of the fields you get in the output is called &#8220;Join Count&#8221; and neatly summarises the number of features within another feature.\u00a0 So in this case, I&#8217;ll join the Edith points to the LCDB polygons as a one-to-one join, which will summarise the number of points falling within each LCDB class:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1045\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult.jpg\" alt=\"EndResult\" width=\"1361\" height=\"729\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult.jpg 1361w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult-300x161.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult-1024x548.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/04\/EndResult-768x411.jpg 768w\" sizes=\"auto, (max-width: 1361px) 100vw, 1361px\" \/><\/a><\/p>\n<p>We can see from this that, over the time these data were collected, Edith spent most of her time (181 of 202 records) hanging out in Indigenous Forest (can&#8217;t say that I blame her for that).<\/p>\n<p>So, we&#8217;ve covered a lot of ground here (excuse the pun).\u00a0 We&#8217;ve seen how to first map point data from a spreadsheet, then projected them from WGS84 to NZTM.\u00a0 We next got GME and R set up and used them to derive the 50% and 95% home ranges using kernel density estimation.\u00a0 Then, a spatial join allowed us to summarise where Edith was spending her time.<\/p>\n<p>C<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post we&#8217;ll cover the ins and outs of creating home ranges for animals based on point locations. \u00a0This was mainly written as a tutorial for Ecology students but by all means, feel free to have a go. In animal ecology there&#8217;s an important concept around home ranges for animals, which could be thought [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1016","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/1016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/comments?post=1016"}],"version-history":[{"count":1,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/1016\/revisions"}],"predecessor-version":[{"id":4154,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/1016\/revisions\/4154"}],"wp:attachment":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/media?parent=1016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/categories?post=1016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/tags?post=1016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}