Geocoding with the Google Maps API: Using PROC FCMP To Design User-Defined SAS Subroutines That Call User-Defined Python Functions That Geocode Coordinates into Addresses, Calculate Routes, and More!
September 24, 2025: 2:30 PM - 3:00 PM
Visualizations and Reporting (VR), Executive Dining Room #2

Authors Abstract
Troy Hughes Software interoperability describes the ability of software systems, components, and languages to communicate effectively with each other, and must be prioritized in today’s multilingual and open-source development environments. PROC FCMP, the SAS® Function Compiler, enables Python functions to be wrapped in (and called from) SAS user-defined functions (and subroutines), and the full panoply of SAS environments supports FCMP—including SAS Display Manager, SAS Enterprise Guide, SAS Studio, SAS Viya, and the latest Cary show pony, SAS Workbench. Productivity and the pace of development are maximized when existing open-source code—such as Python user-defined functions—can be run natively from a Python interactive development environment (IDE) rather than having to be needlessly recoded into the Base SAS language. This text demonstrates SAS and Python user-defined functions that collaboratively call the Google Maps Platform APIs to geocode street addresses into latitude/longitude coordinates, and to calculate driving distances between locations. The scenarios in this text demonstrate the application of the Google Maps Platform for clinical trials research, and the technical concepts are adapted from Chapter 8 of the renowned SAS Press book: PROC FCMP User-Defined Functions: An Introduction to the SAS® Function Compiler. (HUGHES, 2024)