Hi,
I am using SAS 9.4 through my university's portal system, Apporto.
Hello!
I would like to make a map of the world indicating where all the participants in my study were born. I stumbled upon the proc GMAP procedure, but I am a bit confused on how to use it. I tried the following code but it didn't work. The following error message appeared:
PROC GMAP MAP=merged
DATA=merged;
ID W_d_country;
CHORO w_D_country;
RUN;
Thank you in advance for your help!
Hi, you posted this in the SAS Visual Analytics forum - can you quickly confirm what SAS environment you use? If you do use SAS Visual Analytics then creating geographical maps is just a matter of loading data in your environment and drag one of the geo objects (e.g. Geo Region) to the report canvas and assign roles. If you do use a programming environment - we may have to move this discussion to the appropriate forum.
Thank you! Falko
Thank you. I have moved your question to the Graphics Programming forum - I'm sure folks here can better help you with using PROC's in order to create geo maps.
I think you would find this easier to create using PROC SGMAP instead of PROC GMAP. To create your example, I would probably overlay a SCATTER plot on an OPENSTREETMAP. The code would look something like the following:
proc sgmap plotdata=birth;
openstreetmap;
scatter x=lat y=lomg;
run;
Hope this helps!
Dan
Do you want to plot markers on the exact lat/long where they were born, or do you want to color the countries where they were born?
Are there any other specific things you'd like to do in the map?
Hi!
I would like to color the countries of birth. I would like to make a map like this one, except without dots on the map.
Here's a similar example I created, using Proc Gmap:
http://robslink.com/SAS/democd99/visa_overstay.htm
And here is the SAS code (there are several different ways you can control the color, using numeric or character data):
https://robslink.com/SAS/democd99/visa_overstay.sas
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.