BookmarkSubscribeRSS Feed
CarolineDP
Calcite | Level 5

I'm trying to learn how to use gmap.

Even with a common example using a predefined sas map, I don't see any result and I don't get any error message in the log.

I was trying:

 

proc gmap
map=maps.us
data=maps.us (obs=1)
all;
id state;
choro state / nolegend;
run;

1 REPLY 1
ballardw
Super User

1) it often helps to paste the LOG with any messages

2) Proc Gmap supports run group processing so you want to make sure to end with a QUIT statement so the proc stops.

3) What ods destination was open and what ods style is active?

 

I can run your code and get a US map with Alabama as the only state with color other than background.

The log result:

NOTE: Writing HTML Body file: sashtml1.htm
10   map=maps.us
11   data=maps.us (obs=1)
12   all;
13   id state;
14   choro state / nolegend;
15   run;

NOTE: 77983 bytes written to C:\Users\ballarde\OneDrive -
      IDHW\Data\WORK\SASTemp\_TD6704_CWPP0173_\gmap1.png.
16   quit;

The bits in green show where the results were sent. If you don't have these then look for a "no ods destinations active" note. Or verify that your ODS destination will accept graphics, not all do.

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 994 views
  • 0 likes
  • 2 in conversation