Chapter Contents

Previous

Next
The GREDUCE Procedure

Example 1: Reducing the Map of Canada


Procedure features:
ID statement
Other features:
PROC GMAP option:
WHERE=
Sample library member: GR24N01

[IMAGE]

In this example, the GREDUCE procedure creates the DENSITY variable for the CANADA2 map data set that is provided with SAS/GRAPH . First, the map is displayed at its original density by using the GMAP procedure. Second, the map is displayed by using density values of 0 to 2.

[IMAGE]

 Note about code
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;
 Note about code
title1 'Canada';
title2 h=4 'Using all DENSITY values';
footnote1 j=l '  From 
SAS/GRAPH
' '02'x
          ' Software CANADA2 Data Set';
footnote2 j=r 'GR24N01(a) ';
 Note about code
pattern value=mempty repeat=12 color=blue;
 Note about code
proc gmap map=maps.canada2 data=maps.canada2 all;
  id province;
  choro province / nolegend;
run;
 Note about code
proc greduce data=maps.canada2 out=reflib.can2;
   id province;
run;
 Note about code
title2 h=4 'Using only DENSITY values 0 to 2';
footnote2 j=r 'GR24N01(b) ';
 Note about code
proc gmap map=reflib.can2(where=(density<3))
          data=reflib.can2 all;
   id province;
   choro province / nolegend;
run;
quit;


Chapter Contents

Previous

Next

Top of Page

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