GMAP Procedure

Example 18: Using Traditional Map Data to Produce a Simple Surface Map

Features:

MAP= required argument referring to traditional map data

DATA= required argument referring to response data

ID statement

SURFACE statement

Data sets: MAPS.EUROPE (map data)

SASHELP.DEMOGRAPHICS (response data)

Sample library member: GMPSURFA
This example produces a surface map that shows the annual population growth rate of countries in Europe. Not all the countries that are represented in the traditional map data set have demographic data in the response data set. The CONSTANT= and NLINES= options are not used. Therefore, the GMAP procedure draws a surface that consists of 50 lines and uses the default decay function to calculate spike height and base width. And because the ROTATE= and TILT= options are not used, the map is rotated 70 degrees around the Z axis and tilted 70 degrees with respect to the X axis.
Producing a Simple Surface Map with Traditional Map Data

Program

goptions reset=all border;
title1 "Population Annual Growth Rate Percentage";
title2 "Europe (1995-2005)";
proc gmap map=maps.europe data=sashelp.demographics;
   id id;
   surface popagr;
run;
quit;

Program Description

Set the graphics environment.
goptions reset=all border;
Define the title for the map.
title1 "Population Annual Growth Rate Percentage";
title2 "Europe (1995-2005)";
Produce the surface map. The ID statement specifies the variable in the map data set and the response data set that defines the map areas.
proc gmap map=maps.europe data=sashelp.demographics;
   id id;
   surface popagr;
run;
quit;