Click here to see the SAS code. (static version)
Click here to see the example. (static version)

Click here to see the SAS code. (gif-animation version)
Click here to see the SAS code. (gif-animation version, old style syntax)
Click here to see the example. (gif-animation version)

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

Using data downloaded from the 'year' links at the bottom of this page:
http://www.schs.state.nc.us/SCHS/data/databook/2009/
And then clicked the gonorrhea link under the 'Morbidity' section.
(data captured 22oct2009)

And then, trying to imitate this animated map...
http://www.schs.state.nc.us/SCHS/gis/atlas/gonorrhea.html

-----

Had to copy the data from each year into spreadsheet, and modified all
the spreadsheets so they were all in the same format/columns, so I could
use the same code to read in each of them.

Then combined them all into 1 sas data set.

Got the RGB hex codes for the color gradient from colorbrewer.org
and then coded them into the 'pattern' statements.

The static version has html charttips/drilldowns for each county.
The gifanim version does not (because gifanim doesn't support that).
I used iteration=5 to have it loop through the animation 5 times.

I also queried out some summary statistics for each map (NC avg, and Max county),
and created an annotate data set to put those numbers over the legend.
The "trick" to this annotate is that you must have the 'by' variable in the
data set, and you must use the anno= after the choro /, rather than the
anno= in the 'proc gmap' line.


Back to Samples Index