<?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: Puerto Rico state-level map in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Puerto-Rico-state-level-map/m-p/672951#M20320</link>
    <description>I knew it was something simple.  Thanks!</description>
    <pubDate>Tue, 28 Jul 2020 18:41:45 GMT</pubDate>
    <dc:creator>RandoDando</dc:creator>
    <dc:date>2020-07-28T18:41:45Z</dc:date>
    <item>
      <title>Puerto Rico state-level map</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Puerto-Rico-state-level-map/m-p/672823#M20313</link>
      <description>&lt;P&gt;I am trying to create a "state-level" map for Puerto Rico using a choro variable in another data set containing values for each state.&amp;nbsp; GMAP isn't outputting a very good map.&amp;nbsp; I get a warning that some observations were discarded when charting score.&amp;nbsp; I've run frequencies on score and state and nothing had any missing values.&amp;nbsp; No records were omitted when matched with the outside data set to get the score.&amp;nbsp; Not sure what's going on here.&amp;nbsp; &amp;nbsp;I am using the US_ALL set which is county level but the only one with Puerto Rico.&amp;nbsp; I used GREMOVE to remove the county boundaries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Surely it's something simple...&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data PR_map; set MAPSGFK.US_ALL (where=(statecode='PR' ) ) ;
run;


PROC GREMOVE DATA = PR_MAP
OUT = PR_MAP_S;
ID county;
BY state; 
run;

proc sql;
create table  PR_map1 as select a.*, b.score  
from PR_map_s a 
inner join
SCORE_STATE b on a.state = (b.fips/1000);
quit;

proc gproject data=PR_map1 out=PR_MAPf latlong eastlong degrees dupok  ;
id statecode;
run;



goptions reset=all;
pattern1 value=m3N45 color=black;
pattern2 value=msolid color=BILG;
pattern3 value=msolid color=gold;
pattern4 value=msolid color=orange;
pattern5 value=msolid color=VIYPK;
title 'Puerto Rico';


proc gmap data=PR_mapf map=PR_mapf;
id statecode;
choro score / nolegend  midpoints=(0 1 2 3 4 ) 
 des='' name='PRMAP' ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jul 2020 13:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Puerto-Rico-state-level-map/m-p/672823#M20313</guid>
      <dc:creator>RandoDando</dc:creator>
      <dc:date>2020-07-28T13:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Puerto Rico state-level map</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Puerto-Rico-state-level-map/m-p/672948#M20318</link>
      <description>&lt;P&gt;In your Proc Gremove, you're using "id county" ... but in the Puerto Rico map, it has a county level, but also goes one level below county. In all our SAS maps, we set the variable 'id' to be the lowest level, therefore you can use "id id" (rather than "id county") to make sure gremove knows what the lowest level of granularity is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's your code, modified to rid of all the internal boundaries in Puerto Rico:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data PR_map; set MAPSGFK.US_ALL (where=(statecode='PR' ) ) ;&lt;BR /&gt;run;&lt;BR /&gt;PROC GREMOVE DATA=PR_MAP OUT=PR_MAP_S;&lt;BR /&gt;ID id;&lt;BR /&gt;BY statecode; &lt;BR /&gt;run;&lt;BR /&gt;proc gmap data=pr_map_s map=pr_map_s;&lt;BR /&gt;id statecode;&lt;BR /&gt;choro segment / levels=1 nolegend;&lt;BR /&gt;run;&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="pr.png" style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47750iB5A95F9FB84BA2DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pr.png" alt="pr.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 18:34:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Puerto-Rico-state-level-map/m-p/672948#M20318</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2020-07-28T18:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Puerto Rico state-level map</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Puerto-Rico-state-level-map/m-p/672951#M20320</link>
      <description>I knew it was something simple.  Thanks!</description>
      <pubDate>Tue, 28 Jul 2020 18:41:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Puerto-Rico-state-level-map/m-p/672951#M20320</guid>
      <dc:creator>RandoDando</dc:creator>
      <dc:date>2020-07-28T18:41:45Z</dc:date>
    </item>
  </channel>
</rss>

