<?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: Creating Maps using Long/Lat Codes in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346668#M12037</link>
    <description>&lt;P&gt;Maybe this can get you started. In general, robslink page will have an example close to what you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd57/jordan_lake_paddling_info.htm" target="_blank"&gt;http://robslink.com/SAS/democd57/jordan_lake_paddling_info.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2017 13:35:06 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-04-03T13:35:06Z</dc:date>
    <item>
      <title>Creating Maps using Long/Lat Codes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346644#M12034</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a list of Long/Lat codes which I'd like to plot on a map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The codes are not in the US and are worldwide, including europe and the middle east.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can anyone help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Cam&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 12:32:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346644#M12034</guid>
      <dc:creator>CamRutherford</dc:creator>
      <dc:date>2017-04-03T12:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Maps using Long/Lat Codes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346660#M12035</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;SAS/R: Google Annotated map of New York City

If you have IML interface to R you can cut and paste the code
below. Also you could use Python.

see for high res map
https://www.dropbox.com/s/ax7i5mvr5ctjgcm/nyc.png?dl=0


HAVE
====

  Up to 40 obs WORK.HAVE total obs=2

  Obs    LATITUDE    LONGITUDE    LOGPRICE

   1      40.7033      40.7082       120
   2     -74.0192     -74.0054        56

 Google bounding box for NYC -&amp;gt; ggmap::get_map("New York City", zoom = 14);
 https://www.mapdevelopers.com/geocode_bounding_box.php


WANT
====

  High resolution map of NYC with circles at HAVE data


FULL SOLUTION

*                _                  _       _
 _ __ ___   __ _| | _____        __| | __ _| |_ __ _
| '_ ` _ \ / _` | |/ / _ \_____ / _` |/ _` | __/ _` |
| | | | | | (_| |   &amp;lt;  __/_____| (_| | (_| | || (_| |
|_| |_| |_|\__,_|_|\_\___|      \__,_|\__,_|\__\__,_|

;

options validvarname=upcase;
libname sd1 "d:/sd1";

data sd1.have;

 input
    latitude
    longitude
    logprice
 ;

cards4;
40.7032815 40.7082398 120
 -74.0192166 -74.0054436 56
;;;;
run;quit;

*____
|  _ \
| |_) |
|  _ &amp;lt;
|_| \_\

;

%utl_submit_r64('
source("c:/Program Files/R/R-3.3.2/etc/Rprofile.site",echo=T);
library(ggmap);
library(haven);
mapnyc=read_sas("d:/sd1/have.sas7bdat");
png("d:/png/nyc.png");
nyc_base &amp;lt;- ggmap::get_map("New York City", zoom = 14);
ggmap(nyc_base) + geom_point(data=mapnyc,
  aes(x=LONGITUDE, y=LATITUDE), color="red", size=20, alpha=0.5);
');


%macro utl_submit_R64(pgmx)/des="Semi colon separated set of R commands";
  * write the program to a temporary file;
  filename r_pgm temp lrecl=32766 recfm=v;
  data _null_;
    file r_pgm;
    pgm=&amp;amp;pgmx;
    put pgm;
    putlog pgm;
  run;
  %let __loc=%sysfunc(pathname(r_pgm));
  * pipe file through R;
  filename rut pipe "c:\Progra~1\R\R-3.3.2\bin\x64\R.exe --vanilla --quiet --no-save &amp;lt; &amp;amp;__loc";
  data _null_;
    file print;
    infile rut;
    input;
    put _infile_;
    putlog _infile_;
  run;
  filename rut clear;
  filename r_pgm clear;
%mend utl_submit_r64;



&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8122iA0947477C005B4B0/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="NYC" title="NYC" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 13:18:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346660#M12035</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2017-04-03T13:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Maps using Long/Lat Codes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346661#M12036</link>
      <description>It looks like SAS only allows one layer. If you go to the 'dropbox' link you will see the 'red dots'</description>
      <pubDate>Mon, 03 Apr 2017 13:20:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346661#M12036</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2017-04-03T13:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Maps using Long/Lat Codes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346668#M12037</link>
      <description>&lt;P&gt;Maybe this can get you started. In general, robslink page will have an example close to what you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd57/jordan_lake_paddling_info.htm" target="_blank"&gt;http://robslink.com/SAS/democd57/jordan_lake_paddling_info.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 13:35:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346668#M12037</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-03T13:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Maps using Long/Lat Codes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346674#M12038</link>
      <description>&lt;P&gt;Okay, thank you for the below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, If I wanted to have the long/lat points pinned on a Great Britain Map - how could I do that? Creating a heat map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Cam&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 13:54:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346674#M12038</guid>
      <dc:creator>CamRutherford</dc:creator>
      <dc:date>2017-04-03T13:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Maps using Long/Lat Codes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346712#M12039</link>
      <description>&lt;P&gt;If you look up the bounding box for Great Britain and create a SAS dataset with the 'pins' (lat log'). &amp;nbsp;You can create pins on the google map. I suggest you look at the R documentation for ggmap.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also do this with SAS 'proc gmap'.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 15:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346712#M12039</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2017-04-03T15:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Maps using Long/Lat Codes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346718#M12040</link>
      <description>Thank you - do you know how I can reference UK maps in SAS? All the documentation I see is for US.</description>
      <pubDate>Mon, 03 Apr 2017 15:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346718#M12040</guid>
      <dc:creator>CamRutherford</dc:creator>
      <dc:date>2017-04-03T15:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Maps using Long/Lat Codes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346766#M12045</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/116539"&gt;@CamRutherford&lt;/a&gt; wrote:&lt;BR /&gt;Thank you - do you know how I can reference UK maps in SAS? All the documentation I see is for US.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Anything you see that references MAPS.US (or MAPS.USCOUNTY) you can likely replace with MAPS.UK but you need to check the different Id variables. Maps.UK2 has some regional descriptions for the&amp;nbsp;ID in UK, a 'feature table' dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 17:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Creating-Maps-using-Long-Lat-Codes/m-p/346766#M12045</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-03T17:11:22Z</dc:date>
    </item>
  </channel>
</rss>

