<?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: SAS GEODIST function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440716#M110155</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;lol,&amp;nbsp;I would prefer a yellow back ground highlighter to be honest...but red is what the eye will pick up faster. I've tried blue and green and they don't show up as well &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2018 01:25:22 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-02-28T01:25:22Z</dc:date>
    <item>
      <title>SAS GEODIST function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440658#M110131</link>
      <description>&lt;P&gt;Hello SAS Community, this is my first time posting here.&lt;/P&gt;&lt;P&gt;I have been trying to get distances between two locations. One is a hospital with a particular zipcodes for eg.20015, and others are 100 patients with different zipcodes. I have latitudes and longitudes for all the zipcodes to get the straight line distance. I have been trying to look online and read on SAS website on how to about performing this. Can anyone help with an example of a SAS code in a particular situation?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 20:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440658#M110131</guid>
      <dc:creator>raajdesaii</dc:creator>
      <dc:date>2018-02-27T20:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GEODIST function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440664#M110135</link>
      <description>&lt;P&gt;Here's an example from last week:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-combine-spatial-and-attribute-data-set/m-p/439973#M23201" target="_blank"&gt;https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-combine-spatial-and-attribute-data-set/m-p/439973#M23201&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not zipcode but similar idea. I believe there's also a ZIPCITYDISTANCE function that will take the two zip codes and calculate the distance.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#n1r333fdkrofhxn10vmhu9bq5m85.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#n1r333fdkrofhxn10vmhu9bq5m85.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/196010"&gt;@raajdesaii&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello SAS Community, this is my first time posting here.&lt;/P&gt;
&lt;P&gt;I have been trying to get distances between two locations. One is a hospital with a particular zipcodes for eg.20015, and others are 100 patients with different zipcodes. I have latitudes and longitudes for all the zipcodes to get the straight line distance. I have been trying to look online and read on SAS website on how to about performing this. Can anyone help with an example of a SAS code in a particular situation?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 20:54:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440664#M110135</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-27T20:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GEODIST function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440672#M110140</link>
      <description>&lt;P&gt;Thank you for your reply and the link to the thread. Those threads would let me manually input the zipcodes and that would be possible if i have limited number of observations. In my case, I have 100 observations and the zipcodes are from the same variable so I am not sure how to write the code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 21:46:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440672#M110140</guid>
      <dc:creator>raajdesaii</dc:creator>
      <dc:date>2018-02-27T21:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GEODIST function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440677#M110142</link>
      <description>&lt;P&gt;Those are examples of how to create data for demonstration purposes so that anyone, anywhere can take them and run them to see how it works.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The concept is the exact same, except your table 1 and table 2 are the SAME table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/196010"&gt;@raajdesaii&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thank you for your reply and the link to the thread. Those threads would let me manually input the zipcodes and that would be possible if i have limited number of observations. In my case, I have 100 observations and the zipcodes are from the same variable so I am not sure how to write the code.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 21:51:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440677#M110142</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-27T21:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GEODIST function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440678#M110143</link>
      <description>&lt;P&gt;Yes but it does not say how to calculate the distance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 21:53:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440678#M110143</guid>
      <dc:creator>raajdesaii</dc:creator>
      <dc:date>2018-02-27T21:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GEODIST function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440679#M110144</link>
      <description>&lt;P&gt;Did you run the code?&amp;nbsp;Or check the output, and the variable created from the GEODIST function?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/196010"&gt;@raajdesaii&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Yes but it does not say how to calculate the distance.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;sql&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;create table dist_table as&lt;/P&gt;
&lt;P&gt;select h.id, h.lat2 as lat_facility, h.lon2 as long_facility,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.region,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.cluster, c.lat1 as lat_cluster, c.lon1 as long_cluster,&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geodist(h.lat2, h.lon2, c.lat1, c.lon1, 'k' ) as dist_km&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;from clusters as c cross join health_facility as h&lt;/P&gt;
&lt;P&gt;where c.region=h.region&lt;/P&gt;
&lt;P&gt;order by h.id, c.cluster, dist_km;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 21:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440679#M110144</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-27T21:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GEODIST function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440714#M110154</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;Someone went red!&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 01:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440714#M110154</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-02-28T01:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GEODIST function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440716#M110155</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;lol,&amp;nbsp;I would prefer a yellow back ground highlighter to be honest...but red is what the eye will pick up faster. I've tried blue and green and they don't show up as well &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 01:25:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-GEODIST-function/m-p/440716#M110155</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-28T01:25:22Z</dc:date>
    </item>
  </channel>
</rss>

