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

---------------------------------------------------------------

This is a fairly simple example, that get's its "umph!" from the
rich data in the sashelp.zipcode data set that is shipped with sas.

The maps.uscounty map is used, and the counties are shaded based on
the first 2 digits of the zipcodes in that county (if there are 
multiple zipcodes in a county, the "first" zipcode is used - kinda
arbitrary, but in the grand scheme of things it's usually correct/ok).

I'm using the new/improved v9.2 color list so I don't have to specify
all these colors in pattern statements - that's really handy!  
Specifically, I'm using the colors of the "ods style=minimal" 
graph style.

Also, I'm using the maps.uscounty (and sashelp.zipcode) from the 
9.2-platform (TS2M0) release
Alaska doesn't have "counties" in our 9.2-classic (TS1M0) release, 
and Florida's recent miami/dade change isn't in that release.

You can download the latest/greatest maps.uscounty and sashelp.zipcode
from the SAS "Maps Online" website:

   http://support.sas.com/rnd/datavisualization/mapsonline/

   maps.uscounty:
   http://support.sas.com/rnd/datavisualization/mapsonline/html/downview.html?image=downloads/v92maps/uscounty.gif

   sashelp.zipcode:
   http://support.sas.com/rnd/datavisualization/mapsonline/html/misc.html

I add ods html charttips to each county, showing the state & county
fips numbers, and the 2-digit zipcode (since there are too many colors
to have a useful legend).

And, I add state outlines (using annotate) to the map, to make the 
states more identifiable.  (You would not normally get state outline
on a sas county map).

Back to Samples Index