{"id":3698,"date":"2022-08-03T14:09:41","date_gmt":"2022-08-03T02:09:41","guid":{"rendered":"http:\/\/blogs.lincoln.ac.nz\/gis\/?p=3698"},"modified":"2023-05-07T02:45:11","modified_gmt":"2023-05-07T02:45:11","slug":"shady-intersections","status":"publish","type":"post","link":"https:\/\/blogs.lincoln.ac.nz\/gis\/shady-intersections\/","title":{"rendered":"Shady Intersections"},"content":{"rendered":"<p><em>We look at using the Tabulate Intersections tool to do an off-beat spatial join.<\/em><\/p>\n<p>Postgrad Lucia had a problem, a spatial problem, to be more exact.\u00a0 As part of her MLA she&#8217;s doing some research on whether shade is equitably provided in Christchurch\u2019s parks, i.e., do wealthy neighbourhoods have more access to shade than poorer neighbourhoods.\u00a0 Her plan is to do a &#8220;shade audit&#8221; of a number of parks and relate that to socio-economic levels.\u00a0 Sounds like a pretty worthwhile study.\u00a0 As part of this, Lucia had to select a set of parks that fit two main criteria:<\/p>\n<ul>\n<li>In either the highest or lowest areas of socio-economic status, and<\/li>\n<li>the areas surrounding each park (known as access areas) need to\u00a0be\u00a0at the same socio-economic level as the park.<\/li>\n<\/ul>\n<p>These are mainly spatial criteria so GIS has something to offer (<em>Ed. it sure seems like everything is a spatial nail to your GIS hammer&#8230;<\/em>).\u00a0 Let&#8217;s start with the parks &#8211; Lucia was able to get a shapefile from the CCC with all the parks (822 in total) broken down into three categories: garden and heritage parks, local\/community parks and sports parks:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3700\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/Parks.jpg\" alt=\"\" width=\"3376\" height=\"2348\" \/><\/p>\n<p>Great start &#8211; we can think about socio-economics next.\u00a0 Doing this well is a challenge.\u00a0 Thankfully, a lot of effort has been put into this and we&#8217;ve got two options to choose from: the <a href=\"https:\/\/www.otago.ac.nz\/wellington\/departments\/publichealth\/otago830998.html\" target=\"_blank\" rel=\"noopener noreferrer\">NZ Deprivation Index<\/a> and the <a href=\"https:\/\/hgd.auckland.ac.nz\/imd18\/\" target=\"_blank\" rel=\"noopener noreferrer\">Indices of Multiple Deprivation<\/a>\u00a0(here&#8217;s a <a href=\"https:\/\/www.otago.ac.nz\/wellington\/departments\/publichealth\/research\/hirp\/otago020194.html#nzdep-comparison-imd\" target=\"_blank\" rel=\"noopener noreferrer\">comparison <\/a>between the two).\u00a0 For this project we&#8217;ve been working with the IMD.\u00a0 These data build on information contained in the 2018 census and distils this down to an index value of socio-economic deprivation.\u00a0 Values range from 1 (low deprivation) to 10 (high deprivation).\u00a0 They&#8217;re not the same as Ministry of Education deciles but are somewhat inversely related.\u00a0 The values give us an indication of the socio-economic status within a given area based on\u00a0seven different factors as shown below.<\/p>\n<figure id=\"attachment_3701\" aria-describedby=\"caption-attachment-3701\" style=\"width: 835px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3701 size-full\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/IMD_2018_Figure1.png\" alt=\"\" width=\"835\" height=\"587\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/IMD_2018_Figure1.png 835w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/IMD_2018_Figure1-300x211.png 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/IMD_2018_Figure1-768x540.png 768w\" sizes=\"auto, (max-width: 835px) 100vw, 835px\" \/><figcaption id=\"caption-attachment-3701\" class=\"wp-caption-text\"><a href=\"https:\/\/hgd.auckland.ac.nz\/imd18\/\" target=\"_blank\" rel=\"noopener noreferrer\"><em>https:\/\/hgd.auckland.ac.nz\/imd18\/<\/em><\/a><\/figcaption><\/figure>\n<p>To be useful for spatial analysis, the IMD values need to be mapped to some spatial data.\u00a0 In this case, it&#8217;s one of the spatial areas used in the 2018 census, specifically, the <a href=\"https:\/\/datafinder.stats.govt.nz\/layer\/92212-statistical-area-2-2018-generalised\/\" target=\"_blank\" rel=\"noopener noreferrer\">statistical area 2 <\/a>(SA2) zones.\u00a0 In urban areas, these are closely related to suburbs, though not exactly.\u00a0 (<em>Side note: there are no definitive boundaries to suburbs as far as I can tell &#8211; something that many real estate agents take advantage of.<\/em>)\u00a0 These data can be <a href=\"https:\/\/hgd.auckland.ac.nz\/data\/\" target=\"_blank\" rel=\"noopener noreferrer\">downloaded <\/a>and added to a map:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3702\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/IMD.jpg\" alt=\"\" width=\"3376\" height=\"2348\" \/><\/p>\n<p>So far so good.\u00a0 As a next step we might be interested in knowing each park&#8217;s IMD value.\u00a0 A nice little spatial join <em>should<\/em> do that trick.\u00a0 But before we get to that, Lucia needed to be sure that the areas surrounding each park (the access areas) were consistently of the same socio-economic status, meaning that we need to think about not just the park but also the access area &#8211; which meant creating some <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/buffer.htm\" target=\"_blank\" rel=\"noopener noreferrer\">buffer<\/a>\u00a0zones around each park.\u00a0 Lucia used three buffer distances depending on the size of each park:<\/p>\n<table class=\"alignleft\" style=\"width: 432px;height: 236px;border-color: #000000\" border=\"2\">\n<tbody>\n<tr>\n<td style=\"width: 244px;text-align: center\">Park size (m<sup>2<\/sup>)<\/td>\n<td style=\"width: 152px;text-align: center\">Buffer Distance (m)<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 244px;text-align: center\">0 &#8211; 1,000<\/td>\n<td style=\"width: 152px;text-align: center\">150<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 244px;text-align: center\">1,000 &#8211; 10,000<\/td>\n<td style=\"width: 152px;text-align: center\">250<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 244px;text-align: center\">&gt; 10,000<\/td>\n<td style=\"width: 152px;text-align: center\">400<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This led to new parks layer for this analysis:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3703\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/Buffers.jpg\" alt=\"\" width=\"3376\" height=\"2348\" \/><\/p>\n<p>Right &#8211; things are starting to get complicated but we&#8217;re poised to do some analysis now.\u00a0 Next step is to find those parks and their buffers that share the same IMD values (i.e the IMD value of the surrounding area is the same as the park&#8217;s IMD value).<\/p>\n<p>My first thought here was, wouldn&#8217;t this be a great use of a spatial join?\u00a0 Bring together the two layers so that we have all the information for each park <strong><em>plus<\/em> <\/strong>whatever IMD values are in the overlapping polygons?\u00a0 No brainer.\u00a0 Or so I thought.<\/p>\n<p>We&#8217;ve got several choices for doing spatial joins:<\/p>\n<ul>\n<li><a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/intersect.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Intersect<\/a><\/li>\n<li><a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/identity.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Identity<\/a><\/li>\n<li><a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/union.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Union<\/a><\/li>\n<li><a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/spatial-join.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Spatial Join<\/a><\/li>\n<\/ul>\n<p>These tools all do similar things but if different ways and with different outputs.\u00a0 In all cases, we&#8217;re joining at least two layers together, both on the map and in the attribute table.\u00a0 It&#8217;s a simple but very powerful form of spatial analysis.\u00a0 In this case, we should end up knowing the IMD value for each park and buffer.\u00a0 Intersect seemed like a good option here.\u00a0 While it seemed like\u00a0the right idea at the time, the output was clearly going to be difficult to work with.\u00a0 Hopefully the image shows why:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3711\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/Busy2.jpg\" alt=\"\" width=\"3376\" height=\"2348\" \/><\/p>\n<p>Very busy indeed.\u00a0 The problem here is that there are so many overlaps that it&#8217;s going to be <strong><em>very<\/em> <\/strong>difficult to easily consider\u00a0any given park on its own &#8211; there&#8217;s almost too much information in the table to work with.\u00a0 This is one of the only times I can think of that a spatial join has let me down.\u00a0 (<em>Ed. How sad for you.<\/em>)<\/p>\n<figure id=\"attachment_3712\" aria-describedby=\"caption-attachment-3712\" style=\"width: 1200px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3712\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/0x0.jpg\" alt=\"\" width=\"1200\" height=\"797\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/0x0.jpg 1200w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/0x0-300x199.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/0x0-1024x680.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/0x0-768x510.jpg 768w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/0x0-330x220.jpg 330w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-3712\" class=\"wp-caption-text\"><span style=\"font-size: 8pt\"><a href=\"https:\/\/www.forbes.com\/sites\/joshuacohen\/2018\/07\/19\/diseases-of-despair-contribute-to-declining-u-s-life-expectancy\/?sh=3a33b714656b\" target=\"_blank\" rel=\"noopener noreferrer\"><em>https:\/\/www.forbes.com\/sites\/joshuacohen\/2018\/07\/19\/diseases-of-despair-contribute-to-declining-u-s-life-expectancy\/?sh=3a33b714656b<\/em><\/a><\/span><\/figcaption><\/figure>\n<p>But all is not lost!\u00a0 No!\u00a0 Not by a long shot.\u00a0 From the depths of my addled brain, I recalled a seldom used tool that could help.\u00a0 It may be seldom used but when it does what&#8217;s needed, it becomes the most important tool on the face of the earth.\u00a0 (<em>Ed. Please seek some help before it&#8217;s too late for you.<\/em>)\u00a0 \u00a0The tool I have in mind is <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/tabulate-intersection.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Tabulate Intersection<\/a>.\u00a0 The help file tells us that this tool &#8220;Computes the intersection between two feature classes and cross tabulates the area, length, or count of the intersecting features.&#8221; and the picture helps to illustrate:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3705\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/GUID-6345D779-FEDB-4657-9D31-73DF7F867849-web.png\" alt=\"\" width=\"600\" height=\"254\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/GUID-6345D779-FEDB-4657-9D31-73DF7F867849-web.png 600w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/GUID-6345D779-FEDB-4657-9D31-73DF7F867849-web-300x127.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>If we run this tool on Lucia&#8217;s data, she should end up with a table showing each park (by its name) and then a row for each different IMD value.\u00a0 The advantage here is that things are summarised by park name, making it easy to see the range of different IMD values.\u00a0 Here&#8217;s a quick pick at her output to illustrate:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3706\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/TabInt.jpg\" alt=\"\" width=\"803\" height=\"409\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/TabInt.jpg 803w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/TabInt-300x153.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/TabInt-768x391.jpg 768w\" sizes=\"auto, (max-width: 803px) 100vw, 803px\" \/>It&#8217;s sort of an off-beat spatial join with a table instead of a layer as an output.\u00a0 From this we can see that, for example, Abberley Park sits across two IMD zones with values of 2 and 5.\u00a0 Acorn Reserve has just one value (6).\u00a0 And so on.\u00a0 While it&#8217;s not a spatial layer, it does make it easier to pick out the parks she wants to focus on &#8211; parks listed just once were the ones she was after.\u00a0 And here&#8217;s her final set of parks, awaiting a shade audit:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3708\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2022\/08\/Final.jpg\" alt=\"\" width=\"3376\" height=\"2348\" \/><\/p>\n<p>So what have we seen here?\u00a0 Hopefully, a number of useful things:<\/p>\n<ul>\n<li>Mapping\u00a0socio-economic status with the IMD;<\/li>\n<li>Familiarity with census mapping areas;<\/li>\n<li>A reminder about spatial joins;<\/li>\n<li>A new tool for many: Tabulate Intersection.<\/li>\n<\/ul>\n<p>The hard work for Lucia begins now as she starts to do the main work of her research.\u00a0 Here, GIS has helped to narrow down all the possible study sites to a more manageable (and defensible) set.\u00a0 Looking forward to some results now (<em>no pressure<\/em>)!<\/p>\n<p>C<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We look at using the Tabulate Intersections tool to do an off-beat spatial join. Postgrad Lucia had a problem, a spatial problem, to be more exact.\u00a0 As part of her MLA she&#8217;s doing some research on whether shade is equitably provided in Christchurch\u2019s parks, i.e., do wealthy neighbourhoods have more access to shade than poorer [&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-3698","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/3698","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=3698"}],"version-history":[{"count":1,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/3698\/revisions"}],"predecessor-version":[{"id":4057,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/3698\/revisions\/4057"}],"wp:attachment":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/media?parent=3698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/categories?post=3698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/tags?post=3698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}