<?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: Mapping with variables in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64520#M2174</link>
    <description>Here's the essential/minimal code to do what you're wanting...&lt;BR /&gt;
&lt;BR /&gt;
data stadiums;&lt;BR /&gt;
name='SC Stadium'; Lat=-27.465608; Long=153.010336; Income=50000000; output;&lt;BR /&gt;
name='GC Stadium'; Lat=-28.005627; Long=153.367188; Income=20000000; output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data stadiums; set stadiums;&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)) stadiums;&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 stadiums; set combined;&lt;BR /&gt;
if anno_flag eq 2 then output stadiums;&lt;BR /&gt;
else output austral;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* convert projected point data into annotated dots */&lt;BR /&gt;
data stadiums; set stadiums;&lt;BR /&gt;
length color $8;&lt;BR /&gt;
xsys='2'; ysys='2'; hsys='3'; when='a';&lt;BR /&gt;
function='pie'; rotate=360; size=1.1;&lt;BR /&gt;
if (income gt 25000000) then color='red'; &lt;BR /&gt;
else color='green';&lt;BR /&gt;
style='psolid'; output;&lt;BR /&gt;
style='pempty'; color='gray33'; output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
pattern1 v=solid color=cornsilk;&lt;BR /&gt;
title "Australia Stadium Income";&lt;BR /&gt;
proc gmap map=austral data=austral anno=stadiums;&lt;BR /&gt;
id id;&lt;BR /&gt;
choro id / levels=1 nolegend coutline=grayaa;&lt;BR /&gt;
run;</description>
    <pubDate>Thu, 20 Jan 2011 13:32:41 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2011-01-20T13:32:41Z</dc:date>
    <item>
      <title>Mapping with variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64517#M2171</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've never done mapping in SAS before (or any other application for that matter).  I've had a peak at Robert Allison's website, and it has lots of good examples, but they're a little too complex for me to just stick my data into it and customise.&lt;BR /&gt;
&lt;BR /&gt;
We have a lot of data, which has the latitude/longitude.  These values don't match what we see in MAPS.AUSTRAL.  They're off by a factor on 100, having said that, it obviously doesn't have every single point in Australia on that table.&lt;BR /&gt;
&lt;BR /&gt;
So, what I'd like to do is with my small subset of data identify each point on a map, and with a variable, eg income, I would want the point to be coloured a certain way.&lt;BR /&gt;
&lt;BR /&gt;
eg,&lt;BR /&gt;
&lt;BR /&gt;
Latitude: -27.465608&lt;BR /&gt;
Longitude: 153.010336&lt;BR /&gt;
Income: $50,000,000&lt;BR /&gt;
&lt;BR /&gt;
and&lt;BR /&gt;
&lt;BR /&gt;
Latitude: -28.005627&lt;BR /&gt;
Longitude: 153.367188&lt;BR /&gt;
Income: $20,000,000&lt;BR /&gt;
&lt;BR /&gt;
Let's say anything more than $25,000,000 get a red dot, otherwise it gets a green dot.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
How would I use the above with the MAPS.AUSTRAL ?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;BR /&gt;
&lt;BR /&gt;
edit:&lt;BR /&gt;
I should say I'm using SAS 9.2 TS Level 2M0 on Windows XP&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
edit:&lt;BR /&gt;
I have attempted to do this based on the following link&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://robslink.com/SAS/democd28/impact_info.htm" target="_blank"&gt;http://robslink.com/SAS/democd28/impact_info.htm&lt;/A&gt;&lt;BR /&gt;
^^&lt;BR /&gt;
&lt;BR /&gt;
 here's the log, the output gives me nothing on the html file and a picture of Australia with no dots on it.  What am I doing wrong?  Or am I attempting to approach this the wrong way?&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
NOTE: This SAS session is using a registry in WORK.  All changes will be lost at&lt;BR /&gt;
      the end of this session.&lt;BR /&gt;
1425  filename odsout '.';&lt;BR /&gt;
1426&lt;BR /&gt;
1427&lt;BR /&gt;
1428  data stadiums;&lt;BR /&gt;
1429     name = 'SC Stadium';&lt;BR /&gt;
1430     Lat  = -27.465608;&lt;BR /&gt;
1431     Long = 153.010336;&lt;BR /&gt;
1432     Income = 50000000;&lt;BR /&gt;
1433     output;&lt;BR /&gt;
1434&lt;BR /&gt;
1435     name = 'GC Stadium';&lt;BR /&gt;
1436     Lat  = -28.005627;&lt;BR /&gt;
1437     Long = 153.367188;&lt;BR /&gt;
1438     Income = 20000000;&lt;BR /&gt;
1439     output;&lt;BR /&gt;
1440  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The data set WORK.STADIUMS has 2 observations and 4 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.04 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1441&lt;BR /&gt;
1442&lt;BR /&gt;
1443  data stadiums_plot;&lt;BR /&gt;
1444     set stadiums;&lt;BR /&gt;
1445&lt;BR /&gt;
1446     x=atan(1)/45 * long;&lt;BR /&gt;
1447     y=atan(1)/45 * lat;&lt;BR /&gt;
1448&lt;BR /&gt;
1449&lt;BR /&gt;
1450&lt;BR /&gt;
1451     anno_flag=2;&lt;BR /&gt;
1452&lt;BR /&gt;
1453     if Income &amp;gt;= 25000000 then&lt;BR /&gt;
1454        do;&lt;BR /&gt;
1455           color='cxa50f15';&lt;BR /&gt;
1456           zoom=9;&lt;BR /&gt;
1457        end;&lt;BR /&gt;
1458     else&lt;BR /&gt;
1459        do;&lt;BR /&gt;
1460           color='cxde2d26';&lt;BR /&gt;
1461           zoom=10;&lt;BR /&gt;
1462        end;&lt;BR /&gt;
1463&lt;BR /&gt;
1464     * Draw a pie, to check centering of your letter 'o' *;&lt;BR /&gt;
1465     function='pie'; rotate=360; size=.5; position='5';&lt;BR /&gt;
1466     style='psolid'; output;&lt;BR /&gt;
1467     style='pempty'; color='black'; output;&lt;BR /&gt;
1468&lt;BR /&gt;
1469  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 2 observations read from the data set WORK.STADIUMS.&lt;BR /&gt;
NOTE: The data set WORK.STADIUMS_PLOT has 4 observations and 14 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.23 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1470&lt;BR /&gt;
1471&lt;BR /&gt;
1472  proc sql;&lt;BR /&gt;
1473     create table world as&lt;BR /&gt;
1474        select&lt;BR /&gt;
1475           -1*long  as x,&lt;BR /&gt;
1476           lat      as y,&lt;BR /&gt;
1477           segment,&lt;BR /&gt;
1478           cont     as continent,&lt;BR /&gt;
1479           id       as country&lt;BR /&gt;
1480        from maps.world&lt;BR /&gt;
1481  where (density&amp;lt;=1) and (id ^= 143);&lt;BR /&gt;
NOTE: Table WORK.WORLD created, with 14070 rows and 5 columns.&lt;BR /&gt;
&lt;BR /&gt;
1482  /*      where id = 160*/&lt;BR /&gt;
1483     ;&lt;BR /&gt;
1484     create table mydata as&lt;BR /&gt;
1485        select&lt;BR /&gt;
1486           unique continent, country, 1 as color&lt;BR /&gt;
1487        from world&lt;BR /&gt;
1488     ;&lt;BR /&gt;
NOTE: Table WORK.MYDATA created, with 260 rows and 3 columns.&lt;BR /&gt;
&lt;BR /&gt;
1489  quit;&lt;BR /&gt;
NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;
      real time           0.76 seconds&lt;BR /&gt;
      cpu time            0.07 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1490&lt;BR /&gt;
1491&lt;BR /&gt;
1492  data combined;&lt;BR /&gt;
1493     set world&lt;BR /&gt;
1494         stadiums_plot;&lt;BR /&gt;
1495  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 14070 observations read from the data set WORK.WORLD.&lt;BR /&gt;
NOTE: There were 4 observations read from the data set WORK.STADIUMS_PLOT.&lt;BR /&gt;
NOTE: The data set WORK.COMBINED has 14074 observations and 17 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.28 seconds&lt;BR /&gt;
      cpu time            0.04 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1496&lt;BR /&gt;
1497&lt;BR /&gt;
1498  proc gproject data = combined out=combined dupok eastlong project=gall;&lt;BR /&gt;
1499    id continent country;&lt;BR /&gt;
1500  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The GALL projection is experimental.&lt;BR /&gt;
NOTE: POLELONG = -9.92333E-13.&lt;BR /&gt;
NOTE: There were 14074 observations read from the data set WORK.COMBINED.&lt;BR /&gt;
NOTE: The data set WORK.COMBINED has 14074 observations and 17 variables.&lt;BR /&gt;
NOTE: PROCEDURE GPROJECT used (Total process time):&lt;BR /&gt;
      real time           0.56 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1501&lt;BR /&gt;
1502&lt;BR /&gt;
1503&lt;BR /&gt;
1504  data world impact_sites;&lt;BR /&gt;
1505    set combined;&lt;BR /&gt;
1506&lt;BR /&gt;
1507     length href_string $200.;&lt;BR /&gt;
1508&lt;BR /&gt;
1509     href_string = 'http://maps.google.com/?ie=UTF8&amp;amp;ll='&lt;BR /&gt;
1510                 || trim(left(lat))&lt;BR /&gt;
1511                 || ','&lt;BR /&gt;
1512                 || trim(left(long))&lt;BR /&gt;
1513                 || '&amp;amp;spn=0.074899,0.102654&amp;amp;t=h&amp;amp;z='&lt;BR /&gt;
1514                 || trim(left(zoom))&lt;BR /&gt;
1515                 || '&amp;amp;om=1';&lt;BR /&gt;
1516&lt;BR /&gt;
1517     length html $1024.;&lt;BR /&gt;
1518&lt;BR /&gt;
1519     if style='pempty' then&lt;BR /&gt;
1520        html = 'title='&lt;BR /&gt;
1521              || quote( trim(left(id))&lt;BR /&gt;
1522                       || '0d'x&lt;BR /&gt;
1523                       || 'Diameter: '&lt;BR /&gt;
1524                       || trim(left(name))&lt;BR /&gt;
1525                       || ' km'&lt;BR /&gt;
1526                       || '0d'x&lt;BR /&gt;
1527                       || 'Age: '&lt;BR /&gt;
1528                       || trim(left(income))&lt;BR /&gt;
1529                       || ' Ma'&lt;BR /&gt;
1530                       || ' '   )&lt;BR /&gt;
1531              || ' '&lt;BR /&gt;
1532              || 'href='&lt;BR /&gt;
1533              || quote(href_string);&lt;BR /&gt;
1534&lt;BR /&gt;
1535    if anno_flag=2 then output impact_sites;&lt;BR /&gt;
1536    else output world;&lt;BR /&gt;
1537  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Numeric values have been converted to character&lt;BR /&gt;
      values at the places given by: (Line):(Column).&lt;BR /&gt;
      1510:29   1512:29   1514:29   1521:33   1528:35&lt;BR /&gt;
NOTE: Variable id is uninitialized.&lt;BR /&gt;
NOTE: There were 14074 observations read from the data set WORK.COMBINED.&lt;BR /&gt;
NOTE: The data set WORK.WORLD has 14070 observations and 20 variables.&lt;BR /&gt;
NOTE: The data set WORK.IMPACT_SITES has 4 observations and 20 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           1.51 seconds&lt;BR /&gt;
      cpu time            0.26 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1538&lt;BR /&gt;
1539&lt;BR /&gt;
1540&lt;BR /&gt;
1541  GOPTIONS DEVICE=png;&lt;BR /&gt;
1542  goptions xpixels=1000 ypixels=650;&lt;BR /&gt;
1543  goptions cback=white;&lt;BR /&gt;
1544  goptions border;&lt;BR /&gt;
1545&lt;BR /&gt;
1546  ODS LISTING CLOSE;&lt;BR /&gt;
1547  ODS HTML path=odsout body="stadium.htm"&lt;BR /&gt;
1548   (title="SAS/Stadium Map") style=minimal;&lt;BR /&gt;
NOTE: Writing HTML Body file: stadium.htm&lt;BR /&gt;
1549&lt;BR /&gt;
1550  pattern1 color=lig;&lt;BR /&gt;
1551&lt;BR /&gt;
1552  goptions htitle=5pct ftitle="arial/bold" htext=2.75pct ftext="arial"&lt;BR /&gt;
1552! ctext=gray;&lt;BR /&gt;
1553&lt;BR /&gt;
1554  title1 justify=left "  Stadiums label";&lt;BR /&gt;
1555  footnote1 j=c "click dots for detailed map";&lt;BR /&gt;
1556&lt;BR /&gt;
1557&lt;BR /&gt;
1558  proc gmap data=mydata map=world anno=impact_sites;&lt;BR /&gt;
1559    id continent country;&lt;BR /&gt;
1560    choro color /&lt;BR /&gt;
1561     coutline=graybb&lt;BR /&gt;
1562     nolegend discrete&lt;BR /&gt;
1563     des="" name="stadium";&lt;BR /&gt;
1564  quit;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: PROCEDURE GMAP used (Total process time):&lt;BR /&gt;
      real time           0.01 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1565&lt;BR /&gt;
1566&lt;BR /&gt;
1567&lt;BR /&gt;
1568&lt;BR /&gt;
1569  proc sql ;&lt;BR /&gt;
1570     create table table_data as&lt;BR /&gt;
1571        select unique name, href_string, lat, long, income&lt;BR /&gt;
1572        from impact_sites&lt;BR /&gt;
1573        order by income&lt;BR /&gt;
1574     ;&lt;BR /&gt;
NOTE: Table WORK.TABLE_DATA created, with 2 rows and 5 columns.&lt;BR /&gt;
&lt;BR /&gt;
1575  quit;&lt;BR /&gt;
NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;
      real time           0.25 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1576&lt;BR /&gt;
1577  data table_data;&lt;BR /&gt;
1578     set table_data;&lt;BR /&gt;
1579&lt;BR /&gt;
1580   length link $300 href $300;&lt;BR /&gt;
1581   label link='Impact Site';&lt;BR /&gt;
1582   href = 'href="' || trim(left(href_string)) || '"';&lt;BR /&gt;
1583   link = '&amp;lt;a ' || trim(href) || ' target="body"&amp;gt;' || htmlencode(trim(name))&lt;BR /&gt;
1583! || '&amp;lt;/a&amp;gt;';&lt;BR /&gt;
1584  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 2 observations read from the data set WORK.TABLE_DATA.&lt;BR /&gt;
NOTE: The data set WORK.TABLE_DATA has 2 observations and 7 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.23 seconds&lt;BR /&gt;
      cpu time            0.01 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1585  options nocenter;&lt;BR /&gt;
1586  title1 justify=left "Meteorite Impact Craters";&lt;BR /&gt;
1587  footnote1 j=l link="http://www.solarviews.com/eng/crater.htm"&lt;BR /&gt;
1588    "Based on 10sep2007 data from &lt;A href="http://www.solarviews.com/eng/crater.htm" target="_blank"&gt;http://www.solarviews.com/eng/crater.htm&lt;/A&gt; ";&lt;BR /&gt;
1589  proc report data=table_data;&lt;BR /&gt;
1590  column link lat long income name;&lt;BR /&gt;
1591  define income / center;&lt;BR /&gt;
1592  define long / right;&lt;BR /&gt;
1593  define lat / right;&lt;BR /&gt;
1594  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: This SAS session is using a registry in WORK.  All changes will be lost at&lt;BR /&gt;
      the end of this session.&lt;BR /&gt;
NOTE: This SAS session is using a registry in WORK.  All changes will be lost at&lt;BR /&gt;
      the end of this session.&lt;BR /&gt;
NOTE: There were 2 observations read from the data set WORK.TABLE_DATA.&lt;BR /&gt;
NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;
      real time           6.46 seconds&lt;BR /&gt;
      cpu time            0.34 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1595&lt;BR /&gt;
1596  ODS HTML CLOSE;&lt;BR /&gt;
1597  ODS LISTING;&lt;BR /&gt;
NOTE: This SAS session is using a registry in WORK.  All changes will be lost at&lt;BR /&gt;
      the end of this session.&lt;BR /&gt;
NOTE: This SAS session is using a registry in WORK.  All changes will be lost at&lt;BR /&gt;
      the end of this session.&lt;BR /&gt;
NOTE: This SAS session is using a registry in WORK.  All changes will be lost at&lt;BR /&gt;
      the end of this session.&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 20 Jan 2011 00:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64517#M2171</guid>
      <dc:creator>JohnT</dc:creator>
      <dc:date>2011-01-20T00:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping with variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64518#M2172</link>
      <description>Applied sbb's suggestion to the above!

Message was edited by: John T</description>
      <pubDate>Thu, 20 Jan 2011 05:50:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64518#M2172</guid>
      <dc:creator>JohnT</dc:creator>
      <dc:date>2011-01-20T05:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping with variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64519#M2173</link>
      <description>Edit your prior post and consider this markup guideline for the forum - recommend bookmarking a favorite for it:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=27609" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=27609&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 20 Jan 2011 11:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64519#M2173</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-01-20T11:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping with variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64520#M2174</link>
      <description>Here's the essential/minimal code to do what you're wanting...&lt;BR /&gt;
&lt;BR /&gt;
data stadiums;&lt;BR /&gt;
name='SC Stadium'; Lat=-27.465608; Long=153.010336; Income=50000000; output;&lt;BR /&gt;
name='GC Stadium'; Lat=-28.005627; Long=153.367188; Income=20000000; output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data stadiums; set stadiums;&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)) stadiums;&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 stadiums; set combined;&lt;BR /&gt;
if anno_flag eq 2 then output stadiums;&lt;BR /&gt;
else output austral;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* convert projected point data into annotated dots */&lt;BR /&gt;
data stadiums; set stadiums;&lt;BR /&gt;
length color $8;&lt;BR /&gt;
xsys='2'; ysys='2'; hsys='3'; when='a';&lt;BR /&gt;
function='pie'; rotate=360; size=1.1;&lt;BR /&gt;
if (income gt 25000000) then color='red'; &lt;BR /&gt;
else color='green';&lt;BR /&gt;
style='psolid'; output;&lt;BR /&gt;
style='pempty'; color='gray33'; output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
pattern1 v=solid color=cornsilk;&lt;BR /&gt;
title "Australia Stadium Income";&lt;BR /&gt;
proc gmap map=austral data=austral anno=stadiums;&lt;BR /&gt;
id id;&lt;BR /&gt;
choro id / levels=1 nolegend coutline=grayaa;&lt;BR /&gt;
run;</description>
      <pubDate>Thu, 20 Jan 2011 13:32:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64520#M2174</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-01-20T13:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping with variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64521#M2175</link>
      <description>Hi Robert,&lt;BR /&gt;
&lt;BR /&gt;
Fantastic, that's exactly what I was after.&lt;BR /&gt;
&lt;BR /&gt;
I think I can use this as a stub for other stuff one day too.&lt;BR /&gt;
&lt;BR /&gt;
Now all I have to do is really understand what the code is doing, ie read up what gproject and gmap are actually doing.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
edit:&lt;BR /&gt;
After playing around with Robert's code, I've realised that PROC GMAP wants to have a RUN statement at the end of it, which was why my job in the first post didn't work.  I put a QUIT instead.  I'll be using RUN;QUIT; when I run future jobs of this nature.

Message was edited by: John T</description>
      <pubDate>Thu, 20 Jan 2011 22:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64521#M2175</guid>
      <dc:creator>JohnT</dc:creator>
      <dc:date>2011-01-20T22:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping with variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64522#M2176</link>
      <description>hi ... another non-GMAP-related suggestion ...&lt;BR /&gt;
&lt;BR /&gt;
you might find it easier to use one of the CAT functions when constructing links, this ...&lt;BR /&gt;
&lt;BR /&gt;
href_string = 'http://maps.google.com/?ie=UTF8&amp;amp;ll='&lt;BR /&gt;
                || trim(left(lat))&lt;BR /&gt;
                 || ','&lt;BR /&gt;
                 || trim(left(long))&lt;BR /&gt;
                 || '&amp;amp;spn=0.074899,0.102654&amp;amp;t=h&amp;amp;z='&lt;BR /&gt;
                 || trim(left(zoom))&lt;BR /&gt;
                 || '&amp;amp;om=1';&lt;BR /&gt;
				 &lt;BR /&gt;
can be replaced by this (I used multiple lines to make it look like your statement) ...&lt;BR /&gt;
&lt;BR /&gt;
href_string = cats(&lt;BR /&gt;
'http://maps.google.com/?ie=UTF8&amp;amp;ll=',&lt;BR /&gt;
lat,&lt;BR /&gt;
',',&lt;BR /&gt;
long,&lt;BR /&gt;
'&amp;amp;spn=0.074899,0.102654&amp;amp;t=h&amp;amp;z=',&lt;BR /&gt;
zoom,&lt;BR /&gt;
'&amp;amp;om=1'&lt;BR /&gt;
);&lt;BR /&gt;
&lt;BR /&gt;
the CATS function implies TRIM+LEFT when you use a variable name</description>
      <pubDate>Thu, 10 Feb 2011 17:24:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Mapping-with-variables/m-p/64522#M2176</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2011-02-10T17:24:32Z</dc:date>
    </item>
  </channel>
</rss>

