<?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: geodist and cross join help in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234707#M54969</link>
    <description>&lt;P&gt;Thank you for the example Reza.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data member_geo; set work.geocoded_mems (rename=(X=LA1 Y=LO1)); run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data prov_geo; set work.geocoded_provs (rename=(X=LA2 Y=LO2)); run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table geo_join as&lt;BR /&gt;select a.LA1, a.LO1, a.memid, a.zip, b.LA2, b.LO2, b.prov,&lt;BR /&gt;geodist(a.LA1, a.LO1, b.LA2, b.LO2,'m') as geodist &lt;BR /&gt;from member_geo a, prov_geo b;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my code, but i am getting null values for geodist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea why? I have lat and lon in degrees in both sets.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Nov 2015 20:58:29 GMT</pubDate>
    <dc:creator>Jse</dc:creator>
    <dc:date>2015-11-13T20:58:29Z</dc:date>
    <item>
      <title>geodist and cross join help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234684#M54964</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a data set with 500k members (by memid) and lat and lon in degrees,&amp;nbsp;and a data set with 300 providers (by prov)&amp;nbsp;with lat and lon in degrees. &amp;nbsp;Both are geocoded at the street address level.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data member_geo; set work.geocoded_mems (rename=(X=LA1 y=LO1)); run; &amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="line-height: 20px;"&gt;data prov_geo; set work.geocoded_provs (rename=(X=LA2 Y=LO2)); run;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 20px;"&gt;I want to calculate distances between member to providers using geodist.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="line-height: 20px;"&gt;geodist(LA1,LO1,LA2,LO2,'M')&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 20px;"&gt;Can someone help me find the appropriate cross join and distance calculation? &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2015 20:36:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234684#M54964</guid>
      <dc:creator>Jse</dc:creator>
      <dc:date>2015-11-13T20:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: geodist and cross join help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234693#M54965</link>
      <description>&lt;P&gt;You say by zipcode, but then refer to lat/long? Which are you using?&lt;BR /&gt;&lt;BR /&gt;It may be better, and more efficient, to do it at the zipcode level and then merge it back to the provider level.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want code, it helps if you post some sample data. You could use the zipcode table to generate random data.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2015 20:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234693#M54965</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-13T20:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: geodist and cross join help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234698#M54966</link>
      <description>&lt;P&gt;Hello, sorry for being unclear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have&amp;nbsp;geocoded members and providers at the street address level. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to calculate the distances from patients to providers in miles. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2015 20:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234698#M54966</guid>
      <dc:creator>Jse</dc:creator>
      <dc:date>2015-11-13T20:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: geodist and cross join help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234702#M54968</link>
      <description>Here's an example:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Calculating-pair-wise-distances-using-the-geodist-function/m-p/190864/highlight/true#M35977" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Calculating-pair-wise-distances-using-the-geodist-function/m-p/190864/highlight/true#M35977&lt;/A&gt;</description>
      <pubDate>Fri, 13 Nov 2015 20:38:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234702#M54968</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-13T20:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: geodist and cross join help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234707#M54969</link>
      <description>&lt;P&gt;Thank you for the example Reza.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data member_geo; set work.geocoded_mems (rename=(X=LA1 Y=LO1)); run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data prov_geo; set work.geocoded_provs (rename=(X=LA2 Y=LO2)); run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table geo_join as&lt;BR /&gt;select a.LA1, a.LO1, a.memid, a.zip, b.LA2, b.LO2, b.prov,&lt;BR /&gt;geodist(a.LA1, a.LO1, b.LA2, b.LO2,'m') as geodist &lt;BR /&gt;from member_geo a, prov_geo b;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my code, but i am getting null values for geodist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea why? I have lat and lon in degrees in both sets.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2015 20:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234707#M54969</guid>
      <dc:creator>Jse</dc:creator>
      <dc:date>2015-11-13T20:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: geodist and cross join help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234715#M54970</link>
      <description>Without a log or any sample data I can't say...</description>
      <pubDate>Fri, 13 Nov 2015 21:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/geodist-and-cross-join-help/m-p/234715#M54970</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-13T21:18:15Z</dc:date>
    </item>
  </channel>
</rss>

