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

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

A customer was interested in being able to visually analyze data
in this way, so I set up this proof-of-concept for him.
(For now, I've only mocked-up data for weeks 1 through 9.)

The left side is a Proc Gplot, with map tile images annotated 
behind the gplot (4 map tiles in this case), and colored dots 
annotated on top to represent the location of the patients,
and the color represents their flu test results.

The right side is a Proc Gchart vbar, grouped by the date,
and with the midpoint labels suppressed (and a color legend
used instead).  I insert some 'missing' data to guarantee that
all the colors will be used in the legend, even if that week's
subset of data does not have any results for a certain color.

The gray boxes along the bottom are a sneaky Proc Gchart hbar,
with all the axes suppressed.  Each 'subgroup' in the bar is a
week, and has a drilldown to that week of data.  I annotate 
the week number of the bar segments, and there is also html
hover-text to show the week number and date range.

There is a macro that plots a week's worth of data, and 
stores the output in the 'flu_files' folder.  The macro is
run once for each week.  This is all run ahead of time, and
all the output saved (30 weeks = 60 files ... one html and
one png for each week).  This might take a few minutes up-front
to generate all the graphs ahead of time, but you don't need 
Stored Process or SAS/Intrnet to generate the desired graphs
on-the-fly later on.

There is some cool stuff going on behind-the-scenes ... the SAS job
downloads images of map 'tiles' directly from the web, and positions
them behind the colored markers (in a gplot) to draw the map.
The map and bar chart are placed side-by-side using Proc Greplay
and a custom greplay template.

Back to Samples Index