Previous Page | Next Page

The GMAP Procedure

Example 3: Assigning a Format to the Response Variable


Procedure features:

BLOCK statement options:

LEGEND=

RELZERO

AREA statement options:

MIDPOINTS=

Other features:

FORMAT statement

LEGEND statement

Sample library member: GMPFORMT

[Assigning Format to the Response Variables]

This example creates formats for the response variables. The format for the POP variable defines and labels ranges of values. These ranges appear in the legend and make the map easier to understand.

The example also uses the AREA statement to patterns the map areas by region.

 Note about code
goptions reset=all border;
 Note about code
proc format;
  value popfmt low-1000000="0-1"
               1000001-10000000="1-10"
               10000001-100000000="10-100"
               100000001-500000000="100-500"
               500000001-high="over 500";
run;
 Note about code
proc format;
  value $ regionfmt "SEAR" = "South-East Asia"
                    "EUR" = "Europe"
                    "EMR" = "Eastern Mediterranean"
                    "WPR" = "Western Pacific";
run;
 Note about code
title1 "Population Data for Asia (2005)";
footnote j=r "GMPFORMT";
 Note about code
legend1 label=("Population (Millions)");
 Note about code
proc gmap data=sashelp.demographics(where=(cont=95))
          map=maps.asia all;
   format pop popfmt.;
   format region $regionfmt.;
   id id;
   area region / midpoints="SEAR" "EUR" "EMR" "WPR";
   block pop / levels=all
               legend=legend1
               relzero;
run;
quit;

Previous Page | Next Page | Top of Page