<?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 sgmap bubble plot using group option in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sgmap-bubble-plot-using-group-option/m-p/578790#M164217</link>
    <description>&lt;P&gt;I'm trying to make a bubble plot using sgmaps with the group option as seen here: &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2018/11/29/proc-sgmap-series-plot-importing-shapefiles-and-using-proc-gproject/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/graphicallyspeaking/2018/11/29/proc-sgmap-series-plot-importing-shapefiles-and-using-proc-gproject/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code works fine without the group option, but is throwing the following error when I add it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 97           bubble x=x y=y size=areacodes  / group=outlier_flag;
                                               _____
                                               22
                                               76
 ERROR 22-322: Syntax error, expecting one of the following: ;, DATALABEL, DATALABELATTRS, DATALABELPOS, FILL, FILLATTRS, 
               LEGENDLABEL, NAME, NOFILL, OUTLINE, TRANSPARENCY.  
 ERROR 76-322: Syntax error, statement will be ignored.&lt;/PRE&gt;
&lt;P&gt;My full code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 
data annotations;   
   set sashelp.zipcode(keep=zip areacodes);
   where zip in (89119,00501);
   outlier_flag = zip eq 89119;
run; 

proc geocode method=zip data=annotations out=annotations_xy lookupcity=sashelp.zipcode nocity attributevar=(state); 
run;

proc sql noprint;
  select distinct state into :state_list separated by ',' from annotations_xy;
quit;
%put &amp;amp;=state_list;

data map_boundaries;
  set maps.states;
  where state in (&amp;amp;state_list);
  x = -x * 45/atan(1); 
  y =  y * 45/atan(1);
run;
     
ods graphics / reset=all imagename="map" imagefmt=png width=1024px height=768px border=off;

proc sgmap mapdata=map_boundaries plotdata=annotations_xy;           
  esrimap url='http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base';  
  choromap / mapid=state density=2;   
  bubble x=x y=y size=areacodes  / group=outlier_flag;
run;
quit;



&lt;/PRE&gt;
&lt;P&gt;Setinit excerpt:&lt;/P&gt;
&lt;PRE&gt;Original site validation data
 Current version: 9.04.01M5P091317
 Operating System:   LIN X64 .
 Product expiration dates:
 ---Base SAS Software                      
 ---SAS/STAT                               
 ---SAS/GRAPH                              
 ---SAS Integration Technologies           
 ---SAS/Secure 168-bit                     
 ---SAS Enterprise Guide                   
 ---SAS/ACCESS Interface to PC Files       
 ---SAS Workspace Server for Local Access  
&lt;/PRE&gt;
&lt;P&gt;Is it possible this feature was only just added and doesn't exist in TS1M5?&amp;nbsp; I couldn't find any documentation that clarifies things.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 17:53:05 GMT</pubDate>
    <dc:creator>RobP</dc:creator>
    <dc:date>2019-08-02T17:53:05Z</dc:date>
    <item>
      <title>sgmap bubble plot using group option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sgmap-bubble-plot-using-group-option/m-p/578790#M164217</link>
      <description>&lt;P&gt;I'm trying to make a bubble plot using sgmaps with the group option as seen here: &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2018/11/29/proc-sgmap-series-plot-importing-shapefiles-and-using-proc-gproject/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/graphicallyspeaking/2018/11/29/proc-sgmap-series-plot-importing-shapefiles-and-using-proc-gproject/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code works fine without the group option, but is throwing the following error when I add it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 97           bubble x=x y=y size=areacodes  / group=outlier_flag;
                                               _____
                                               22
                                               76
 ERROR 22-322: Syntax error, expecting one of the following: ;, DATALABEL, DATALABELATTRS, DATALABELPOS, FILL, FILLATTRS, 
               LEGENDLABEL, NAME, NOFILL, OUTLINE, TRANSPARENCY.  
 ERROR 76-322: Syntax error, statement will be ignored.&lt;/PRE&gt;
&lt;P&gt;My full code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 
data annotations;   
   set sashelp.zipcode(keep=zip areacodes);
   where zip in (89119,00501);
   outlier_flag = zip eq 89119;
run; 

proc geocode method=zip data=annotations out=annotations_xy lookupcity=sashelp.zipcode nocity attributevar=(state); 
run;

proc sql noprint;
  select distinct state into :state_list separated by ',' from annotations_xy;
quit;
%put &amp;amp;=state_list;

data map_boundaries;
  set maps.states;
  where state in (&amp;amp;state_list);
  x = -x * 45/atan(1); 
  y =  y * 45/atan(1);
run;
     
ods graphics / reset=all imagename="map" imagefmt=png width=1024px height=768px border=off;

proc sgmap mapdata=map_boundaries plotdata=annotations_xy;           
  esrimap url='http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base';  
  choromap / mapid=state density=2;   
  bubble x=x y=y size=areacodes  / group=outlier_flag;
run;
quit;



&lt;/PRE&gt;
&lt;P&gt;Setinit excerpt:&lt;/P&gt;
&lt;PRE&gt;Original site validation data
 Current version: 9.04.01M5P091317
 Operating System:   LIN X64 .
 Product expiration dates:
 ---Base SAS Software                      
 ---SAS/STAT                               
 ---SAS/GRAPH                              
 ---SAS Integration Technologies           
 ---SAS/Secure 168-bit                     
 ---SAS Enterprise Guide                   
 ---SAS/ACCESS Interface to PC Files       
 ---SAS Workspace Server for Local Access  
&lt;/PRE&gt;
&lt;P&gt;Is it possible this feature was only just added and doesn't exist in TS1M5?&amp;nbsp; I couldn't find any documentation that clarifies things.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 17:53:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sgmap-bubble-plot-using-group-option/m-p/578790#M164217</guid>
      <dc:creator>RobP</dc:creator>
      <dc:date>2019-08-02T17:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: sgmap bubble plot using group option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sgmap-bubble-plot-using-group-option/m-p/578854#M164242</link>
      <description>&lt;P&gt;The GROUP= option for the BUBBLE statement is new in SAS 9.4M6.&amp;nbsp; Below is a screen shot from the "What's New" documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="What's New in Base SAS shows when options are added to ODS Graphics and Mapping procedures" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31492iC749526DA444E518/image-size/large?v=v2&amp;amp;px=999" role="button" title="GROUP option is new in M6 for BUBBLE statement.jpg" alt="What's New in Base SAS shows when options are added to ODS Graphics and Mapping procedures" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;What's New in Base SAS shows when options are added to ODS Graphics and Mapping procedures&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It looks like the version tag might be in the wrong spot in the online documentation.&amp;nbsp; I circled the version tag in red in the screen shot below.&amp;nbsp; I think it should be before GROUP=variable, not after the first sentence for GROUP=variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Version tag might be in the wrong spot in SAS online documentation" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31493iCF276589680EE5A0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Version tag might be in wrong spot in SAS online documentation.jpg" alt="Version tag might be in the wrong spot in SAS online documentation" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Version tag might be in the wrong spot in SAS online documentation&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm using SAS 9.4M6 in SAS University Edition.&amp;nbsp; I downloaded the STATES dataset from&amp;nbsp;&lt;A href="http://support.sas.com/rnd/datavisualization/mapsonline/html/archivedmaps.html" target="_self"&gt;http://support.sas.com/rnd/datavisualization/mapsonline/html/archivedmaps.html&lt;/A&gt;&amp;nbsp;and tried your code.&amp;nbsp; The SIZE=variable has to be numeric.&amp;nbsp; The areacodes variable is character.&amp;nbsp; I included the areacode variable in the annotations dataset, and then used SIZE=areacode on the BUBBLE statement, with DATALABEL=areacodes as an option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The image below shows the map.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Map showing area codes for spots in Nevada and New York" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31496i8A320626BAB78EEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="map.png" alt="Map showing area codes for spots in Nevada and New York" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Map showing area codes for spots in Nevada and New York&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 23:40:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sgmap-bubble-plot-using-group-option/m-p/578854#M164242</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2019-08-02T23:40:52Z</dc:date>
    </item>
  </channel>
</rss>

