<?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 questions in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/972300#M25611</link>
    <description>&lt;P&gt;Thank you for the recommendation,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I lost some of my country data when I tried with your code for some reason.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Aug 2025 22:03:13 GMT</pubDate>
    <dc:creator>sasgorilla</dc:creator>
    <dc:date>2025-08-07T22:03:13Z</dc:date>
    <item>
      <title>Proc gmap questions</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/972079#M25601</link>
      <description>&lt;P&gt;Hi. First time using proc gmap to build a world map to visualize number of studies on a topic.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's where I am at with a trial image. It appears to be doing what I believe it should do thus far.&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="sasgorilla_1-1754354538695.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/108792i152AC118F656A736/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sasgorilla_1-1754354538695.png" alt="sasgorilla_1-1754354538695.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do have a couple warnings in my log I wanted to ask about.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;4267  title;
4268  /* Step 5: Generate choropleth map */
4269  proc gmap map=merged_map_clean data=merged_map_clean all;
4270      id idname;
4271      choro study_count2 / levels=5
4272                          coutline=grayaa  /* gray borders for countries WITH studies */
4273                          missing
4274                          legend=legend1;
4275      format study_count2 studyfmt.;
4276     run;

WARNING: Some observations were discarded when charting study_count2.  Only first matching
         observation was used.  Use STATISTIC= option for summary statistics.
WARNING: Some observations were discarded when charting study_count2.  Only first matching
         observation was used.  Use STATISTIC= option for summary statistics.
NOTE: Foreground color WHITE same as background. Part of your graph might not be visible.
NOTE: 47729 bytes written to C:\Users\XXXXXXXXXXXXX\gmap30.png.
WARNING: The specified value of 16.5833 inches for HSIZE= is larger than 16.0000 inches which
         is the maximum for the device WIN. HSIZE is ignored.
WARNING: The specified value of 8.7188 inches for VSIZE= is larger than 8.3958 inches which is
         the maximum for the device WIN. VSIZE is ignored.
4277  quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Would the first set of warnings refer to the multiple rows for each country from the&amp;nbsp;mapsgfk.world map I merged with? That code is here:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=mapsgfk.world out=map_sorted; by idname; run;&lt;BR /&gt;&lt;BR /&gt;data merged_map_clean;
    merge map_sorted(in=a) country_fixed(in=b);
    by idname;
    if a;  /* Keep all countries from map */
    
    /* Exclude Antarctica */
    if upcase(idname) = "ANTARCTICA" then delete;

    /* Create categorized study count variable */
    if missing(study_count) then study_count2 = 0;
    else if study_count = 1 then study_count2 = 1;
    else if 1 &amp;lt; study_count &amp;lt;= 5 then study_count2 = 2;
    else if 5 &amp;lt; study_count &amp;lt;= 10 then study_count2 = 3;
    else if 10 &amp;lt; study_count then study_count2 = 4;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Where are the size warnings coming from? I haven't set a size anywhere and can't figure how, or if I need to change.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I've attached the countries and study counts I used to populate my image in this test run.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2025 00:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/972079#M25601</guid>
      <dc:creator>sasgorilla</dc:creator>
      <dc:date>2025-08-05T00:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc gmap questions</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/972084#M25603</link>
      <description>&lt;P&gt;Anwser to question 1:&lt;/P&gt;
&lt;P&gt;The warning message comes from the statistic= option:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DL&gt;
&lt;DT&gt;&lt;SPAN class="strong"&gt;STATISTIC=FIRST | SUM | FREQUENCY | MEAN&lt;/SPAN&gt;&lt;/DT&gt;
&lt;DD&gt;
&lt;P&gt;specifies the statistic for GMAP to chart. For character variables, FREQUENCY is the only allowed value--any other value is changed to FREQUENCY and a warning is issued. The frequency of a variable does not include missing values unless the MISSING option is specified.&lt;/P&gt;
&lt;TABLE class="largeSpace" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR align="left" valign="top"&gt;
&lt;TD&gt;FIRST&lt;/TD&gt;
&lt;TD align="left"&gt;
&lt;P&gt;GMAP matches the first observation from the DATA= data set and charts the response value from this observation only. This is the default. If more rows exist that are not processed, a warning is issued to the log.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR align="left" valign="top"&gt;
&lt;TD&gt;SUM&lt;/TD&gt;
&lt;TD align="left"&gt;
&lt;P&gt;All observations matching a given ID value are added together and the summed value is charted.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR align="left" valign="top"&gt;
&lt;TD&gt;FREQUENCY&lt;/TD&gt;
&lt;TD align="left"&gt;
&lt;P&gt;A count of all rows with nonmissing values is charted unless you specify the MISSING option.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR align="left" valign="top"&gt;
&lt;TD&gt;MEAN&lt;/TD&gt;
&lt;TD align="left"&gt;
&lt;P&gt;All observations matching a given ID value are added together and then divided by the number of non-missing observations matched. This value is then charted unless you specify the MISSING option.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DD&gt;
&lt;/DL&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DL&gt;
&lt;DD&gt;
&lt;P&gt;By adding statistic=first to choro statement, the warning message is gone.&lt;/P&gt;
&lt;/DD&gt;
&lt;/DL&gt;</description>
      <pubDate>Tue, 05 Aug 2025 02:26:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/972084#M25603</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2025-08-05T02:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Proc gmap questions</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/972086#M25604</link>
      <description>&lt;P&gt;You want this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data world(index=(idx=(id Segment)));
set mapsgfk.world(where=(CONT ne 97)); *Get rid of Antarctica Continent;
if ID='US' then group=4;  *USA;
 else if ID='CA' then group=3;  *Canada;
  else if ID='BR' then group=2;  *Brazil;
   else if ID='AU' then group=1;  *Australia;
     else if ID=:'CN' then group=1;  *China;
	  else if ID='GB' then group=3; *United Kindom;
	   else if ID='DE' then group=4; *Germany;
	    else group=0; *Others;
run;
data world2;
   set world;
   by id Segment;
   if first.Segment then PolyID+1;    /* create ID variable for polygons */
run;
proc sort data=world2;
by group;
run;
proc format;
value fmt
0='0 studies'
1='1 studies'
2='2-5 studies'
3='6-10 studies'
4='&amp;gt;10 studies'
;
run;

ods graphics/width=1000px height=600px;
proc sgplot data=world2 noborder /*aspect=0.5 */ ;
 styleattrs datacolors=(white CXBDD7E7 CX6BAED6 CX3182BD CX08519C);
   polygon x=x y=y ID=PolyID / fill outline group=group lineattrs=(color=grayaa)  ;
   xaxis display=none offsetmin=0 offsetmax=0;
   yaxis display=none offsetmin=0 offsetmax=0 ;
   keylegend / position=bottom location=outside noborder title='Study Count' ;
   format group fmt.;
run;


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1754366276146.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/108795iCDD7A05CE6966971/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1754366276146.png" alt="Ksharp_0-1754366276146.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2025 03:58:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/972086#M25604</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-08-05T03:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc gmap questions</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/972300#M25611</link>
      <description>&lt;P&gt;Thank you for the recommendation,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I lost some of my country data when I tried with your code for some reason.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2025 22:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/972300#M25611</guid>
      <dc:creator>sasgorilla</dc:creator>
      <dc:date>2025-08-07T22:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc gmap questions</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/986556#M25893</link>
      <description>&lt;P&gt;Typically, you would not want to merge your data with the map dataset.&lt;/P&gt;
&lt;P&gt;I would recommend merging it with mapsgfk.world_attr (which contains 1 observation per country) instead.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2026 15:18:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-gmap-questions/m-p/986556#M25893</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2026-04-20T15:18:41Z</dc:date>
    </item>
  </channel>
</rss>

