O'Reilly logo

SAS/GRAPH: Beyond the Basics by Robert Allison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

EXAMPLE 8  Determine Customers Within Map Borders

Purpose: Demonstrate how to use the new SAS/GRAPH PROC GINSIDE to determine whether customers are in a sales area composed of a group of counties.

To make this example easy for you to run, and so you do not have to worry about having a customer database with hundreds of customer locations, I create some fake customer data from the sashelp.zipcode data set that is shipped with SAS:

proc sql;
 create table customers as
 select unique city, statecode as state, zip
 from sashelp.zipcode
 where statecode='NC';
quit; run;

I then use PROC GEOCODE (new in SAS 9.2) and look up the latitude and longitude of the ZIP code centroid for each customer. If you have the street address of your customer, you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required