<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Selecting a random subset of grid cells in Spatial Data Science Questions</title>
    <link>https://community.esri.com/t5/spatial-data-science-questions/selecting-a-random-subset-of-grid-cells/m-p/526063#M1203</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to select a random subset of spatially independent grid cells for a species occupancy modelling study.&amp;nbsp; I defined my sampling units as 100x100m grid cells covering the entire study area. However, these grids are continuous and not independent from one another (see attached). I would like to select a random subset of grids (let's say 50%) which is at least 100m from the closest grid (between each grid cell there must be at least a 100m distance). Any advice on this will be much appreciated, also, I'm using ArcGis 10.6.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Continuous sampling grid" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/448456_Grid.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 May 2019 15:03:40 GMT</pubDate>
    <dc:creator>JoeBanker</dc:creator>
    <dc:date>2019-05-27T15:03:40Z</dc:date>
    <item>
      <title>Selecting a random subset of grid cells</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/selecting-a-random-subset-of-grid-cells/m-p/526063#M1203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to select a random subset of spatially independent grid cells for a species occupancy modelling study.&amp;nbsp; I defined my sampling units as 100x100m grid cells covering the entire study area. However, these grids are continuous and not independent from one another (see attached). I would like to select a random subset of grids (let's say 50%) which is at least 100m from the closest grid (between each grid cell there must be at least a 100m distance). Any advice on this will be much appreciated, also, I'm using ArcGis 10.6.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Continuous sampling grid" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/448456_Grid.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2019 15:03:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/selecting-a-random-subset-of-grid-cells/m-p/526063#M1203</guid>
      <dc:creator>JoeBanker</dc:creator>
      <dc:date>2019-05-27T15:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting a random subset of grid cells</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/selecting-a-random-subset-of-grid-cells/m-p/526064#M1204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are two approaches to this problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Select random rows from tables&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use the code &lt;A href="https://gis.stackexchange.com/questions/116274/select-random-rows-with-python-in-arcgis"&gt;here&lt;/A&gt; to randomly select rows in your grid layer, assuming they are polygons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However this does not impose the spatial&amp;nbsp;criteria of at least 100m separation distance, so you would need to adapt the code to test for this scenario and adjust accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Create random points&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternative approach is to use the &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/create-random-points.htm"&gt;Create Random Points&lt;/A&gt; tool and ensure your polygon layer is the constraining featureclass and set the minimum allowable distance. You can then use those points to select the grid squares.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Notes&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something to be aware of is that when imposing a spatial criteria this could mean you never achieve the desired final number selected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also not being a statistician guru I'm not sure which approach minimises bias, may be someone else&amp;nbsp; can comment?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 09:49:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/selecting-a-random-subset-of-grid-cells/m-p/526064#M1204</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2019-08-02T09:49:07Z</dc:date>
    </item>
  </channel>
</rss>

