Click here to see the SAS code.
Click here to see the example.
---------------------------------------------------------------
Note that a variation of this example is included in the book SAS/Graph: Beyond the Basics,
and all the 'tricks' used to create it are described in great detail!
---------------------------------------------------------------
This exmaple demonstrates the new v9.2 "proc ginside".
It lets you specify a zipcode center, and a radius (in macro
variables at the top of the sas job), and it plots a nice map
showing which of your customers are inside/outside that circle.
-----
I create a circular map area, and run "proc ginside" to determine
which of the customers (annotated dots) are inside that area.
Then I use annotate to annotate dots for each customer, color-coded
based on whether they're inside/outside the given circular area.
I also annotate the circle onto the map using poly/polycont
(note that the map area I use for 'proc ginside' and the annotated
poly/polycont circle use the same dataset, but are technically
two different things).
-----
If you don't have v9.2 sas yet, you can accomplish basically the
same thing, by cauculating the distance from every customer to the
center of the circle (using the great circle distance equation).
Here's the same example using that "brute force" technique...
Click here to see the example.
Click here to see the sas code.
Back to Samples Index