GMAP Procedure
Example 2: Using Traditional Map Data to Produce a Simple Block Map
Features: |
MAP= required argument referring to traditional map data
DATA= required argument referring to response data
ID statement
- BLOCK statement options:
- BLOCKSIZE=
- RELZERO
|
Data sets: |
MAPS.ASIA (map data)
SASHELP.DEMOGRAPHICS (response data)
|
Sample library member: |
GMPSIMPL |
This example produces
a block map that shows population of countries in Asia. Since the
DISCRETE option is not used, the response variable is assumed to have
a continuous range of values. Because neither the LEVELS= nor MIDPOINTS=
option is used, the GMAP procedure selects a number of levels based
on the number of map areas. It then calculates the appropriate response
levels.
Program
goptions reset=all border;
title1 "Population in Asia";
proc gmap data=sashelp.demographics(where=(cont=95))
map=maps.asia all;
id id;
block pop / blocksize=1 relzero;
run;
quit;
Program Description
Set the graphics environment.
goptions reset=all border;
Define the title for the map.
title1 "Population in Asia";
Produce the block map. 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 ID statement
specifies the variable that is in both the map data set and the response
data set and defines map areas. The BLOCK statement specifies the
variable in the response data set that contains the response values
for each of the map areas. The BLOCKSIZE= option specifies the width
of the blocks. The RELZERO option specifies that the block values
are relative to zero.
proc gmap data=sashelp.demographics(where=(cont=95))
map=maps.asia all;
id id;
block pop / blocksize=1 relzero;
run;
quit;
Copyright © SAS Institute Inc. All rights reserved.