<?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 SAS GMAP in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-GMAP/m-p/313543#M5877</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been trying to map customers into three different categories red, green and yellow, which, &amp;nbsp;as we can see works as expected. When I try to map providers for some reason the co-ordinates did not allign...not sure where did I do wrong. I have included my code here. I would appreciate any suggestion.&lt;/P&gt;&lt;P&gt;Thank you&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5950iA09086F8432CD7CA/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Untitled.png" title="Untitled.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;Code:
data mymap;
set maps.USCOUNTY;
where fipstate(state) = 'TX';
run;
/* Remove all internal county boundaries, just keeping the state outline */
proc gremove data=mymap out=outline;
by STATE; id COUNTY;
run;

data PROVIDERS;
set PROVIDER_2 (WHERE = (FLAG =1)); by STATE notsorted;
length function color style $8;
xsys='2'; ysys='2'; hsys='3'; when='a';
function='pie'; style='psolid'; rotate=360; size=1;
color='black';
run;

data outline;
set outline; by STATE SEGMENT notsorted;
length function color style $8;
color='black'; style='mempty'; when='a'; xsys='2'; ysys='2';
if first.SEGMENT then FUNCTION='Poly';
else function='Polycont';
run;
/*
proc gproject data=PROVIDERS out=providers
eastlong degrees latlong dupok;
id county;
run;*/
data outline1;
set providers;
length function color style $8;
xsys='2'; ysys='2'; hsys='3'; when='a';
function='pie'; style='psolid'; rotate=360; size=1;
color='red'; 
run;
data outline_all;
set outline outline1;
run;
&amp;nbsp;
proc gmap map=mymap data=MAPPING_DATA_SEG4_3 all; 
id state county; format value ranges.; 
choro value / discrete 
midpoints=1 2 3 legend=legend1 
cempty=gray99 coutline=gray99 
anno=outline_all
des='' name="&amp;amp;name"; 
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2016 17:54:16 GMT</pubDate>
    <dc:creator>sandeshregmi0</dc:creator>
    <dc:date>2016-11-22T17:54:16Z</dc:date>
    <item>
      <title>SAS GMAP</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-GMAP/m-p/313543#M5877</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been trying to map customers into three different categories red, green and yellow, which, &amp;nbsp;as we can see works as expected. When I try to map providers for some reason the co-ordinates did not allign...not sure where did I do wrong. I have included my code here. I would appreciate any suggestion.&lt;/P&gt;&lt;P&gt;Thank you&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5950iA09086F8432CD7CA/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Untitled.png" title="Untitled.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;Code:
data mymap;
set maps.USCOUNTY;
where fipstate(state) = 'TX';
run;
/* Remove all internal county boundaries, just keeping the state outline */
proc gremove data=mymap out=outline;
by STATE; id COUNTY;
run;

data PROVIDERS;
set PROVIDER_2 (WHERE = (FLAG =1)); by STATE notsorted;
length function color style $8;
xsys='2'; ysys='2'; hsys='3'; when='a';
function='pie'; style='psolid'; rotate=360; size=1;
color='black';
run;

data outline;
set outline; by STATE SEGMENT notsorted;
length function color style $8;
color='black'; style='mempty'; when='a'; xsys='2'; ysys='2';
if first.SEGMENT then FUNCTION='Poly';
else function='Polycont';
run;
/*
proc gproject data=PROVIDERS out=providers
eastlong degrees latlong dupok;
id county;
run;*/
data outline1;
set providers;
length function color style $8;
xsys='2'; ysys='2'; hsys='3'; when='a';
function='pie'; style='psolid'; rotate=360; size=1;
color='red'; 
run;
data outline_all;
set outline outline1;
run;
&amp;nbsp;
proc gmap map=mymap data=MAPPING_DATA_SEG4_3 all; 
id state county; format value ranges.; 
choro value / discrete 
midpoints=1 2 3 legend=legend1 
cempty=gray99 coutline=gray99 
anno=outline_all
des='' name="&amp;amp;name"; 
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 17:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-GMAP/m-p/313543#M5877</guid>
      <dc:creator>sandeshregmi0</dc:creator>
      <dc:date>2016-11-22T17:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GMAP</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-GMAP/m-p/313763#M5884</link>
      <description>&lt;P&gt;I notice you're using maps.uscounty - the x/y in this dataset are already projected, and there's no real way to project your lat/long point data in exactly the same way so that they line up with the map. The trick I use is to start with an unprojected map, and combine the map and point-data, project them together, and then separate them apart again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have written a little chapter explaining how to do this, which might help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://robslink.com/SAS/book2/Chapter_07_Annotating_on_Maps.pdf" target="_blank"&gt;http://robslink.com/SAS/book2/Chapter_07_Annotating_on_Maps.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:00:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-GMAP/m-p/313763#M5884</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2016-11-23T13:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GMAP</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-GMAP/m-p/313861#M5889</link>
      <description>&lt;P&gt;Thank you Rob. It worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 19:10:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-GMAP/m-p/313861#M5889</guid>
      <dc:creator>sandeshregmi0</dc:creator>
      <dc:date>2016-11-23T19:10:28Z</dc:date>
    </item>
  </channel>
</rss>

