VIZMAP Keyword (GGRAPH command)
The VIZMAP
keyword identifies an existing map file for use with a map visualization
template. The keyword has an effect only if SOURCE=VIZTEMPLATE
and the named template identifies
a map template. The keyword is followed by an equals sign (=) and
the name of the map file in quotation marks.
There are four qualifiers that affect how the map visualization is rendered. These qualifiers are grouped together in square brackets after the quoted map file name:
LOCATION. By default, GGRAPH
looks for a built-in or imported map file that
is stored on the local machine. This default behavior is equivalent to appending the qualifier
[LOCATION=LOCAL]
to the quoted map file name. To use a map file in a IBM® SPSS® Collaboration and Deployment Services Repository, append the qualifier
[LOCATION="repository folderspec"]
to the quoted map file name. For more
information about IBM SPSS Collaboration and Deployment Services Repository file
specifications, see File Specifications for IBM SPSS Collaboration and Deployment Services Repository Objects .
The IBM SPSS Collaboration and Deployment Services Repository file specification is
enclosed in quotation marks.
For viztemplate files or map files that are stored on the file system, set
[LOCATION=FILE]
and specify the full path to the visualization template file with
VIZMAP
or NAME
. Using a map stored on the file system is necessary
when the IBM SPSS Statistics
client is not available (for example, when using IBM SPSS Statistics Batch Facility
or running the Production Facility disconnected).
TYPE. By default, GGRAPH
assumes
that the map file is the main data map file. This default behavior
is equivalent to appending the qualifier [TYPE=DATA]
to the quoted map file name. The main data
map file is keyed to the data to create the map visualization. Overlay
map visualization templates also require a reference map file that
is drawn behind the main data map. To specify a reference map file,
use the qualifier [TYPE=REFERENCE]
.
MAPKEY. When you are specifying a main data map file ([TYPE=DATA]
), you need to identify the map attribute
that is used as the key for linking to the data. Enclose the map attribute
name in quotation marks.
SHOWALLFEATURES. By default, GGRAPH
will render
all the features in the map, even if a feature has no matching key
in the data. This default behavior is equivalent to appending the
qualifier [SHOWALLFEATURES=YES]
to the quoted map file name. If you want the map visualization to
show only those features for which there is data, use the qualifier [SHOWALLFEATURES=NO]
.
Map files are SMZ files. IBM SPSS Statistics is pre-installed
with several SMZ files. SMZ files can also be created by converting ESRI shapefiles with the Map
Conversion Utility. The GGRAPH
command can reference these map files if they are
stored in the IBM SPSS Collaboration and Deployment Services Repository or if they
are imported using the Graphboard Template Chooser. You can access the Template Chooser by selecting
Graphboard Template Chooser from the Graphs menu. For
more information using the Map Conversion Utility, see Converting and Distributing Map Shapefiles.
"map name". Apply the specified map file to the map visualization being created.
Examples
For templates that are stored on the file system, set [LOCATION=FILE] and specify the full path to the visualization template file with NAME.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=salbegin salary gender[NAME="sex"]
/GRAPHSPEC SOURCE=VIZTEMPLATE(NAME="/vizfiles/MyBinnedScatter.viztemplate"[LOCATION=FILE]
MAPPING("X"="salbegin"[DATASET="graphdataset"]
"Y"="salary"[DATASET="graphdataset"]
"Panel across"="sex"[DATASET="graphdataset"]))
DEFAULTTEMPLATE=NO.
For maps that are stored on the file system, set [LOCATION=FILE]
and specify the
full path to the visualization template file with VIZMAP.
MacOS example:
GET
FILE='/Applications/IBM SPSS Statistics/Resources/Samples/English/Employee data.sav'.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=Continent[LEVEL=nominal] MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=VIZTEMPLATE(NAME="Choropleth of Counts"[LOCATION=LOCAL] MAPPING( "Data_Key"="Continent"[DATASET="graphdataset"])) VIZSTYLESHEET="Traditional"[LOCATION=LOCAL]
LABEL='CHOROPLETH OF COUNTS: Continent'
DEFAULTTEMPLATE=NO
VIZMAP="/Users/<user_name>/Downloads/Continents.smz"[LOCATION=FILE TYPE=DATA mapkey="CONTINENT" SHOWALLFEATURES=YES].
Windows example:
GET
FILE='C:\Program Files\IBM\SPSS\Statistics\31\Samples\English\Employee data.sav'.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=Continent[LEVEL=nominal] MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=VIZTEMPLATE(NAME="Choropleth of Counts"[LOCATION=LOCAL] MAPPING( "Data_Key"="Continent"[DATASET="graphdataset"])) VIZSTYLESHEET="Traditional"[LOCATION=LOCAL]
LABEL='CHOROPLETH OF COUNTS: Continent'
DEFAULTTEMPLATE=NO
VIZMAP="C:\samples\Continents.smz"[LOCATION=FILE TYPE=DATA mapkey="CONTINENT" SHOWALLFEATURES=YES].