/* Defining a library where the SAS maps data set is located. Change according */ /* to local setting */ libname maps 'R:\SAS612CD\SAS\MAPS'; /* Defining a library where the SAS data set is located. */ /* Change the path to the directory to where merge.sd2 is downloaded. */ libname texas 'c:\temp'; /* Merging POV data with SAS maps data */ /* data texas.merge; */ /* merge texas.county work.txpov; */ /* by county; */ /* run; */ /* Selecting Texas counties out of USCOUNTY data set */ /* data texas.county; */ /* set maps.uscounty; */ /* where (state eq 48); */ /* run; */ /* Create a recoded format for _pov */ proc format; value povfmt low-10.4='0-10' 10.5-20.4='11-20' 20.5-30.4='21-30' 30.5-40.4='31-40' 40.5-50.4='41-50'; run; /* Setting options for the graphics */ goptions reset=global gunit=pct cback=white colors=(black blue green red orange yellow) htitle=6 htext=3 ftext=zapf border; pattern1 value=solid; pattern2 value=msolid; legend1 value=(j=l) frame cborder=black; title 'Pov in Texas'; /* Plotting different types of maps */ /* Prism (3-d) */ proc gmap map=texas.merge data=texas.merge; format _pov povfmt.; id county; prism _pov / discrete coutline=gray legend=legend1 zview=10; run; /* Choro (2-d) */ proc gmap map=texas.merge data=texas.merge; format _pov povfmt.; id county; choro _pov / discrete coutline=gray legend=legend1; run; /* Block (3-d) */ proc gmap map=texas.merge data=texas.merge; format _pov povfmt.; id county; block _pov / discrete coutline=gray legend=legend1; run; /* Surface (3-d) */ proc gmap map=texas.merge data=texas.merge; format _pov povfmt.; id county; surface _pov / constant=4 nlines=100; run; quit;