<?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/310714#M10941</link>
    <description>&lt;P&gt;Here's a document I wrote about annotating markers on a map:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;A href="http://robslink.com/SAS/book2/Chapter_07_Annotating_on_Maps.pdf" target="_self"&gt;http://robslink.com/SAS/book2/Chapter_07_Annotating_on_Maps.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be good to read this first, and then start from the beginning, and create your map one step at a time, making sure each step is working properly and producing the desired map.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Nov 2016 16:41:57 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2016-11-10T16:41:57Z</dc:date>
    <item>
      <title>Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310288#M10904</link>
      <description>&lt;P&gt;I want to create a bubble map with the proc gmap. While i am using maps.world dataset which is having &amp;nbsp;the continent for America. I am annotating the data points and also projecting the annoated dataset with the proc gproject, but the map is coming in polygamy structure. Could you please suggest me how to get the proper map with the outline?&lt;/P&gt;&lt;P&gt;This is the code that i am currently using is as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options fmtsearch=(work, sashelp.mapfmts) nodate nonumber noerrorabend&lt;BR /&gt;orientation=landscape leftmargin=1in rightmargin=1in topmargin=1in bottommargin=1in;&lt;BR /&gt;goptions reset=all cback=white border htitle=12pt htext=10pt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Creating a graph across different regions*/&lt;/P&gt;&lt;P&gt;data world(where=(x is not missing and y is not missing));&lt;BR /&gt;length country $50.;&lt;BR /&gt;set mapsgfk.world;&lt;BR /&gt;*country=put(id,glcnsm.);&lt;BR /&gt;country=strip(idname);&lt;BR /&gt;if country ='Dominican Republic' then country='Dominican Rep.';else if country ='Korea, South' then country='South Korea';else if country ='Netherlands Antilles' then country='Dutch Antilles';&lt;BR /&gt;else if country ='South Africa' then country='South Africa';else if country ='Trinidad And Tobago' then country='Trinidad,Tobago';else if country ='United Arab Emirates' then country='Utd.Arab Emir.';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;create table world1 as&lt;BR /&gt;select distinct a.*,b.region,b.unit1&lt;BR /&gt;from world as a inner join final1 as b on a.country=b.country;&lt;BR /&gt;*order by b.region,a.country,b.unit1,a.x,a.y;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;data world1;&lt;BR /&gt;set world1 /*(drop=x y)*/;&lt;BR /&gt;by region country unit1 ;&lt;BR /&gt;*if first.country;&lt;BR /&gt;*Here converting degrees to radiants;&lt;BR /&gt;x=atan(1)/45*long;&lt;BR /&gt;y=atan(1)/45*lat;&lt;BR /&gt;x=-x;&lt;BR /&gt;keep region country x y unit1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc gproject data=world1 out=world1 project=gnomon dupok;&lt;BR /&gt;id region country ;/*remove unit1*/&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort;&lt;BR /&gt;by region country unit1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data repl;&lt;BR /&gt;set world1;&lt;BR /&gt;by region country;&lt;BR /&gt;if first.country;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data repl;&lt;BR /&gt;length position $8. function style color text $100.;&lt;BR /&gt;set repl;&lt;BR /&gt;flag=1;&lt;BR /&gt;xsys='2'; ysys='2'; hsys='3'; function='pie'; when ='a'; rotate= 360;&lt;BR /&gt;style='solid';&lt;BR /&gt;size=sqrt(unit1/3.14)*.02;&lt;BR /&gt;color='green';&lt;BR /&gt;output;&lt;BR /&gt;function='label';style='Albany AMT'; position='8';rotate=.; color='vibg';&lt;BR /&gt;size=.;text=strip(country);&lt;BR /&gt;output;&lt;BR /&gt;function='label';style=''; position='12';rotate=.;color='red';&lt;BR /&gt;size=.;&lt;BR /&gt;text=strip(put(unit1,8.));&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/*data combined;*/&lt;BR /&gt;/* set world1 repl;*/&lt;BR /&gt;/*run;*/&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro rpt4(region);&lt;/P&gt;&lt;P&gt;data world2;&lt;BR /&gt;set world1;&lt;BR /&gt;where region="&amp;amp;region." ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;title;footnote;&lt;BR /&gt;ods escapechar = '^';&lt;BR /&gt;ods listing close;&lt;BR /&gt;ods pdf file="C:\Users\ppothine\Desktop\Report\f&amp;amp;region..pdf" ;&lt;BR /&gt;ods graphics on;&lt;/P&gt;&lt;P&gt;title3 j=r 'page 1 of 1';title4 j=c 'Summary table across different regions';&lt;BR /&gt;title5;&lt;BR /&gt;footnote2 j=r "&amp;amp;todaydate &amp;amp;todaytime";&lt;/P&gt;&lt;P&gt;pattern value=mempty color=blue repeat=100;&lt;BR /&gt;proc gmap data=world2 map=world2 ;&lt;BR /&gt;id region country;&lt;BR /&gt;choro country / discrete nolegend anno=repl(where=(region="&amp;amp;region."));&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;%rpt4(Americas);&lt;/P&gt;&lt;P&gt;%rpt4(Asia Pacific);&lt;/P&gt;&lt;P&gt;%rpt4(EMEA);&lt;/P&gt;&lt;P&gt;%rpt4(Japan);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching an output for the america.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know what is the input data set for getting the &amp;nbsp;proper map.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 19:44:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310288#M10904</guid>
      <dc:creator>pranav</dc:creator>
      <dc:date>2016-11-10T19:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310441#M10925</link>
      <description>&lt;P&gt;Since your WORLD dataset contains ordered coordinates you do not want to sort it if you are going to use to draw a map. Proc SQL reordered your data when creating World2. So the ordered x,y coordinate pairs are not in proper drawing order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if you were attempting to merge the values needed for the bubbles to your map data set or not. If that is what you needed the merge for that is unneeded. The Gmap procedure has a map data set for coordinates and a Data data set for response options used in bubble, prism or choro. As long as the Data data set has the coordinates of the point or id values used you should be okay.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may help to provide the actual proc gmap code as well.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2016 16:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310441#M10925</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-11-09T16:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: proc gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310454#M10927</link>
      <description>&lt;P&gt;A few additional things:&lt;/P&gt;
&lt;P&gt;1. You are taking the x,y missing values out in your first data step (world). &amp;nbsp;Missing values represent holes. &amp;nbsp;You are only taking the indicator of a hole (missing values) without taking the actual hole. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. &amp;nbsp;I don't know what is in 'final1', but 'mapsgfk.world' is sorted by ID. &amp;nbsp;So I wonder if the "by region country unit1" is sorted correctly.&lt;/P&gt;
&lt;P&gt;3. &amp;nbsp;You create "combined" by adding "world1" and "rep1" to it, but you never Proc GPROJECT it. &amp;nbsp;You just do rep1. &amp;nbsp;I too would like to see your GMAP.&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>Wed, 09 Nov 2016 17:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310454#M10927</guid>
      <dc:creator>Darrell_sas</dc:creator>
      <dc:date>2016-11-09T17:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310556#M10933</link>
      <description>&lt;P&gt;Hello Darell,&lt;BR /&gt;Thanks for your response, I would like to add some information regarding the final1 dataset. It contains the continents(regions Variable) like AsiaPacific, Americas, EMEA and Japan along with the countries(Country variable) and the number of lenses(unit1 variable)that are shipped to those countries.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 03:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310556#M10933</guid>
      <dc:creator>pranav</dc:creator>
      <dc:date>2016-11-10T03:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310714#M10941</link>
      <description>&lt;P&gt;Here's a document I wrote about annotating markers on a map:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;A href="http://robslink.com/SAS/book2/Chapter_07_Annotating_on_Maps.pdf" target="_self"&gt;http://robslink.com/SAS/book2/Chapter_07_Annotating_on_Maps.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be good to read this first, and then start from the beginning, and create your map one step at a time, making sure each step is working properly and producing the desired map.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 16:41:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310714#M10941</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2016-11-10T16:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310744#M10942</link>
      <description>&lt;P&gt;I think there are alot of problems here. &amp;nbsp;You are not Proc GPROJECTing your map itself. &amp;nbsp;I just adjusted your program.&lt;/P&gt;
&lt;P&gt;Also, you might want to place your annotate on the centroid of the country. &amp;nbsp;You are currently using the first point in the US, for example. &amp;nbsp;That is way off in Alaska. &amp;nbsp;The centroid macro is: &amp;nbsp;&lt;/P&gt;
&lt;P&gt;%annomac;&lt;BR /&gt;%centroid(InputDS,OutputDS,idvar,SEGONLY=1);&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The last argument is to use the largest segment of a country only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you can figure out your program from the one below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is your modified program:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data world; /*Don't delete missing values*/
length country $50.;
set mapsgfk.world;
*country=put(id,glcnsm.);
x=Long; y=lat; /*Moved unprojected to x,y*/
country=strip(idname);
if country ='Dominican Republic' then country='Dominican Rep.';else if country ='Korea, South' then country='South Korea';else if country ='Netherlands Antilles' then country='Dutch Antilles';
else if country ='South Africa' then country='South Africa';else if country ='Trinidad And Tobago' then country='Trinidad,Tobago';else if country ='United Arab Emirates' then country='Utd.Arab Emir.';
run;

data final1; 
length country $50. region $50.;
Country="China"; Unit1=10000; Region="AsiaPacific"; /*x=8.4465511368; y=46.8147705; */ output; 
Country="United States"; Unit1=100000; Region="Americas"; /*x=-99.56837548; y=37.1680595;*/ output;
run;

proc sql noprint;
create table world1 as
select distinct a.*,b.region,b.unit1 from world as a inner join final1 as b on a.country=b.country order by b.region,a.country,b.unit1,a.x,a.y;
quit;

data world1;
set world1 /*(drop=x y)*/;
by region country unit1 ;
*if first.country;
*Here converting degrees to radiants;
*x=atan(1)/45*long;  /*Not sure why radians */
*y=atan(1)/45*lat;   /* because world isn't */
*x=-x;
*keep region country x y unit1;
run;

data repl;
set world1;
by region country unit1;
if first.country;
run;

data repl;
length position $8. function style color text $100.;
set repl;
flag=1;
xsys='2'; ysys='2'; hsys='3'; function='pie'; when ='a'; rotate= 360;
style='solid';
size=sqrt(unit1/3.14)*.02;
color='green';
output;
function='label';style='Albany AMT'; position='8';rotate=.; color='vibg';
size=.;text=strip(country);
output;
function='label';style=''; position='12';rotate=.;color='red';
size=.;
text=strip(put(unit1,8.));
output;
run;

data combined;
set world repl; /*world instead of world1*/
run;

/* Used combined here.  Also eastlong and degrees */
/*
proc gproject data=combined out=combined project=gnomon  dupok eastlong degrees;
id region country;
run;
*/

/*seperated map and annotate */
data map anno; set combined;
if flag=1 then output anno;
else output map;
run;

pattern c='tan';
proc gmap data=map map=map anno=anno; id country segment; choro segment / levels=1; run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 13:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/310744#M10942</guid>
      <dc:creator>Darrell_sas</dc:creator>
      <dc:date>2016-11-11T13:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312002#M10973</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current problem is &amp;nbsp;in the pdf's which &amp;nbsp;is to scale the maps. In the pdf of EMEA the map is towards the left and would like to get it to center. In the Asia pacific the some part of russia is towards the left and needs to be right. The annoations on the map of Asia Pacific and EMEA are overlapping on one another. Is it possible to point out an arrow to that place and extend the line and then place the &amp;nbsp;annaoted text.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 15:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312002#M10973</guid>
      <dc:creator>pranav</dc:creator>
      <dc:date>2016-11-16T15:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312004#M10974</link>
      <description>&lt;P&gt;Need some information on projecting and how to &amp;nbsp;scale the maps so that they good to see.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 15:12:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312004#M10974</guid>
      <dc:creator>pranav</dc:creator>
      <dc:date>2016-11-16T15:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312009#M10975</link>
      <description>&lt;P&gt;Try using the 'nodateline' option when you gproject.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 15:31:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312009#M10975</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2016-11-16T15:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312010#M10976</link>
      <description>&lt;P&gt;This is the current code that gets those maps:&lt;/P&gt;&lt;P&gt;options nodateline leftmargin=0.5in rightmargin=0.5in topmargin=0.5in bottommargin=0.5in;&lt;BR /&gt;data world; /*Don't delete missing values*/&lt;BR /&gt;length region country $50.;&lt;BR /&gt;set mapsgfk.world mapsgfk.china(in=b keep =id long lat where=(id="CN-8100"));&lt;BR /&gt;*country=put(id,glcnsm.);&lt;BR /&gt;x=Long; y=lat; /*Moved unprojected to x,y*/&lt;BR /&gt;country=strip(idname);&lt;BR /&gt;region=strip(put(cont,contfmt.));&lt;BR /&gt;if b then do;country="Hong Kong";region="Asia Pacific";id="HK";segment=1; end;&lt;BR /&gt;&lt;BR /&gt;%let SouthKorea=%nrstr("Korea, Democratic People's Republic of");&lt;BR /&gt;%put &amp;amp;SouthKorea;&lt;BR /&gt;if country ='Dominican Republic' then country='Dominican Rep.';else if country =&amp;amp;SouthKorea. then country='South Korea';&lt;BR /&gt;else if country ='Trinidad and Tobago' then country='Trinidad,Tobago';else if country ='Taiwan, Province of China' then country='Taiwan';else if country ='Russian Federation' then country='Russia';&lt;BR /&gt;else if country ='United Arab Emirates' then country='Utd.Arab Emir.'; else if country ='South Africa' then country='South Africa';&lt;/P&gt;&lt;P&gt;if region='Europe' then region='EMEA';&lt;BR /&gt;else if region='Asia' then region='Asia Pacific';&lt;BR /&gt;else if region='Oceania' then region='Asia Pacific';&lt;BR /&gt;else if region='Africa' then region='EMEA';&lt;BR /&gt;else if region in ('North America','South America') then region='Americas';&lt;/P&gt;&lt;P&gt;*As per Jose Ochoa suggestion;&lt;BR /&gt;if country='Japan' then region='Asia Pacific';&lt;BR /&gt;else if country in ('Utd.Arab Emir.','Russia','Israel') then region='EMEA';&lt;BR /&gt;else if country='Bonaire, Saint Eustatius and Saba' then region='Americas';&lt;/P&gt;&lt;P&gt;ord=_n_;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data final_;&lt;BR /&gt;set final1;&lt;BR /&gt;*As per Jose Ochoa suggestion;&lt;BR /&gt;if country='Dutch Antilles' then country='Bonaire, Saint Eustatius and Saba';&lt;BR /&gt;if country='Bermuda' then region='Americas';else if country='Japan' then region='Asia Pacific';&lt;BR /&gt;else if country='Australia' then region='Asia Pacific';&lt;BR /&gt;else if country='Utd.Arab Emir.' then region='EMEA';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;create table world1 as&lt;BR /&gt;select distinct a.*,b.unit1 from world as a left join final_ as b on a.region=b.region and a.country=b.country order by a.region,a.country,a.segment,b.unit1;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;proc sort;&lt;BR /&gt;by region country id segment unit1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%annomac;&lt;BR /&gt;%centroid(world1,repl,region country id segment unit1,SEGONLY=1);&lt;/P&gt;&lt;P&gt;proc sql feedback undo_policy=none noprint;&lt;BR /&gt;create table repl as&lt;BR /&gt;select distinct a.*,b.ord from repl as a natural join (select distinct region,country,ord from world1) as b order by a.region,a.country,b.ord;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;%macro region(region);&lt;BR /&gt;data repl_(where=(region="&amp;amp;region."));&lt;BR /&gt;set repl(where=(region="&amp;amp;region." and unit1 ne . )) ;&lt;BR /&gt;by region country ord;&lt;BR /&gt;if first.country;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort;&lt;BR /&gt;by ord;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data repl_;&lt;BR /&gt;length position $8. function style color text $100.;&lt;BR /&gt;set repl_;&lt;BR /&gt;flag=1;&lt;BR /&gt;xsys='2'; ysys='2'; hsys='3'; function='pie'; when ='a'; rotate= 360;&lt;BR /&gt;style='solid';&lt;BR /&gt;size=sqrt(unit1/3.14)*.008;&lt;BR /&gt;%if &amp;amp;region=EMEA or &amp;amp;region=Japan %then %do;size=sqrt(unit1/3.14)*.002;%end;&lt;BR /&gt;color='light green';position='1';&lt;BR /&gt;output;&lt;/P&gt;&lt;P&gt;function='label';style='Albany AMT'; position='4';color='CXFF00FF';&lt;BR /&gt;text=strip(id); size=1;&lt;BR /&gt;output;&lt;/P&gt;&lt;P&gt;position='8';color='blue';&lt;BR /&gt;text=strip(put(unit1,8.)); size=1;&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=world1 out=world2;&lt;BR /&gt;by ord;&lt;BR /&gt;where region="&amp;amp;region.";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;title;footnote;&lt;BR /&gt;ods listing close;ods graphics on;&lt;BR /&gt;ods pdf file="C:\Users\ppothine\Desktop\Report\f&amp;amp;region..pdf" ;&lt;BR /&gt;title3 j=r 'page 1 of 1';title4 j=c "Graphical Representation for &amp;amp;region.";title5;&lt;BR /&gt;footnote2 j=r "&amp;amp;sysdate. &amp;amp;systime.";&lt;/P&gt;&lt;P&gt;pattern c='white';&lt;BR /&gt;proc gmap data=world2 map=world2 anno=repl_;&lt;BR /&gt;id region id segment;&lt;BR /&gt;choro unit1 / levels=1 stat=first nolegend;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;BR /&gt;ods _all_ close;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;%region(Americas);&lt;/P&gt;&lt;P&gt;%region(Asia Pacific);&lt;/P&gt;&lt;P&gt;%region(EMEA);&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 15:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312010#M10976</guid>
      <dc:creator>pranav</dc:creator>
      <dc:date>2016-11-16T15:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312015#M10978</link>
      <description>&lt;P&gt;Can you check the post above. I just updated it.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 15:54:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312015#M10978</guid>
      <dc:creator>pranav</dc:creator>
      <dc:date>2016-11-16T15:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312084#M10984</link>
      <description>&lt;P&gt;NODATELINE goes in GPROJECT. &amp;nbsp;Proc GPROJECT data=... OUT=... PROJECT=none NODATELINE;&lt;/P&gt;
&lt;P&gt;It is because Russia and some other countries go from 180 to -180 longitude which is the default way of projecting the world.&lt;/P&gt;
&lt;P&gt;I did not see a GPROJECT in your code at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the doc to GPROJECT:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#n0h81palrr0ucqn11g9r0y3incml-508.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#n0h81palrr0ucqn11g9r0y3incml-508.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 19:04:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312084#M10984</guid>
      <dc:creator>Darrell_sas</dc:creator>
      <dc:date>2016-11-16T19:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312223#M10991</link>
      <description>&lt;P&gt;Here is the following code with the proc gproject in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options leftmargin=0.5in rightmargin=0.5in topmargin=0.5in bottommargin=0.5in;&lt;BR /&gt;data world; /*Don't delete missing values*/&lt;BR /&gt;length region country $50.;&lt;BR /&gt;set mapsgfk.world mapsgfk.china(in=b keep =id long lat where=(id="CN-8100"));&lt;BR /&gt;*country=put(id,glcnsm.);&lt;BR /&gt;x=Long; y=lat; /*Moved unprojected to x,y*/&lt;BR /&gt;country=strip(idname);&lt;BR /&gt;region=strip(put(cont,contfmt.));&lt;BR /&gt;if b then do;country="Hong Kong";region="Asia Pacific";id="HK";segment=1; end;&lt;BR /&gt;&lt;BR /&gt;%let SouthKorea=%nrstr("Korea, Democratic People's Republic of");&lt;BR /&gt;%put &amp;amp;SouthKorea;&lt;BR /&gt;if country ='Dominican Republic' then country='Dominican Rep.';else if country =&amp;amp;SouthKorea. then country='South Korea';&lt;BR /&gt;else if country ='Trinidad and Tobago' then country='Trinidad,Tobago';else if country ='Taiwan, Province of China' then country='Taiwan';else if country ='Russian Federation' then country='Russia';&lt;BR /&gt;else if country ='United Arab Emirates' then country='Utd.Arab Emir.'; else if country ='South Africa' then country='South Africa';&lt;/P&gt;&lt;P&gt;if region in ('Europe','Africa') then region='EMEA';&lt;BR /&gt;else if region in ('Asia','Oceania') then region='Asia Pacific';&lt;BR /&gt;else if region in ('North America','South America') then region='Americas';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if country='Japan' then region='Asia Pacific';&lt;BR /&gt;else if country in ('Utd.Arab Emir.','Russia','Israel','Saudi Arabia','Yemen','Oman') then region='EMEA';&lt;BR /&gt;else if country='Bonaire, Saint Eustatius and Saba' then region='Americas';&lt;/P&gt;&lt;P&gt;ord=_n_;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data final_;&lt;BR /&gt;set final1;&lt;BR /&gt;&lt;BR /&gt;if country='Dutch Antilles' then country='Bonaire, Saint Eustatius and Saba';&lt;BR /&gt;if country='Bermuda' then region='Americas';else if country='Japan' then region='Asia Pacific';&lt;BR /&gt;else if country='Australia' then region='Asia Pacific';&lt;BR /&gt;else if country='Utd.Arab Emir.' then region='EMEA';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;create table world1 as&lt;BR /&gt;select distinct a.*,b.unit1 from world as a left join final_ as b on a.region=b.region and a.country=b.country order by a.ord,a.region,a.country,a.segment,b.unit1;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;proc gproject data=world1 out=world1 nodateline project=none;&lt;BR /&gt;id region country id;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort;&lt;BR /&gt;by region country id segment unit1;&lt;BR /&gt;run;&lt;BR /&gt;%annomac;&lt;BR /&gt;%centroid(world1,repl,region country id segment unit1,SEGONLY=1);&lt;/P&gt;&lt;P&gt;proc sql feedback undo_policy=none noprint;&lt;BR /&gt;create table repl as&lt;BR /&gt;select distinct a.*,b.ord from repl as a natural join (select distinct region,country,ord from world1) as b order by a.region,a.country,b.ord;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;%macro region(region);&lt;BR /&gt;data repl_(where=(region="&amp;amp;region."));&lt;BR /&gt;set repl(where=(region="&amp;amp;region." and unit1 ne . )) ;&lt;BR /&gt;by region country ord;&lt;BR /&gt;if last.country;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort;&lt;BR /&gt;by ord;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data repl_;&lt;BR /&gt;length position $8. function style color text $100.;&lt;BR /&gt;set repl_;&lt;BR /&gt;flag=1;&lt;BR /&gt;xsys='2'; ysys='2'; hsys='3'; function='pie'; when ='a'; rotate= 360;&lt;BR /&gt;style='solid';&lt;BR /&gt;size=sqrt(unit1/3.14)*.008;&lt;BR /&gt;%if &amp;amp;region=EMEA or &amp;amp;region=Japan %then %do;size=sqrt(unit1/3.14)*.002;%end;&lt;BR /&gt;color='light green';position='1';&lt;BR /&gt;output;&lt;/P&gt;&lt;P&gt;function='label';style='Albany AMT'; position='4';color='CXFF00FF';&lt;BR /&gt;text=strip(id); size=1;&lt;BR /&gt;output;&lt;/P&gt;&lt;P&gt;position='8';color='blue';&lt;BR /&gt;text=strip(put(unit1,8.)); size=1;&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=world1 out=world2;&lt;BR /&gt;by ord;&lt;BR /&gt;where region="&amp;amp;region.";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;title;footnote;&lt;BR /&gt;ods listing close;ods graphics on;&lt;BR /&gt;ods pdf file="C:\Users\ppothine\Desktop\Report\f&amp;amp;region..pdf" ;&lt;BR /&gt;title3 j=r 'page 1 of 1';title4 j=c "Graphical Representation for &amp;amp;region.";title5;&lt;BR /&gt;footnote2 j=r "&amp;amp;sysdate. &amp;amp;systime.";&lt;/P&gt;&lt;P&gt;pattern c='white';&lt;BR /&gt;proc gmap data=world2 map=world2 anno=repl_;&lt;BR /&gt;id region id segment;&lt;BR /&gt;choro unit1 / levels=1 stat=first nolegend;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;BR /&gt;ods _all_ close;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;%region(Americas);&lt;/P&gt;&lt;P&gt;%region(Asia Pacific);&lt;/P&gt;&lt;P&gt;%region(EMEA);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with the proc gproject in the above code but still the output remains the same as before. Could you please guide me? Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 06:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312223#M10991</guid>
      <dc:creator>pranav</dc:creator>
      <dc:date>2016-11-17T06:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312312#M10992</link>
      <description>&lt;P&gt;You've got a lot of code, and I'm not sure it's doing what you think it's doing.&lt;/P&gt;
&lt;P&gt;I would recommend starting small/simple, and working your way up to the final map you want.&lt;/P&gt;
&lt;P&gt;That way, you can understand each piece of code, and know that it is having the desired effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a small/simple example I would recommend starting with...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title "Default projection";&lt;BR /&gt;proc gmap data=mapsgfk.world map=mapsgfk.world (where=(cont not in (92 97 91 93 94)));&lt;BR /&gt;id id;&lt;BR /&gt;choro cont / discrete;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc gproject data=mapsgfk.world (where=(cont not in (92 97 91 93 94))) out=newmap&lt;BR /&gt;latlong degrees eastlong nodateline;&lt;BR /&gt;id id;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title "Custom projection, using nodateline";&lt;BR /&gt;proc gmap data=newmap map=newmap;&lt;BR /&gt;id id;&lt;BR /&gt;choro cont / discrete;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5884iE28A928F1CA73E50/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="gmap10.png" title="gmap10.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5885i9C7DEF9AD0226226/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="gmap11.png" title="gmap11.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 12:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gmap/m-p/312312#M10992</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2016-11-17T12:47:28Z</dc:date>
    </item>
  </channel>
</rss>

