<?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: proc gmap in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70906#M2499</link>
    <description>Just modify the code where you create the annotate dataset.&lt;BR /&gt;
Where it currently says: &lt;BR /&gt;
color='red';&lt;BR /&gt;
&lt;BR /&gt;
Add some logic like this:&lt;BR /&gt;
if (expenditure &amp;gt;= 7000) then color='red';&lt;BR /&gt;
else if (expenditure &amp;lt; 7000 and expenditure &amp;gt;= 5000) then color='orange';&lt;BR /&gt;
else color='green';&lt;BR /&gt;
&lt;BR /&gt;
Tweak it according to your needs.</description>
    <pubDate>Fri, 11 Feb 2011 01:01:02 GMT</pubDate>
    <dc:creator>Darrell_sas</dc:creator>
    <dc:date>2011-02-11T01:01:02Z</dc:date>
    <item>
      <title>proc gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70903#M2496</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
Im trying to map some data on to the australian map (called austral i believe).&lt;BR /&gt;
&lt;BR /&gt;
Say the data is as follows:&lt;BR /&gt;
lat        long        expenditure&lt;BR /&gt;
-31.5     149.8     $5000&lt;BR /&gt;
-30.5      148.2      $3000&lt;BR /&gt;
-29.6      147.3      $7000&lt;BR /&gt;
&lt;BR /&gt;
How do I plot the above data onto the australian map? Is using Gproject an absolute must?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Sachin</description>
      <pubDate>Thu, 10 Feb 2011 00:44:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70903#M2496</guid>
      <dc:creator>SachinRuk</dc:creator>
      <dc:date>2011-02-10T00:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: proc gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70904#M2497</link>
      <description>yes - using Proc Gproject is an absolute must, to get lat/long data to line up in the correct location on a map.&lt;BR /&gt;
&lt;BR /&gt;
The following code should get you started:&lt;BR /&gt;
&lt;BR /&gt;
data foo;&lt;BR /&gt;
input lat long expenditure;&lt;BR /&gt;
datalines;&lt;BR /&gt;
-31.5     149.8    5000&lt;BR /&gt;
-30.5     148.2    3000&lt;BR /&gt;
-29.6     147.3    7000&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data foo; set foo;&lt;BR /&gt;
/* convert degrees to radians, and longitude to 'eastlong' */&lt;BR /&gt;
x=atan(1)/45 * long * -1;&lt;BR /&gt;
y=atan(1)/45 * lat;&lt;BR /&gt;
anno_flag=2;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* combine and project the lat/long radian values */&lt;BR /&gt;
data combined; set maps.austral (drop = x y rename=(lat=y long=x)) foo;&lt;BR /&gt;
run;&lt;BR /&gt;
proc gproject data=combined out=combined dupok;&lt;BR /&gt;
id id;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* separate the map and point data again */&lt;BR /&gt;
data austral foo; set combined;&lt;BR /&gt;
if anno_flag eq 2 then output foo;&lt;BR /&gt;
else output austral;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* convert projected point data into annotated text */&lt;BR /&gt;
data foo; set foo;&lt;BR /&gt;
length color $8 text $50;&lt;BR /&gt;
xsys='2'; ysys='2'; hsys='3'; when='a';&lt;BR /&gt;
function='label'; size=2;&lt;BR /&gt;
color='red';&lt;BR /&gt;
text=put(expenditure,dollar10.0);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
pattern1 v=solid color=cornsilk;&lt;BR /&gt;
title "Australia Expenditures";&lt;BR /&gt;
proc gmap map=austral data=austral anno=foo;&lt;BR /&gt;
id id;&lt;BR /&gt;
choro id / levels=1 nolegend coutline=grayaa;&lt;BR /&gt;
run;</description>
      <pubDate>Thu, 10 Feb 2011 13:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70904#M2497</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-02-10T13:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: proc gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70905#M2498</link>
      <description>Thanks Rob,&lt;BR /&gt;
&lt;BR /&gt;
That helped heaps. &lt;BR /&gt;
&lt;BR /&gt;
Any suggestions as to how to use a heat map on this (or atleast a traffic light one) such that I get a red dot for the $7000, amber for $5000 and so on.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Sachin</description>
      <pubDate>Thu, 10 Feb 2011 22:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70905#M2498</guid>
      <dc:creator>SachinRuk</dc:creator>
      <dc:date>2011-02-10T22:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70906#M2499</link>
      <description>Just modify the code where you create the annotate dataset.&lt;BR /&gt;
Where it currently says: &lt;BR /&gt;
color='red';&lt;BR /&gt;
&lt;BR /&gt;
Add some logic like this:&lt;BR /&gt;
if (expenditure &amp;gt;= 7000) then color='red';&lt;BR /&gt;
else if (expenditure &amp;lt; 7000 and expenditure &amp;gt;= 5000) then color='orange';&lt;BR /&gt;
else color='green';&lt;BR /&gt;
&lt;BR /&gt;
Tweak it according to your needs.</description>
      <pubDate>Fri, 11 Feb 2011 01:01:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70906#M2499</guid>
      <dc:creator>Darrell_sas</dc:creator>
      <dc:date>2011-02-11T01:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: proc gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70907#M2500</link>
      <description>To see some sample code for annotating colored dots on Australia, see the following thread from last month:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=49103" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=49103&lt;/A&gt;</description>
      <pubDate>Fri, 11 Feb 2011 01:24:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gmap/m-p/70907#M2500</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-02-11T01:24:20Z</dc:date>
    </item>
  </channel>
</rss>

