GMAP Procedure

Example 4: Using Traditional Map Data to Specify Response Levels in a Block Map

Features:

MAP= required argument referring to traditional map data

DATA= required argument referring to response data

ID statement

BLOCK statement options:
LEVELS=
SHAPE=
RELZERO
CEMPTY=
Data sets: MAPS.SAMERICA (map data)

SASHELP.DEMOGRAPHICS (response data)

Sample library member: GMPLEVEL
This example uses the LEVELS= option to specify the number of response levels for the blocks. The LEVELS= option tells GMAP how many response levels and the GMAP procedure calculates the quantiles.
Response Levels in Block Map With Traditional Map Data

Program

goptions reset=all border;
title1 "Gross National Income per Capita";
title2 "South America";
proc gmap data=sashelp.demographics(where=(cont=92))
          map=maps.samerica all;
   id id;
   block gni / levels=3 shape=prism
               relzero cempty=gray;
run;
quit;

Program Description

Set the graphics environment.
goptions reset=all border;
Define the title and footnote for the map.
title1 "Gross National Income per Capita";
title2 "South America";
Produce the block map, which includes the Caribbean islands. The ALL argument specifies that the output should include all of the map areas from the map data set, even if the response data set SASHELP.DEMOGRAPHICS does not include an observation for the map area. The LEVELS= option specifies the number of response levels for the graph. The SHAPE= option draws the blocks as prisms. The RELZERO option specifies that the block values are relative to zero. The CEMPTY= option specifies the outline color for map areas that have missing data.
proc gmap data=sashelp.demographics(where=(cont=92))
          map=maps.samerica all;
   id id;
   block gni / levels=3 shape=prism
               relzero cempty=gray;
run;
quit;