<?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: Need help creating a python script to loop through my data and join/relate points and polygons. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/need-help-creating-a-python-script-to-loop-through/m-p/325303#M25301</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Allison,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you may not need a spatial join or a Python loop here, I suggest you try the Summary Statistics tool, asking for the&amp;nbsp;MAXIMUM CLOSED_ROLL_YEAR&amp;nbsp;and using parcel ID as the case field. This will give you a table unique by parcel ID (unless I'm not understanding your data, you should check!).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have that table created and have verified it is unique by PARCEL_ID, (there's a Find Identical tool that can help with this), first add an attribute index to your stats table by PARCEL_ID.&amp;nbsp; Then,&lt;/P&gt;&lt;P&gt;add a join to a the point layer linking to the output table from Summary Statistics using PARCEL_ID as the key field. Then, you can select for &lt;STRONG&gt;assessor_tax_roll_xy.CLOSED_ROLL_YEAR = stat_table.MAX_CLOSED_ROLL_YEAR.&lt;/STRONG&gt; This selected set is what you are looking for (I think).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the selection is applied, remove the join and use Copy_Features to copy the selected points to a new output feature class with the points that you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Apr 2019 00:20:56 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2019-04-29T00:20:56Z</dc:date>
    <item>
      <title>Need help creating a python script to loop through my data and join/relate points and polygons.</title>
      <link>https://community.esri.com/t5/python-questions/need-help-creating-a-python-script-to-loop-through/m-p/325302#M25300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having a hard time writing a python script that would allow me to loop through my data and link data from one attribute table to another.&amp;nbsp; My goal is to get information from property tax roll data point data (ex: number of units, property area) to be included in the parcel polygon records.&amp;nbsp; I am working with parcel data (polygons) and property tax roll data (points).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp; For every parcel there are multiple polygons which are intended to represent the different lots in each parcel. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(442,960 records)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;- The property tax roll data includes multiple points per parcel/lot because the data includes records ranging over &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;many years. (1,048,575 records)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to link information from ONE point to each corresponding polygon.&amp;nbsp; I want to select one point per "Parcel Number" by the most recent year.&amp;nbsp; Should I attempt to reduce the point data first; getting the single record per "Parcel Number" before linking the point and polygon data?&amp;nbsp; Please look at the image below to get a sense of what I am trying to do.&amp;nbsp; Any help would be greatly appreciated!!! Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/445093_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/445103_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/445104_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Apr 2019 23:45:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-help-creating-a-python-script-to-loop-through/m-p/325302#M25300</guid>
      <dc:creator>AllisonKelly</dc:creator>
      <dc:date>2019-04-28T23:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need help creating a python script to loop through my data and join/relate points and polygons.</title>
      <link>https://community.esri.com/t5/python-questions/need-help-creating-a-python-script-to-loop-through/m-p/325303#M25301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Allison,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you may not need a spatial join or a Python loop here, I suggest you try the Summary Statistics tool, asking for the&amp;nbsp;MAXIMUM CLOSED_ROLL_YEAR&amp;nbsp;and using parcel ID as the case field. This will give you a table unique by parcel ID (unless I'm not understanding your data, you should check!).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have that table created and have verified it is unique by PARCEL_ID, (there's a Find Identical tool that can help with this), first add an attribute index to your stats table by PARCEL_ID.&amp;nbsp; Then,&lt;/P&gt;&lt;P&gt;add a join to a the point layer linking to the output table from Summary Statistics using PARCEL_ID as the key field. Then, you can select for &lt;STRONG&gt;assessor_tax_roll_xy.CLOSED_ROLL_YEAR = stat_table.MAX_CLOSED_ROLL_YEAR.&lt;/STRONG&gt; This selected set is what you are looking for (I think).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the selection is applied, remove the join and use Copy_Features to copy the selected points to a new output feature class with the points that you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2019 00:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-help-creating-a-python-script-to-loop-through/m-p/325303#M25301</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2019-04-29T00:20:56Z</dc:date>
    </item>
  </channel>
</rss>

