/**********************************************************************/
data andrew;
input @1 date mmddyy8. @11 time time5. @18 lat 4.1
@24 long 4.1;
cards;
08/22/92 05:00 25.8 67.5
08/22/92 11:00 25.9 69.0
08/22/92 17:00 25.9 70.4
08/22/92 23:00 25.6 71.9
08/23/92 05:00 25.5 73.4
08/23/92 11:00 25.4 75.0
08/23/92 17:00 25.4 76.5
08/23/92 23:00 25.4 78.1
08/24/92 05:00 25.4 80.3
08/24/92 11:00 25.7 82.1
08/24/92 17:00 25.8 83.9
08/24/92 23:00 26.3 85.7
08/25/92 05:00 26.6 87.4
08/25/92 11:00 27.5 89.2
08/25/92 17:00 28.2 90.3
08/25/92 23:00 29.0 91.1
08/26/92 05:00 29.7 91.7
08/26/92 07:00 29.9 91.7
08/26/92 11:00 30.5 91.6
08/26/92 13:00 30.7 91.6
;
run;
/**********************************************************************/
data latlong;
long=45; /* starting point for longitude lines */
do i=1 to 14;
lat=0;
output; /* top of line */
lat=50; output; /* bottom of line */
long=long+5;
end;
lat=0; /* starting point for latitude lines */
do i=1 to 8;
long=45;
output; /* right side of line */
long=120; output; /* left side of line */
lat=lat+5;
end;
run;
/**********************************************************************/
data grid;
length function style color $ 8;
retain xsys ysys '2' hsys '3' color 'white'
line 2 size .3 when 'b' cont -1;
set latlong;
/* This equation converts longitude */
/* and latitude from degrees to radians. */
x=long*arcos(-1)/180;
y=lat*arcos(-1)/180;
if mod(_n_,2)>0 then
function='move'; /* MOVE and DRAW with */
else function='draw'; /* alternating observations. */
run;
/**********************************************************************/
data symbols;
length function style color $ 8;
retain function 'label' xsys ysys '2' hsys '3'
color 'red'
line 2 size 7.5 when 'a' cont -1
text 'L' style 'weather';
set andrew;
x=long*arcos(-1)/180; /* This equation converts the */
y=lat*arcos(-1)/180; /* longitude and latitude */
output; /* values from degrees to */
/* radians. */
run;
/**********************************************************************/
data area;
/* 45 degrees minimum longitude */
xmin=45*arcos(-1)/180;
/* 120 degrees maximum longitude */
xmax=120*arcos(-1)/180;
/* 0 degrees minimum latitude ymin=0; */
ymin=0;
/* 50 degrees maximum latitude */
ymax=50*arcos(-1)/180;
set maps.worldmap;
if ((y>ymin and yxmin));
run;
/**********************************************************************/
data mapall;
set area grid symbols;
run;
/**********************************************************************/
proc gproject data=mapall out=myproj;
id id;
run;
/**********************************************************************/
proc means data=myproj min max noprint;
var x y;
output out=stats min=minx miny max=maxx maxy;
run;
/**********************************************************************/
data _null_;
set stats;
/* calculate the range for x */
xrange=maxx-minx;
/* calculate the range for y */
yrange=maxy-miny;
/* calculate new maximum for x */
newmaxx=maxx-(.15*xrange);
/* calculate new minimum for x */
newminx=minx+(.15*xrange);
/* initialize macro variables for x */
call symput('maxx',newmaxx);
call symput('minx',newminx);
/* calculate new maximum for y */
newmaxy=maxy-(.15*yrange);
/* calculate new minimum for y */
newminy=miny+(.15*yrange);
/* initialize macro variables for y */
call symput('maxy',newmaxy);
call symput('miny',newminy);
run;
/**********************************************************************/
proc gproject data=myproj out=clipped
longmin=&minx longmax=&maxx
latmin=&miny latmax=&maxy
project=none;
id id;
run;
/**********************************************************************/
data anno map;
set clipped;
if cont=\- 1 then output anno;
else output map;
run;
/**********************************************************************/
data frame;
length function style color $ 8;
retain xsys ysys '2' hsys '3' color 'white'
size .3 when 'a' line 0 style '1';
function='move'; x=&minx; y=&miny; output;
function='bar'; x=&maxx; y=&maxy; output;
run;
/**********************************************************************/
data all;
set anno frame;
run;
/**********************************************************************/
title1 h=5pct a=-90 ' ';
pattern1 v=solid c=green r=100;
proc gmap data=map map=map;
note h=5pct c=white move=(65,80)pct font=centb
'The Path of'
h=5pct c=white move=(61,75)pct font=centb
'Hurricane Andrew'
h=4pct c=white move=(62,70)pct font=centb
'22AUG92 to 26AUG92';
id id;
choro cont / nolegend anno=all;
run;
quit;
/**********************************************************************/