top of page

Thu, Jul 21



Invoking Google Maps with SAS® to Calculate Driving Distances by Michael A. Raithel

How far is the drive to SAS HQ in Cary, NC? Use SAS to call Google Maps to find out!

Registration is closed
See other events
Invoking Google Maps with SAS® to Calculate Driving Distances by Michael A. Raithel
Invoking Google Maps with SAS® to Calculate Driving Distances by Michael A. Raithel

Time & Location

Jul 21, 2022, 12:00 PM – 1:00 PM EDT


In the world of survey management, we sometimes need to determine distances between addresses.  Perhaps we are trying to establish which study subject persons are within a specific distance of an interviewer.  Maybe we want to identify existing establishments such as doctors’ offices, hospitals, clinics, or pharmacies that are a reasonable distance from our study subjects. Such distances are often measured in absolute terms; such as all of the doctor offices within 50 miles of a subject. But, straight-line, as-the-crow-flies, distances do not account for geographical and infrastructure features such as mountains, rivers, lakes, and existing highways and surface roads.  Consequently, driving distances may be more reliable than absolute distances.


When many of us want to get from Here to There, we invoke Google Maps, plug in the address for Here, plug in the address for There, and hit ENTER.  Google Maps then returns some routes to our destination as well as the driving distances for each route.  So, Google Maps provides an existing engine for determining driving distances between two points.


This presentation illustrates a SAS macro program that invokes Google Maps to calculate driving distances between pairs of addresses. Start and End addresses are input via an Excel spreadsheet, so any practical number of distances can be computed with a single run.  Attendees can begin using the macro program right away.

Michael A. Raithel is a senior systems analyst for Westat, an employee-owned contract research organization in the Washington, DC, area. He has worked with Information Systems in the commercial and government sectors since 1980. An internationally recognized expert in the use of SAS software in mainframe and UNIX environments, Michael is the author of more than 25 SAS technical papers, over 200 blog posts, and is a popular lecturer at SAS Global Forum and at regional SAS conferences. Michael has been a section chair at SUGI, SESUG, and NESUG, and he co-chaired NESUG in 1995. He has been a keynote speaker at WUSS, SCSUG, PharmaSUG, and a Featured Lunchtime Speaker at SAS Global Forum. Michael has taught SAS classes at SUGI, SAS Global Forum, and at American University in Washington, DC. He has written four books for SAS Press, one SAS book on Amazon Press, and a book of computer humor titled: It Only Hurts When I Hit ENTER. A copy of the first edition of Tuning SAS Applications in the MVS Environment resides in the Smithsonian Institution of American History.

Share This Event


July 17

Validating Data Files by

Michael A. Raithel

bottom of page