Range geocoding requires
a lookup data set and an additional range data set.
-
The lookup data set contains geographic
coordinates (latitude and longitude).
-
The range data set identifies the
ranges (of IP addresses or of other items).
A KEY variable links the two data sets. Both data
sets must contain this variable in order to identify locations for
each IP range. Internally, the proper range is found, and then the
key value is used to access the lookup data set to find the latitude
and longitude for that key.
The lookup data set
must contain the following variables:
-
an X variable that contains the
longitude value of the center coordinate. The default variable name
is X.
-
a Y variable that contains the
latitude value of the center coordinate. The default variable name
is Y.
-
a key variable that corresponds
to a key variable in the range data set.
The range data set must
contain the following variables:
-
a variable that specifies the beginning
value of a range of IP addresses
-
a variable that specifies the ending
value of a range of IP addresses
-
a key variable that corresponds
to a key variable in the lookup data set
You can obtain lookup
and range data from third-party vendors. One vendor is MaxMind, Inc.
at
www.maxmind.com. You can use the
%MAXMIND autocall macro to convert
comma-separated value (CSV) files from MaxMind into SAS data sets.
You can specify that
non-geocoding variables from the lookup data set be added to the output
data set by using the ATTRIBUTEVAR= option in the PROC GEOCODE statement.