Page One

Campus Computing News

Academic Mainframe Services to be Terminated in 2003

ID Change Affects Some Users

Jove Shutdown Imminent

Appropriate Use of Personal Web Page Publishing on People.unt.edu

Summer Hours

Automatically Archiving Your GroupWise E-mail

UNT's General Access Labs

Today's Cartoon

RSS Matters

SAS Corner

The Network Connection

Link of the Month

WWW@UNT.EDU

Short Courses

IRC News

Staff Activities

Subscribe to Benchmarks Online
    
Research and Statistical Support

SAS Corner

By Dr. Karl Ho, Research and Statistical Support Services Manager

Create SAS Maps on the Web

SAS GIS and mapping functions have always been under-utilized. In the last SAS technical report, a new Web interface has been introduced for creating maps in SAS. The nice thing is you can download the data and SAS programs for free, and creating a map as a GIF file is just a snap.  

The site is located at the Data Visualization Community Web site under SAS.com (http://www.sas.com/rnd/datavisualization/mapsonline/html/maps.html).  

Screen shot of the SAS Maps Online site

You can create a map for the world, for a country, for a continent and even for a group.  There are nine different world maps to choose from. Two examples are as follows:

map of the world

¡@

continents of the world

Creating a country map is a piece of cake. Just select the continent and country from the drop-down menus from the main page and click create map. Viola:

the United States with states delineated

¡@

The best thing about the site is that it lets you download data and sample programs so that you to create and modify maps locally. An example is:

/************************************************

* this program will create a simple map *

************************************************/;

filename gsasfile "c:\temp\hkdb1.gif";

* Colors for each continent ;

%let CNA = cx669966;

%let CSA = cx336699;

%let CEUROPE = cx9966CC;

%let CAFRICA = cxFF9900;

%let CASIA = cxFFFF99;

%let CSP = cxCC0066;

options fmtsearch=(sashelp.mapfmts);

%macro show(cntry,dsn,dsn2,lid1,lid2,type,legend,mode,n);

/**** this legend statement may or may not be used in this map ****/

legend label=none mode=&mode across=&n origin=(0,0);

proc gmap map=&dd1..&dsn data=&dd2..&dsn2;

id &lid1; choro &lid2/discrete &legend coutline=graycc name="&dsn";

format country glcnsu.;

title "&cntry";

run;

%mend;

%let dd1=maps;

%let dd2=maps;

pattern1 v=s c=cxFFFF99 r=100 ;

goptions dev=gif transparency gaccess=gsasfile goutmode=replace xpixels=600 ypixels=400 ftext=simplex

gunit=pct htext=.15in ctext=black

colors=("cxffcc00" "cxcc0066" "cx3366ff" "cxff9900" "cx0099cc" "cxffff99" "cx336699" "cx9966cc" "cx669966" "cxcc9966" "cx009999" "cxcccc99");

FOOTNOTE;

%show( %str( HONG KONG ) ,HKDB1 ,HKDB2 ,id,idname,solid,nolegend,share,3);

Well, the program generates the destination of my vacation this summer-  home sweet home*:

Hong Kong - Karl's Homeland

Have a great summer.


(*) Unfortunately, it only shows the Hong Kong Island, which is one of the three main regions that constitute Hong Kong.  They are, namely, Hong Kong Island, Kowloon and New Territories.