Sample 25587: Reduce the map of Canada using PROC GREDUCE
In this example, the GREDUCE procedure creates the DENSITY variable for the CANADA2 map data set that is provided with SAS/GRAPH. The first map is produced at its original density using the GMAP procedure. The second map is created by using DENSITY values of 0 to 2.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
In this example, the GREDUCE procedure creates the DENSITY variable for the CANADA2 map data set that is provided with SAS/GRAPH. The first map is produced at its original density using the GMAP procedure. The second map is created by using DENSITY values of 0 to 2.
The graphics output in the Results tab was produced using SAS® 9.2. Submitting the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Define the libref of MAPS if necessary */
*libname maps 'SAS-MAPS-library';
/* Set the graphics environment */
goptions reset=all border cback=white htitle=13pt;
/* Define the titles and footnotes for the first map */
title1 'Canada';
title2 h=11pt 'Using all DENSITY values';
footnote1 h=10pt 'Using the MAPS.CANADA2 Data Set';
footnote2 ' ';
/* Define pattern characteristics */
pattern value=mempty repeat=12 color=blue;
/* Create the unreduced map */
proc gmap map=maps.canada2 data=maps.canada2 all;
id province;
choro province / nolegend;
run;
/* Create the map data set CAN2 using */
/* the GREDUCE procedure */
proc greduce data=maps.canada2 out=can2;
id province;
run;
/* Define a new title for the second map */
title2 h=11pt 'Using only DENSITY values 0 to 2';
/* Show reduced map with density levels 0-2 */
proc gmap map=can2(where=(density<3)) data=can2 all;
id province;
choro province / nolegend;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
In this example, the GREDUCE procedure creates the DENSITY variable for the CANADA2 map data set that is provided with SAS/GRAPH. The first map is produced at its original density using the GMAP procedure. The second map is created by using DENSITY values of 0 to 2.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GMAP Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Maps ==> Reducing
|
Date Modified: | 2005-09-22 03:03:12 |
Date Created: | 2005-05-23 14:17:20 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9 TS M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9 TS M0 | |
Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
Microsoft Windows 2000 Server | 9 TS M0 | |
Microsoft Windows 2000 Professional | 9 TS M0 | |
Microsoft Windows NT Workstation | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
Microsoft Windows XP Professional | 9 TS M0 | |
64-bit Enabled AIX | 9 TS M0 | |
64-bit Enabled HP-UX | 9 TS M0 | |
64-bit Enabled Solaris | 9 TS M0 | |
HP-UX IPF | 9 TS M0 | |
Linux | 9 TS M0 | |
OpenVMS Alpha | 9 TS M0 | |
Tru64 UNIX | 9 TS M0 | |