Previous Page | Next Page

The GREDUCE Procedure

Example 1: Reducing the Map of Canada


Procedure features:

ID statement

Sample library member: GRDCANAD

[Map of Canada]

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.

[Map of Canada After Using GREDUCE procedure]

 Note about code
goptions reset=all border;
 Note about code
title1 "Canada";
title2 "Using all DENSITY values";
footnote j=r "GRDCANAD(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=can2;
   id province;
run;
 Note about code
title2 h=4 "Using only DENSITY values 0 to 2";
footnote2 j=r "GRDCANAD(b) ";
 Note about code
proc gmap map=can2
          data=can2 all density=2;
   id province;
   choro province / nolegend;
run;
quit;

Previous Page | Next Page | Top of Page