Chapter Contents

Previous

Next
The GMAP Procedure

Example 4: Producing a Simple Choropleth Map


Procedure features:
ID statement
CHORO statement option:
COUTLINE=
Data set: REFLIB.SITES
Sample library member: GR19N04

[IMAGE]

This example produces a choropleth (2D) map that shows the total number of hazardous waste sites in each state in 1997. 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 and then calculates the appropriate response levels. The legend shows the midpoint value of each level.

The map areas use the default pattern, which is a solid fill that rotates through the colors list. Because the colors list is specified in the GOPTIONS statement, all colors are used in the rotation. COUTLINE= outlines the map areas in gray, instead of the default outline color, which is the first color in the list, in this case, BLUE.
 Note about code
libname reflib 'SAS-data-library';
libname maps 'SAS-data-library';
goptions reset=global gunit=pct border cback=white
         colors=(blue green lime lipk cyan red)
         ctext=black ftext=swiss htitle=6 htext=3;
 Note about code
title1 'Hazardous Waste Site Installations (1997)';
footnote1 j=r 'GR19N04 ';
 Note about code
proc gmap map=maps.us data=reflib.sites;
   id state;
   choro sites / coutline=gray;
run;
quit;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.