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

This example demonstrates 2 different ways to show the same 
election data.  

The first is the 'Treemap' in which each rectangle represents 
a 'state' (of the united states), and the size of the rectangle 
represents how many electoral votes that state has in the election.
The color of the rectangle represents which candidate won the 
votes from that state.  To tie-in the color with the candidate,
a picture of each candidate is annotated, and a colored rectangle
is annotated behind the picture.  This Treemap was created
using some macros I wrote to generate a special sas/graph 
gmap of rectangles - my macros are described in detail 
here.

The 2nd map is the more traditional geographical map, using 
sas/graph maps.us (and drawn with 'proc gmap').  This map shows
you geographically where the votes for each candidate came from,
but the geographical size of the states can cause a visual bias
(some small states have lots of votes, and some large states
don't have many votes, for example).

Therefore, it is good to look at this type of data in both ways! :)

As an added "bonus", I've added html title= charttips/flyover-text
with the state name and the number of votes, and also html href=
drilldowns so that when you click on a state it takes you to 
that state's home page.

Bush and Gore pictures modified from royalty-free clipart ...
http://free-stock-photos.com/
http://free-stock-photos.com/president/gwbush-1.html
http://free-stock-photos.com/history/al-gore-1.html

Back to Samples Index