Click here to see the SAS code.
Click here to see the example.
The really "neat" thing about this example is that you can change the
hurricane name & year in the macro variables at the top of the sas job,
and plot the course of juse about *any* hurricane in the eastern US :)
The sas job takes the name & year and goes to the weather.unisys.com/hurricane
website and reads the data for that hurricane directly from their website
(using the sas 'filename' statement, with the 'url' parameter specified).
This is *hugely* powerful & convenient!
Once I get all the latitude/longitude/strength about the hurricane path,
I create an annotate dataset. I use the 'weather' sas/graph software font
(via the annotate style= variable), and I use the 'L' character (which
prints as the hurricane symbol). I use the wind speed to control the
'size' of the hurricane symbol, and if the description has 'HURRICANE'
in it I make the symbol red (otherwise, if it's less than a hurricane
I make the symbol blue).
I use the title= annotate "html=" variable to include charttip/flyover-text
so the person viewing the map can mouse over the individual hurricane
symbols and see the exact data values that hurricane symbol represents.
And I use the href= in the html= variable to code it so that when the
viewer clicks on the marker it does a 'google' search on that
particular hurricane.
Also, I create an annotate dataset for the longitude/latitude grid,
using annotated lines, and then labels at the ends of the lines
to show which gridline it is.
To get the annotated hurricane symbols and gridline to line up correctly
on the map, I combine the map and annotate datasets together, and "gproject"
them together (I use the 'robinson' projection). I then separate the
map and annotate datasets, and use "proc gmap" to draw the map, and
annotate the hurricane path and the longitude/latitude grid on top
of the map. (Note that in the gmap, I use the html= option to show
the country names when you mouse over the contries.)
And, just for fun, I add a url link to the title statement, so you can
clidk on it and it'll take you to a page about tracking hurricanes.
Note that I also have a sas/intrnet version of this example on our
internal sas web that allows you to dynamically enter a hurricane name
and year, and it will draw a map of that particular hurricane :)
Here is a link (this will only work if you are on our internal sas
network!)
SAS/Intrnet Hurricane Tracker
This example is similar to the typhoon example.
Back to Samples Index