The map area identification variable
in some
SAS/GRAPH map data
sets contain standardized numeric codes. The data sets for the United
States contain a variable whose values are Federal Information Processing
Standards (FIPS) codes. Traditional data sets for Canada contain standard
province codes or census division codes. GfK data sets for Canada
contain standard province codes and province names. When you specify
a map data set with the GMAP procedure, the map area identification
variable values in the map data set must be the same as those used
in the response data.
If the map area identification
variables in your response data set are state or province names or
abbreviations, convert them to FIPS codes or province codes before
using the response data set with one of the traditional map data sets
supplied by SAS. Conversion might not be necessary if using one of
the GfK map data sets because character variables like
ID that
contain province codes, for example, might already match the identification
variables in your response data set.
U.S. FIPS Codes lists the FIPS
codes for the United States and Canadian Province Codes lists the standard
codes for Canadian provinces.
Note: Alternatively, you can convert
the FIPS code or province codes in your traditional map data set to
match the names in your response data.
Note: The
id-variables are
numeric in traditional but character in GfK Canadian map data sets.
The MAPS.CNTYNAME data
set contains a cross-reference of names and FIPS codes for all counties
in the United States. The MAPS.CANCENS data set contains a cross-reference
of census district names and codes for Canadian provinces.
Base
SAS software provides several functions that convert state names to
FIPS codes and vice versa. The following table lists these functions
and a brief description of each. See
SAS Functions and CALL Routines: Reference for more information.
FIPS and Postal Code Functions
|
|
|
Converts state postal
code to FIPS state code
|
|
Converts state postal
code to state name in upper case
|
|
Converts state postal
code to state name in mixed case
|
|
Converts FIPS code to
state name in upper case
|
|
Converts FIPS code to
state name in mixed case
|
|
Converts FIPS code to
state postal code
|