EXAMPLE 9  Determine Customers Within Circular Radius

Purpose: Demonstrate how to use SAS/GRAPH PROC GINSIDE to determine whether customers are in a circular sales area of a given radius.

This example is short and sweet, really just a case of re-using techniques described in detail in two previous examples. This demonstrates that once you learn a “trick” you can apply it in other ways.

First, I get the longitude and latitude (in degrees) of the approximate center of my sales region and store that in a SAS data set. In this example I am grabbing the centroid of the ZIP code 27513 from the sashelp.zipcode data set, but you could get a center longitude and latitude any way that is convenient for you.

proc sql;
 create table sales_region ...

Get SAS/GRAPH: Beyond the Basics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.