Chapter Contents |
Previous |
Next |
The GMAP Procedure |
Procedure features: |
| |||||||||
Other features: |
| |||||||||
Data set: | REFLIB.SITES | |||||||||
Sample library member: | GR19N03 |
The example also patterns the map areas by region. To do this, both data sets must contain the ID variable, REGION. The response data set, REFLIB.SITES, already contains REGION, so the program only needs to add it to the map data set. Then the map data set is sorted by both the ID variables, REGION and STATE. Finally, the AREA= option specifies that the ID variable REGION is the one by which the map areas are patterned.
libname reflib 'SAS-data-library'; libname maps 'SAS-data-library'; goptions reset=global gunit=pct border cback=white colors=(black blue green red) ftext=swiss htitle=6 htext=3; |
proc sort data=reflib.states1 out=reflib.states2; by region state; run; |
proc format; value sitesfmt low-24='0-24' 25-49='25-49' 50-74='50-74' 75-99='75-99' 100-high='over 100'; run; |
title1 'Hazardous Waste Site Installations (1997)'; footnote j=r 'GR19N03 '; |
pattern1 value=m3n0 r=3; |
pattern2 value=solid color=green; pattern3 value=solid color=cyan; pattern4 value=solid color=lime; pattern5 value=solid color=blue; pattern6 value=solid color=red; |
legend1 shape=bar(2,4) across=5 value=(j=l) label=('Number' j=l 'of Sites:') frame; |
proc gmap map=reflib.states2 data=reflib.sites; format sites sitesfmt.; id region state; block sites / discrete area=1 legend=legend1 shape=block cblkout=black coutline=black; run; quit; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.