GMAP Procedure

AREA Statement

Applies color to the regions in BLOCK and PRISM maps based on values of a specified response variable.
Requirement: The response variable is required. The AREA statement must be used in conjunction with either a BLOCK or PRISM statement.

Syntax

AREA response-variable </ option(s)>;

Summary of Optional Arguments

generates a separate response level (color and surface pattern) for each different value of the formatted response variable.
specifies the LEGEND statement to associate with the map.
specifies the number of response levels to be graphed for the response variable.
specifies the response levels for the range of response values that are represented by each level (pattern and color combination).
accepts a missing value as a valid level for the response variable.
suppresses the legend.
causes GMAP to collect all response values (or their statistic) and chart each region as a percentage of the whole.
causes GMAP to display, in the legend, the starting value and ending value of the range around each midpoint specified with the MIDPOINTS= option (instead of displaying just the midpoints).
overrides the GMAP default format for percent of PERCENT8.2.
specifies the statistic for GMAP to chart.
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.

Required Argument

response-variable
specifies the variable in the response data set. Areas that correspond to response variables with missing values are not colored unless you use the MISSING option in the AREA statement. This variable is represented in all BLOCK and PRISM maps in the same RUN group.

Optional Arguments

Options in an AREA statement affect all of the maps that are produced by that statement. You can specify as many options as you want and list them in any order. All of these options are the same as the normal GMAP options except that they apply to the areas of regions only, and not to the bar heights.

DISCRETE
generates a separate response level (color and surface pattern) for each different value of the formatted response variable. The LEVELS=number of midpoints option is ignored when you use the DISCRETE option.
If you specify the DISCRETE option, then distinct, non-continuous colors are used for the response values. If you specify the LEVELS= option instead, then a color ramp is used to assign each response value a continuous color scheme.
Note:If the data does not contain a value in a particular range of the format, that formatted range is not displayed in the legend.
LEGEND=LEGEND<1...99>
specifies the LEGEND statement to associate with the map. The LEGEND= option is ignored if the specified LEGEND definition is not currently in effect. In the GMAP procedure, the BLOCK statement produces a legend unless you use the NOLEGEND option. If you use the SHAPE= option in a LEGEND statement, only the value BAR is valid. Most of the LEGEND options described in LEGEND Statement are supported by both Java and ActiveX. If a LEGEND option is not supported by Java or ActiveX, it is noted in the LEGEND option definition.
Restriction:Partially supported by Java and ActiveX
LEVELS=number-of-response-levels | ALL
specifies the number of response levels to be graphed for the response variable. Use LEVELS= to specify the number of response variables when the response variables are numeric. When you specify LEVELS=ALL, all unique numeric or character response variable values are graphed.
Each response level is assigned a different surface pattern and color combination. The prism and block heights are based on the data value of the corresponding response variable.
If you specify the LEVELS= option, then a color ramp is used to assign each response value a continuous color scheme. The response values are assigned lighter and darker values of a color scheme to express lower and higher response values. If you specify the DISCRETE option, then distinct, non-continuous colors are used for the response values.
If neither the LEVELS= option nor the DISCRETE option is used, then the GMAP procedure determines the number of response levels by using the formula FLOOR(1+3.3 log(n)), where n is the number of response variable values.
By default, an equal-distribution (quantizing) algorithm is used to determine each level.
The LEVELS=number-of-response-levels option is ignored when you use the DISCRETE or MIDPOINTS=value-list option. It is also ignored when the response variables are character. When MIDPOINTS=OLD is used with the LEVELS= option, default midpoints are generated using the Nelder algorithm (Applied Statistics 25:94–7, 1976).
MIDPOINTS=value-list | OLD
specifies the response levels for the range of response values that are represented by each level (pattern and color combination).
For numeric response variables, value-list is either an explicit list of values or a starting and an ending value with an interval increment, or a combination of both forms:
  • n <...n>
  • n TO n <BY increment>
  • n <...n > TO n <BY increment> <n<...n>>
By default, the increment value is 1. You can specify discrete numeric values in any order. In all forms, n can be separated by blanks or commas. For example, midpoints=(2 4 6) midpoints=(2,4,6) midpoints=(2 to 10 by 2)
If a numeric variable has an associated format, the specified values must be the unformatted values. With numeric response values, DEVICE=JAVA uses only midpoints that fall in the range of the data being used. Thus, if your data ranged from 30–80, but midpoints were specified at 25, 50, 75, and 100, only 50 and 75 are used.
For character response variables, value-list is a list of unique character values enclosed in quotation marks and separated by blanks:
  • 'value-1' <...'value-n'> midpoints="Midwest" "Northeast" "Northwest"
Specify the values in any order. If a character variable has an associated format, the specified values must be the formatted values. Character response values specified with the MIDPOINTS= option are not supported by DEVICE=JAVA.
You can selectively exclude some response variable values from the map, as shown here: midpoints="Midwest"
Only those observations for which the response variable exactly matches one of the values listed in the MIDPOINTS= option are shown on the map. As a result, observations might be excluded inadvertently if values in the list are misspelled or if the case does not match exactly.
Specifying MIDPOINTS=OLD generates default midpoints using the Nelder algorithm (Applied Statistics 25:94–7, 1976).
Restriction:Partially supported by Java
See:The RANGE option
MISSING
accepts a missing value as a valid level for the response variable.
NOLEGEND
suppresses the legend.
PERCENT
causes GMAP to collect all response values (or their statistic) and chart each region as a percentage of the whole. You can use the STATISTICS= option to change how the percentage is calculated—whether as a percentage of the SUM, FREQUENCY, or MEAN. If you do not use the STATISTICS= option, then STATISTICS=FIRST is assumed and the response variable of only the first observation of each region is counted. If the response variable is a text field, then STATISTIC=FREQUENCY is used, even if you specify a different value for the STATISTIC= option.
RANGE
causes GMAP to display, in the legend, the starting value and ending value of the range around each midpoint specified with the MIDPOINTS= option (instead of displaying just the midpoints). For example, if MIDPOINTS=15 25 35, then the legend could show 10-20, 20-30, 30-40.
Restrictions:The MIDPOINTS= option must be specified for the RANGE option to have any effect.

Not supported by ActiveX.

STATFMT=format-specification
overrides the GMAP default format for percent of PERCENT8.2. Use this format when using calculated values. The STATFMT option is typically used when the STATISTIC=FREQUENCY option or the PERCENT option is used.
Alias:SFMT=, SFORMAT=, STATFORMAT=
STATISTIC=FIRST | SUM | FREQUENCY | MEAN
specifies the statistic for GMAP to chart. For nonnumeric variables, FREQUENCY is the only allowed value—any other value is changed to FREQUENCY and a warning is issued. The frequency of a variable does not include missing values unless the MISSING option is specified.
FIRST
GMAP matches the first observation from the DATA= data set and charts the response value from this observation only. This is the default. If more rows exist that are not processed, a warning is issued to the log.
SUM
All observations matching a given ID value are added together and the summed value is charted.
FREQUENCY
A count of all rows with nonmissing values is charted unless you specify the MISSING option.
MEAN
All observations matching a given ID value are added together and then divided by the number of nonmissing observations matched. This value is then charted unless you specify the MISSING option.
Alias:STAT=
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 prescans 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, the UNIFORM option applies to all AREA, BLOCK, CHORO, and PRISM statements included within the GMAP run-group.
When omitted from the PROC GMAP statement, and specified on an individual AREA, BLOCK, CHORO, or PRISM statement, the UNIFORM option applies only to the maps produced by that statement.
Restriction:Not supported by Java.

Details

Description

In the case of BLOCK: whereas the BLOCK statement controls the color and appearance of the blocks, the AREA statement controls the color and appearance of the regions under the block.
In the case of PRISM: whereas the PRISM statement controls the height of the prism, the AREA statement controls the color of the region. If you specify an AREA statement, the PRISM statement controls both the color and height.