Previous Page | Next Page

The GMAP Procedure

PROC GMAP Statement


Identifies the map data set and the response data set that contain the variables associated with the map. If the response data set and the feature table have been merged, the statement's DATA= option identifies the merged data set. The statement also provides the option to display all map areas and to specify annotation and an output catalog.
Requirements: Both a map data set and a response data set are required. This can include a traditional map data set and response data set or a merged response data set and feature table.

PROC GMAP <MAP=map-data-set>
DATA=response-data-set | feature-table
<ALL>
<ANNOTATE=Annotate-data-set>
<DENSITY=0...6 | LOW | MEDIUM | HIGH>
<GOUT=<libref.>output-catalog>
<IMAGEMAP=output-data-set>
<STRETCH>
<UNIFORM>;

Required Argument

DATA=response-data-set | feature-table

identifies the SAS data set that contains the response values or the response values and the spatial information that are evaluated and represented on the map. If a response data set is specified, it must contain the same identification variable or variables as the map data set, along with the values of the response variable. If a feature table is specified, it must contain response data information and spatial geometry information. By default, the GMAP procedure uses the most recently created SAS data set.

See Also: Concepts, SAS Data Sets, and About Feature Tables.

Options

PROC GMAP statement options affect all of the graphs that are produced by the procedure.

ALL

specifies that the maps generated by the procedure should include all of the map areas from the map data set, even if the response data set does not include an observation for the map area.

When you use the ALL option and a BY statement in a RUN group, the maps generated for each BY group include every map area from the map data set.

See also: Displaying Map Areas and Response Data.
ANNOTATE=Annotate-data-set

specifies a data set to annotate all of the maps that are produced by the GMAP procedure. To annotate individual maps, use the ANNOTATE= option in the action statement.

Alias: ANNO=
See also: Using Annotate Data Sets
DENSITY=0...6 | LOW | MEDIUM | HIGH

for maps that have a DENSITY variable, specifies the density of map observations that are used. The value that you specify indicates the maximum value that the DENSITY variable can have for the observation to be displayed. For example, if you specify DENSITY=5, then only observations in the map data set whose DENSITY value is less than or equal to 5 are displayed.

Intuitively, the DENSITY variable specifies how close a map point is to other map points. If there are many map points in close proximity (high density), then it is possible to eliminate a number of them without seriously degrading the quality of the map. Many map data sets supplied by SAS contain a DENSITY variable. For map data sets that do not contain a DENSITY variable, you can add and populate the variable using the GREDUCE procedure.

You can specify an integer from 0 to 6 for the DENSITY option, or you can specify one of the following: LOW = 1, MEDIUM = 3, HIGH = 6.

If you do not specify the DENSITY option, then all the observations in a map data set are displayed, regardless of whether the data set contains a DENSITY variable or not. This is equivalent to specifying DENSITY=6.

Alias: RESOLUTION=, RES=
Restriction: If the map data set does not contain a column of DENSITY values, then a warning is issued and the option is ignored.
See also: The GREDUCE Procedure for information on the DENSITY variable
GOUT=<libref.>output-catalog

specifies the SAS catalog in which to save the graphics output that is produced by the GMAP procedure for later replay. You can use the GREPLAY procedure to view the graphs stored in the catalog. If you do not use the GOUT= option, catalog entries are written to the default catalog WORK.GSEG, which is erased at the end of your session.

Restriction: Not supported by Java and ActiveX
See also: Specifying the Catalog Name and Entry Name for Your GRSEGs
IMAGEMAP=output-data-set

creates a temporary SAS data set that contains information about the graph that is replayed from the graphics catalog. The information in the image map data set includes the shape and coordinates of the elements in the graph, along with values that were associated with those elements in variables that were identified for that purpose in the HTML= or HTML_LEGEND= options. The image map data set can be used to generate an HTML image map in an HTML output file using the IMAGEMAP macro. The IMAGEMAP macro takes two arguments, the name of the image map data set and the name or fileref of an HTML output file, as shown in the following example:

%imagemap(imgmapds, myimgmap.html);
Restriction: Not supported by Java and ActiveX.
MAP=map-data-set

names a SAS traditional map data set that contains the X and Y coordinates for the boundary points of each map area. The traditional map data set must contain the same identification variable or variables as the response data set being used. This statement is required if a feature table is not being used.

See also: About Traditional Data Sets.
STRETCH

stretches map extents to cover all available space in the device. This might cause the map to be distorted. When this option is applied to the PROC GMAP statement, it applies to all statements. If applied to a single statement, it applies only to that statement.

Restriction: Not supported by Java and ActiveX.
UNIFORM

causes the same legend and coloring to be used for all maps produced by the procedure instead of being calculated within each BY group for each map. The UNIFORM option pre-scans the data to generate a categorization across all the data, regardless of BY grouping, and applies that categorization to all maps in the BY group. This results in a static legend and color distribution across all maps such that a single value always has the same color in multiple maps.

When specified on a PROC GMAP statement, UNIFORM applies to all BLOCK, CHORO, AREA, and PRISM statements included within the GMAP run-group.

When omitted from the PROC GMAP statement, and specified on an individual BLOCK, AREA, CHORO, or PRISM statement, UNIFORM applies only to the maps produced by that statement.

Restriction: Not supported by Java.

Previous Page | Next Page | Top of Page