<?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 grouping locations in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/grouping-locations/m-p/12788#M192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list of stores and their location longitude and lattidue. If stores are with 30 miles of each other, they are assigned into the same group. I can write a data step to find out the grouping. I would like to know if I can use some SAS procedure to accomplish this task quickly. Can I use cluser analysis procedures for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Feb 2012 08:25:16 GMT</pubDate>
    <dc:creator>aha123</dc:creator>
    <dc:date>2012-02-24T08:25:16Z</dc:date>
    <item>
      <title>grouping locations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/grouping-locations/m-p/12788#M192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list of stores and their location longitude and lattidue. If stores are with 30 miles of each other, they are assigned into the same group. I can write a data step to find out the grouping. I would like to know if I can use some SAS procedure to accomplish this task quickly. Can I use cluser analysis procedures for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 08:25:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/grouping-locations/m-p/12788#M192</guid>
      <dc:creator>aha123</dc:creator>
      <dc:date>2012-02-24T08:25:16Z</dc:date>
    </item>
    <item>
      <title>grouping locations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/grouping-locations/m-p/12789#M193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can, if you translate your lat/long data to UTM coordinates (say X, Y). I did this recently to group samples taken within 50 meters from each other, it looked like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc fastclus data=chloro summary radius=50 strict least=max &lt;/P&gt;&lt;P&gt; out=chloroClust outseed=seedClust cluster=Site clusterlabel="Site" noprint;&lt;/P&gt;&lt;P&gt;var x y;&lt;/P&gt;&lt;P&gt;id id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 18:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/grouping-locations/m-p/12789#M193</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-02-27T18:11:37Z</dc:date>
    </item>
    <item>
      <title>grouping locations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/grouping-locations/m-p/12790#M194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out the geodist function in SAS as a starting point.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How are specifying 'groups', do all stores have to be less than 30km from each other. Otherwise a store at one edge of the radius could be in another group theoretically...depends on your data of course. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 18:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/grouping-locations/m-p/12790#M194</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-02-27T18:24:03Z</dc:date>
    </item>
    <item>
      <title>grouping locations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/grouping-locations/m-p/12791#M195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I guess a cheap way of doing it using the geoDist function suggested by Reeza would be :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data haveXY(drop=refLong refLat);&lt;/P&gt;&lt;P&gt;retain refLong refLat;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;if _n_ = 1 then do;&lt;/P&gt;&lt;P&gt; refLong = long;&lt;/P&gt;&lt;P&gt; refLat = lat;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;id = _n_;&lt;/P&gt;&lt;P&gt;x = geodist(lat,refLong,lat,long,"DM");&lt;/P&gt;&lt;P&gt;y = geodist(refLat,long,lat,long,"DM");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc fastclus data=haveXY summary radius=15 strict least=max &lt;/P&gt;&lt;P&gt;out=wantClust outseed=seedWant cluster=Site clusterlabel="Site" noprint;&lt;/P&gt;&lt;P&gt;var x y;&lt;/P&gt;&lt;P&gt;id id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first store coordinates are arbitrarly chosen as a reference. The "DM" option means that your coordinates are in degrees and that the distance is returned in miles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 19:18:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/grouping-locations/m-p/12791#M195</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-02-27T19:18:43Z</dc:date>
    </item>
  </channel>
</rss>

