<?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 Re: Weighted average using NbrWeight kernel file? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/weighted-average-using-nbrweight-kernel-file/m-p/1106819#M46614</link>
    <description>&lt;P&gt;Thanks Dan! This will work. I appreciate the help!&lt;/P&gt;</description>
    <pubDate>Tue, 12 Oct 2021 19:15:25 GMT</pubDate>
    <dc:creator>MollyBarth</dc:creator>
    <dc:date>2021-10-12T19:15:25Z</dc:date>
    <item>
      <title>Weighted average using NbrWeight kernel file?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/weighted-average-using-nbrweight-kernel-file/m-p/1106521#M46573</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate a weighted mean statistic using a neighborhood defined by a kernel file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MollyBarth_1-1633980877934.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/24983iC1F5980EE76A3AF5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MollyBarth_1-1633980877934.png" alt="MollyBarth_1-1633980877934.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My kernel file defines a 3x3 cell neighborhood, with the following weights:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="63.6562px" height="18px"&gt;0.5&lt;/TD&gt;&lt;TD width="63.6562px" height="18px"&gt;1&lt;/TD&gt;&lt;TD width="63.6875px" height="18px"&gt;0.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="63.6562px" height="15px"&gt;1&lt;/TD&gt;&lt;TD width="63.6562px" height="15px"&gt;1&lt;/TD&gt;&lt;TD width="63.6875px" height="15px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="63.6562px" height="15px"&gt;0.5&lt;/TD&gt;&lt;TD width="63.6562px" height="15px"&gt;1&lt;/TD&gt;&lt;TD width="63.6875px" height="15px"&gt;0.5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For illustration purposes, I'll use the following 3x3 raster as an example.&amp;nbsp; The point labels show the values of the raster cells. Grey cells indicate no data. My target cell for this example is the center green cell, with a value of 28.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MollyBarth_0-1633980541863.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/24982iB9EA473FCD279682/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MollyBarth_0-1633980541863.png" alt="MollyBarth_0-1633980541863.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I run the tool,&amp;nbsp; the weighted mean is calculated as:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;weighted sum / # of&amp;nbsp; data cells in neighborhood&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;For the green target cell: 201.5/4 = 50.375&lt;/P&gt;&lt;P&gt;Output shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MollyBarth_2-1633981468274.png" style="width: 444px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/24985iE59F492858833F51/image-dimensions/444x345?v=v2" width="444" height="345" role="button" title="MollyBarth_2-1633981468274.png" alt="MollyBarth_2-1633981468274.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;I want it to be calculated as:&amp;nbsp;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;weighted sum / sum of weights of data cells in neighborhood&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;For the green target cell this should would be 201.5/3.5 =57.57143&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;How do I calculate this weighted average??&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;Thank you!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 19:49:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/weighted-average-using-nbrweight-kernel-file/m-p/1106521#M46573</guid>
      <dc:creator>MollyBarth</dc:creator>
      <dc:date>2021-10-11T19:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average using NbrWeight kernel file?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/weighted-average-using-nbrweight-kernel-file/m-p/1106574#M46581</link>
      <description>&lt;P&gt;interesting.&lt;/P&gt;&lt;P&gt;have you tried running the focal sum only,&lt;/P&gt;&lt;P&gt;produce a raster which is classed a nodata or 1 based on the presence of data in your input raster (the inverse of IsNull or a Con statement would do)&lt;/P&gt;&lt;P&gt;If you run a focal sum using your kernel on that raster and you should get your 3.5 value&lt;/P&gt;&lt;P&gt;After that, take your initial focal sum raster and divide it by your focal sum 1's raster&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 01:04:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/weighted-average-using-nbrweight-kernel-file/m-p/1106574#M46581</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-10-12T01:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average using NbrWeight kernel file?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/weighted-average-using-nbrweight-kernel-file/m-p/1106819#M46614</link>
      <description>&lt;P&gt;Thanks Dan! This will work. I appreciate the help!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 19:15:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/weighted-average-using-nbrweight-kernel-file/m-p/1106819#M46614</guid>
      <dc:creator>MollyBarth</dc:creator>
      <dc:date>2021-10-12T19:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted average using NbrWeight kernel file?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/weighted-average-using-nbrweight-kernel-file/m-p/1106890#M46621</link>
      <description>&lt;P&gt;no problem... an interesting question&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 22:48:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/weighted-average-using-nbrweight-kernel-file/m-p/1106890#M46621</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-10-12T22:48:37Z</dc:date>
    </item>
  </channel>
</rss>

