By Chandra Prakash
Preface
I had an encounter with SAS long back during my MBA days but I never appreciated
neither I found something exciting about it. It was just; seems another software. I knew
there are lots of demands in the market for this software and it cost a sky high price. But I
S AS is the leader in business
This book do not intend to any purpose. I am trying to include SAS procedure which I
liked and can provide additional capabilities.
GMAP
So GMAP is a SAS procedure that can produce this kind of chart. I don’t think I
Ø two-dimensional maps
· Choropleth maps
Ø three-dimensional maps
· Block maps
· Prism maps
· Surface maps
This is very import that both the data sets contain the same ID variable;
alternatively, can use a single data set as input if it contains either the map data
or a variable that references a map data set.
There are two types of map datasets, traditional map data sets and feature
tables. The traditional map datasets should contain at least two numeric
variable representing coordinates in two dimensional surface to define the
various areas in the map or latitude-longitude if projected and another uniquely
identifiable variable (numeric or character) representing the areas in the map,
used in ID statement in SAS code. The traditional map can also contain another
variable called SEGMENT. A unit area is defined by observations in the map
data set that have the same identification (ID) variable value. A unit area might
be composed of a single polygon or a collection of polygons.
Mapsonline
A polygon is defined by all of the observations that have the same SEGMENT
variable value within the same unit area.
In contrast to the traditional map data set which stores the spatial information
across multiple observations, the feature table uses a data arrangement to store
a reference to the spatial information in a single variable value.
Response data set contains the information that need to be overlaid at the
map. They are generally made up of Reponses and identification (ID) Variable.
Using CIMPORT is pretty simple. There are only two piece of information that is
required to pass. First is where the sas data set will be stored (Name of the
liberary) and what is the location of .cpt file.
Code ran successfully and created two data set named india.sas7bdat &
india2.sas7bdat.
ANNOTATE data sets Helps to label the locations in maps it contains the label
information as well as geographical coordinates of the locations to identify the
area.
Generic Code
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>;
ID id-variable(s) | geo-variable;
AREA response-variable </ option(s)>;
BLOCK response-variable(s) </ option(s)>;
CHORO response-variable(s) </ option(s)>;
PRISM response-variable(s)</ option(s)>;
SURFACE response-variable(s) </ option(s)>;
If response dataset do not contain observations for all the ma areas they would
be ignored from the map; using “ALL“would specify to include the map area
even when they do not have their respective observations. “DENSITY” relates to
resolution of the map. GOUT directs the location of the output catalogue which
can be viewed later using GREPLAY procedure.
This book is not complete. Keep watching this space for
updation/ revision.