<?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: Territory Alignment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193927#M36449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A GIS software is better at this than SAS, but it's doable in SAS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZIP codes represent area's though they're represented by the centroid latitude and longitude most of the time. You can create a distance table of the ZIP to ZIP code (40thousand rows*40 thousand Columns) or a table with ZIP1, ZIP2, Distance which would be 1.6Billion rows.&amp;nbsp; You could simplify this by deleting distances over 1000 KM or so, or some other rule that makes business sense.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can loop and assign an area for each executive, defining rules for overlaps. The rules may need to be different in rural vs urban areas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's probably a more efficient way of doing this - for example if it was Canada, I know all the Postal Codes starting with T belong to Alberta, and T0 is an rural area. I'm not sure if the ZIP code has such a structure. Also, there may be more efficient ways of programming this - hopefully someone smarter than me chimes in &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a GIS software such as ArcGIS or QGIS this is as simple as selecting nearest neighbours within a specific distance and then making sure you have no overlaps - much easier &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Apr 2015 04:17:18 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-04-12T04:17:18Z</dc:date>
    <item>
      <title>Removed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193924#M36446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Removed because of violation of company policy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Apr 2015 18:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193924#M36446</guid>
      <dc:creator>kumarK</dc:creator>
      <dc:date>2015-04-11T18:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Territory Alignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193925#M36447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to be more specific with your question. Do you want to find, say, the ten zip codes from file2 that are closest to the zip codes identified in each of file1's records?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 00:26:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193925#M36447</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-04-12T00:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Territory Alignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193926#M36448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So if I understand right you want to assign a Zip code to the Senior Executive with minimal summed up distance to the Executives.&lt;/P&gt;&lt;P&gt;To determine this Zip code: Does it need to be one of the Zip codes of the Executives or should it be another Zip code "in the center" of all the Executives.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 03:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193926#M36448</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-04-12T03:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Territory Alignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193927#M36449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A GIS software is better at this than SAS, but it's doable in SAS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZIP codes represent area's though they're represented by the centroid latitude and longitude most of the time. You can create a distance table of the ZIP to ZIP code (40thousand rows*40 thousand Columns) or a table with ZIP1, ZIP2, Distance which would be 1.6Billion rows.&amp;nbsp; You could simplify this by deleting distances over 1000 KM or so, or some other rule that makes business sense.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can loop and assign an area for each executive, defining rules for overlaps. The rules may need to be different in rural vs urban areas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's probably a more efficient way of doing this - for example if it was Canada, I know all the Postal Codes starting with T belong to Alberta, and T0 is an rural area. I'm not sure if the ZIP code has such a structure. Also, there may be more efficient ways of programming this - hopefully someone smarter than me chimes in &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a GIS software such as ArcGIS or QGIS this is as simple as selecting nearest neighbours within a specific distance and then making sure you have no overlaps - much easier &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 04:17:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193927#M36449</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-04-12T04:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Zip Alignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193928#M36450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a geodist function &lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/67398/HTML/default/viewer.htm#n1korpfg2e18lon1nwpow9qijdxe.htm" title="http://support.sas.com/documentation/cdl/en/lefunctionsref/67398/HTML/default/viewer.htm#n1korpfg2e18lon1nwpow9qijdxe.htm"&gt;SAS(R) 9.4 Functions and CALL Routines: Reference, Third Edition&lt;/A&gt;&amp;nbsp; Remember it is physical direct distance line, NOT the distance by travelling hours.&lt;/P&gt;&lt;P&gt;How many senior executive you have 100 100? small enough the be a column representation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Apr 2015 17:07:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193928#M36450</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-04-12T17:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Zip Alignment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193929#M36451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kumar, Now the problem is becoming interesting. You can cluster your zipcodes in the number you are needing by nearest distance and than map the executives on that or you have some fixed locations for those executives and than trying to map zip to them. It is all on the soft and hard specs en reqs with the goals behind those.&lt;BR /&gt;There must be a lot of publications on the more theoretical parts. There will be often not a best solutions but many times an acceptable one (time/effort change/situation)&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 08:21:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removed/m-p/193929#M36451</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-04-13T08:21:11Z</dc:date>
    </item>
  </channel>
</rss>

