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

The data for this example is in an excel spreadsheet.
The data is the long/lat location of various lakes in Maine,
and the mercury level in those lakes.

I use sas/access to pc file formats to read it directly into 
a sas data set (this will only work on pc, not unix).
I then convert the long/lat degrees into radians, and add
some variables to this dataset to make it an annotate dataset
with a 'pie' at each lake location, with the size of the lake
corresponding to the amount of mercury in that lake.
I also add another empty/black annotated pie in the same size
and location, to draw an outline/border around the red pies.

I subset Maine out of the mapsgfk.us_counties.
I then combine the map and the annotated pies, and "gproject" them
together (this converts the long/lat coordinates into x/y coordinates
that will look ok on a flat page, and the state will look "straight"),
and I then separate the annotated pies and the map into 2 datasets.

I then use "proc gmap" to draw the map, and overlay the pies with
annotate.  I use the "iback" goption to put the swooshy blue image
in the background, and I use the html= option to encode the html
title= charttips/flyover-text and the href= drilldowns.

Back to Samples Index