Click here to see the SAS code. 
Click here to see the example.

In this example I tried to use as much real (or 'plausibly real')
data from the space shuttle crash as possible, to make the proof-
of-concept example as realistic as possible.  

I use the county maps for Texas and Louisiana, and then I use
annotate to add a heavier/darker state outline (annotate is the
only way I know of to do this, since "proc gmap" only supports
one weight/darkness of outline for the entire map).

I create a dataset containing all the counties, and then I use
an SQL join to merge in the county names from the maps.cntyname
data set.  I create an htmlvar, and I put title= charttip/flyover-text
with the county name, and the debris count, and I also set up
an href= link for each county so that it links you to a mapquest 
map of that area -- and for nacogdoches county I make that a
special link to the county map showing the debris layout in 
that county.  (I wanted to show that you can set up gmaps to 
do a variety of different kinds of drilldown :)  For the 
counties that had debris counts, I shaded them to represent
the debris count.

I then did quite a bit of annotate ... I annotate a longitude
and latitude grid, so you can easily tell the approx long/lat
of the map areas.  I annotated a red line showing the predicted
path of the debris field, I annotated labels at each end of the
red debris field line, and I also annotated a heat/thremal 
image of the space shuttle entering the atmosphere.

I tried to write this code so it would be easy to re-use it
with different data, or maybe even "generalize" it so it could
be used with *any* data.  I hope another tragedy like this 
crash doesn't happen -- but if it does, it will be good to 
have some software like this around to help quickly analyze
the data!

Back to Samples Index