<?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: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928578#M365354</link>
    <description>&lt;P&gt;thanks all. OK, I *think* I did this correctly:&lt;/P&gt;&lt;P&gt;data WORK.GEOCODEDZIPS(label='Geocoded 15May2024');&lt;BR /&gt;infile datalines dsd truncover;&lt;BR /&gt;input Y:32. X:32. M_OBS:32. _MATCHED_:$16. anno_flag:32. state:32. c:32. zip:32.;&lt;BR /&gt;label Y="Geocoded Latitude" X="Geocoded Longitude";&lt;BR /&gt;datalines;&lt;BR /&gt;38.928422641 -92.36843533 . ZIP mean 1 29 1 65203&lt;BR /&gt;38.948231 -92.327335 11274177 ZIP 1 29 2 65211&lt;BR /&gt;38.933052625 -92.29140936 . ZIP mean 1 29 3 65201&lt;BR /&gt;;;;;&lt;/P&gt;&lt;P&gt;or, alternatively, if you want to see the proc print. I notice it's got X and Y, but not longitude and latitude. :&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Obs Y X M_OBS _MATCHED_ anno_flag state c zip123 &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;38.9284&lt;/TD&gt;&lt;TD&gt;-92.3684&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;ZIP mean&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;29&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;65203&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;38.9482&lt;/TD&gt;&lt;TD&gt;-92.3273&lt;/TD&gt;&lt;TD&gt;11274177&lt;/TD&gt;&lt;TD&gt;ZIP&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;29&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;65211&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;38.9331&lt;/TD&gt;&lt;TD&gt;-92.2914&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;ZIP mean&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;29&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;65201&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class="lia-align-left"&gt;the Gmap call is:&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;proc gproject data=mocounties out=MOCountiesp latlong eastlong degree; id state ; run;&lt;/P&gt;&lt;P class="lia-align-left"&gt;so maybe it's confused given that geocode didn't produce longitude and latitude.&lt;/P&gt;&lt;P class="lia-align-left"&gt;rerunning the proc gproject removing with latlong option, however, doesn't fix the problem. thanks for all the help! Phil&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 16 May 2024 01:31:51 GMT</pubDate>
    <dc:creator>PhilWood</dc:creator>
    <dc:date>2024-05-16T01:31:51Z</dc:date>
    <item>
      <title>Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928545#M365327</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have successfully created an annotated state map from geocoded address info using the states map. However, when I try to use the county map data set, it appears that the geocoding output does not match&amp;nbsp; what information in the county map dataset. Here is a small program to illustrate the difficulty. Code doesn't get past proc gproject. It seems that the length of x and y of the map do not match the length of x and y in the geocoded output. thanks! Phil&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;libname lookup "D:\Documents\desi2023\frlanalyses\geocodedata__2006__ZIP4_Geocode_Data\data";&lt;BR /&gt;data zips;&lt;BR /&gt;input c zip;&lt;/P&gt;&lt;P&gt;anno_flag=1l&lt;BR /&gt;cards;&lt;BR /&gt;1 65203&lt;BR /&gt;2 65211&lt;BR /&gt;3 65201&lt;BR /&gt;;&lt;BR /&gt;proc geocode /* Invoke geocoding procedure */&lt;BR /&gt;method=plus4 /* Specify geocoding method */&lt;BR /&gt;lookup=lookup.zip4 /* Lookup data from MapsOnline */&lt;BR /&gt;data=zips /* Input data set to geocode */&lt;BR /&gt;out=geocodedzips; /* Specify name of Output data set of locations */&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data mocounties;set maps.counties;if state=29;&lt;/P&gt;&lt;P&gt;data mocounties;set mocounties geocodedzips;run;&lt;BR /&gt;proc gproject data=mocounties out=MOCountiesP; id state ; run;&lt;/P&gt;&lt;P&gt;data my_map locations; set mocountiesP;&lt;BR /&gt;if anno_flag=1 then output locations;&lt;BR /&gt;else output my_map;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data anno_locations; set locations;&lt;BR /&gt;if c=1 then color="red";&lt;BR /&gt;if c=2 then color="bib";&lt;BR /&gt;if c=3 then color="viyg";&lt;BR /&gt;if c=4 then color="bippk";&lt;BR /&gt;xsys='2'; ysys='2'; hsys='3'; when='a';&lt;BR /&gt;function='pie'; rotate=360; size=.5;&lt;BR /&gt;style='psolid'; output;&lt;BR /&gt;length html $300;&lt;BR /&gt;html='title='||quote(trim(left(citystate))||'0d'x||trim(left(put(zip,z5.))));&lt;BR /&gt;style='pempty'; color='deb'; output;&lt;BR /&gt;run;&lt;BR /&gt;pattern1 v=e;&lt;/P&gt;&lt;P&gt;proc gmap data=mymap map=mymap anno=anno_locations;&lt;BR /&gt;id county;&lt;BR /&gt;choro segment / coutline=black levels=1 nolegend&lt;BR /&gt;coutline=gray99;run;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 19:35:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928545#M365327</guid>
      <dc:creator>PhilWood</dc:creator>
      <dc:date>2024-05-15T19:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928547#M365329</link>
      <description>&lt;P&gt;If your MAPS.COUNTIES data set is the on provided by SAS then there is no geographic information other than the projected boundary points provided by the X,Y variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have the MAPSGFK.US_COUNTIES data set that has Lat, Long variables likely to have a better shot for getting geocoded data to place correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 19:45:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928547#M365329</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-05-15T19:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928554#M365336</link>
      <description>&lt;P&gt;That's a great help! thanks! the only problem now is that Gproject only outputs one data point instead of the three geocoded zipcodes in the small data set. I.e.:&lt;/P&gt;&lt;P&gt;libname lookup "D:\Documents\desi2023\frlanalyses\geocodedata__2006__ZIP4_Geocode_Data\data";&lt;BR /&gt;data zips;&lt;BR /&gt;anno_flag=1;&lt;BR /&gt;state=29;&lt;BR /&gt;input c zip;&lt;BR /&gt;cards;&lt;BR /&gt;1 65203&lt;BR /&gt;2 65211&lt;BR /&gt;3 65201&lt;BR /&gt;;&lt;BR /&gt;proc geocode /* Invoke geocoding procedure */&lt;BR /&gt;method=plus4 /* Specify geocoding method */&lt;BR /&gt;lookup=lookup.zip4 /* Lookup data from MapsOnline */&lt;BR /&gt;data=zips /* Input data set to geocode */&lt;BR /&gt;out=geocodedzips; /* Specify name of Output data set of locations */&lt;BR /&gt;run;&lt;BR /&gt;proc contents data=MAPSGFK.US_COUNTIES;run;&lt;BR /&gt;data mocounties;set MAPSGFK.US_COUNTIES;if statecode="MO";run;&lt;BR /&gt;data mocounties;set mocounties geocodedzips;run;&lt;BR /&gt;proc means data=mocounties;var state;run;&lt;BR /&gt;proc gproject data=mocounties out=MOCountiesp latlong eastlong degree; id state ; run;&lt;BR /&gt;data my_map locations; set MOCountiesp;&lt;BR /&gt;if anno_flag=1 then output locations;&lt;BR /&gt;else output my_map;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;NOTE: There were 11766 observations read from the data set WORK.MOCOUNTIESP.&lt;BR /&gt;NOTE: The data set WORK.MY_MAP has 11765 observations and 18 variables.&lt;BR /&gt;NOTE: The data set WORK.LOCATIONS has 1 observations and 18 variables.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 21:06:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928554#M365336</guid>
      <dc:creator>PhilWood</dc:creator>
      <dc:date>2024-05-15T21:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928571#M365350</link>
      <description>&lt;P&gt;Can you provide the result of your GeocodedZips data set from Proc Geocode in the form of a working data step? We don't have your lookup data set to see what the result might be.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against. Note that the code box is important as the main message window will reformat pasted text and can result in code that won't run properly.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 22:55:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928571#M365350</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-05-15T22:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928578#M365354</link>
      <description>&lt;P&gt;thanks all. OK, I *think* I did this correctly:&lt;/P&gt;&lt;P&gt;data WORK.GEOCODEDZIPS(label='Geocoded 15May2024');&lt;BR /&gt;infile datalines dsd truncover;&lt;BR /&gt;input Y:32. X:32. M_OBS:32. _MATCHED_:$16. anno_flag:32. state:32. c:32. zip:32.;&lt;BR /&gt;label Y="Geocoded Latitude" X="Geocoded Longitude";&lt;BR /&gt;datalines;&lt;BR /&gt;38.928422641 -92.36843533 . ZIP mean 1 29 1 65203&lt;BR /&gt;38.948231 -92.327335 11274177 ZIP 1 29 2 65211&lt;BR /&gt;38.933052625 -92.29140936 . ZIP mean 1 29 3 65201&lt;BR /&gt;;;;;&lt;/P&gt;&lt;P&gt;or, alternatively, if you want to see the proc print. I notice it's got X and Y, but not longitude and latitude. :&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Obs Y X M_OBS _MATCHED_ anno_flag state c zip123 &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;38.9284&lt;/TD&gt;&lt;TD&gt;-92.3684&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;ZIP mean&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;29&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;65203&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;38.9482&lt;/TD&gt;&lt;TD&gt;-92.3273&lt;/TD&gt;&lt;TD&gt;11274177&lt;/TD&gt;&lt;TD&gt;ZIP&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;29&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;65211&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;38.9331&lt;/TD&gt;&lt;TD&gt;-92.2914&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;ZIP mean&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;29&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;65201&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class="lia-align-left"&gt;the Gmap call is:&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;proc gproject data=mocounties out=MOCountiesp latlong eastlong degree; id state ; run;&lt;/P&gt;&lt;P class="lia-align-left"&gt;so maybe it's confused given that geocode didn't produce longitude and latitude.&lt;/P&gt;&lt;P class="lia-align-left"&gt;rerunning the proc gproject removing with latlong option, however, doesn't fix the problem. thanks for all the help! Phil&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 May 2024 01:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928578#M365354</guid>
      <dc:creator>PhilWood</dc:creator>
      <dc:date>2024-05-16T01:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928583#M365356</link>
      <description>&lt;P&gt;Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;&amp;nbsp; (Robert.Allision)&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 01:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928583#M365356</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-05-16T01:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928585#M365357</link>
      <description>&lt;P&gt;I would suggest renaming the variables to match the lat and long in the map data set.&lt;/P&gt;
&lt;P&gt;BEFORE combining with the data and doing the projection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the selected county data a check on the sign of the long, may need to insure that matches with the values in your map set.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 01:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928585#M365357</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-05-16T01:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928731#M365435</link>
      <description>&lt;P&gt;I did that- same result, alas- thanks for responding, though!&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 19:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928731#M365435</guid>
      <dc:creator>PhilWood</dc:creator>
      <dc:date>2024-05-16T19:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928754#M365444</link>
      <description>&lt;P&gt;I had to seriously modify the starting geocode data set because you didn't paste it into a text box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This creates a map with those 3 ZIP codes appearing.&lt;/P&gt;
&lt;P&gt;Note that some differences are because the MY_MAP created with the geocoded data is different name than the MYMAP from your first posted code.&lt;/P&gt;
&lt;PRE&gt;data WORK.GEOCODEDZIPS(label='Geocoded 15May2024');
   infile datalines dlm=',' dsd  truncover;
   length y x M_OBS 8 _matched_ $ 16 anno_flag 8 state 5 ;
   input Y X M_OBS  _MATCHED_:$16. 
         anno_flag state c zip:5.;
   label Y="Geocoded Latitude" 
         X="Geocoded Longitude"
   ;
datalines;
38.928422641,-92.36843533,.,ZIP mean,1,29,1,65203
38.948231,-92.327335,11274177,ZIP,1,29,2,65211
38.933052625,-92.29140936,.,ZIP mean,1,29,3,65201
;

data mocounties;
   set MAPSGFK.US_COUNTIES;
   if statecode="MO";
run;
data mocounties2;
   set mocounties 
   work.geocodedzips (rename=(x=long y=lat));
run;

proc gproject data=mocounties2 out=MOCountiesp latlong eastlong degree; 
   id state ; 
run;
data my_map locations; set MOCountiesp;
   if anno_flag=1 then output locations;
   else output my_map;
run;

data anno_locations; 
   set locations;
   if c=1 then color="red";
   if c=2 then color="bib";
   if c=3 then color="viyg";
   if c=4 then color="bippk";
   xsys='2'; ysys='2'; hsys='3'; when='a';
   function='pie'; rotate=360; size=.5;
   style='psolid'; &lt;BR /&gt;   output;
   length html $300;
   html='title='||'0d'x||put(zip,z5. -L);
   style='pempty'; 
   color='deb'; &lt;BR /&gt;   output;
run;

proc gmap data=my_map map=my_map anno=anno_locations;
   id county;
   choro segment / coutline=black levels=1 nolegend
   coutline=gray99;
run;
quit;
&lt;/PRE&gt;
&lt;P&gt;Personally for the example Zip codes I would have used some from different counties. The scale of statewide map is such that it may be impossible to see one or more zip code centers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your prior code for annotate data set couldn't quite be applied as there wasn't anything adding in the city variable to use in the title.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 21:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928754#M365444</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-05-16T21:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928772#M365453</link>
      <description>&lt;P&gt;thanks so much! the actual data set I'm using is much larger, but I wanted to just give a small example of the code for problem solving. This works fine! Phil&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 22:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/928772#M365453</guid>
      <dc:creator>PhilWood</dc:creator>
      <dc:date>2024-05-16T22:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties getting Proc Gmap to produce annotated graph with Proc Geocode and county level map</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/933332#M367070</link>
      <description>&lt;P&gt;Here's how to do it without combining/projecting/separating the map &amp;amp; data, by using the somewhat new feature of saving the projection parameters for the map and then applying them to the annotate dataset:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data zips;
input c zip;
cards;
1 65203
2 65211
3 65201
;

proc geocode data=zips out=geocodedzips (rename=(x=long y=lat));
run;

data mocounties; set mapsgfk.us_counties (where=(statecode='MO'));
run;

proc gproject data=mocounties out=mocounties 
latlong eastlong degrees parmout=projparm;
id county;
run;

proc gproject data=geocodedzips out=geocodedzips
latlong eastlong degrees parmin=projparm parmentry=mocounties;
id;
run;

data anno_locations; set geocodedzips;
if c=1 then color="red";
if c=2 then color="bib";
if c=3 then color="viyg";
if c=4 then color="bippk";
xsys='2'; ysys='2'; hsys='3'; when='a';
function='pie'; rotate=360; size=.5;
style='psolid'; 
output;
length html $300;
html='title='||quote(trim(left(c))||'0d'x||trim(left(put(zip,z5.))));
style='pempty'; color='deb'; 
output;
run;

pattern1 v=e;

proc gmap map=mocounties data=mocounties anno=anno_locations;
id county;
choro segment / coutline=black levels=1 nolegend
coutline=gray99;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mo_map.png" style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97753iD80B44764B4876DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="mo_map.png" alt="mo_map.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 14:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difficulties-getting-Proc-Gmap-to-produce-annotated-graph-with/m-p/933332#M367070</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2024-06-21T14:44:38Z</dc:date>
    </item>
  </channel>
</rss>

