I'm using SAS Enterprise Guide v5.1 and currently have a table that looks like the following
Address
123 Street Name, Town, Ireland
456 Big Road, Other Town, Ireland
etc.
Can anyone please tell me how to connect to Google Maps API (preferably the free version that allows up to 2000 searches) and determine the geographical co-ordinates of the addresses in the table? I wish then to create a new table that looks like:
Address Latitude Longitude
123 Street Name, Town, Ireland 1.23456 6.54321
456 Big Road, Other Town, Ireland 5.67890 0.98765
etc.
Have you considered PROC GEOCODE, especially if you have SAS 9.4
You may need to download a dataset for it to work for Ireland.
Hi Reeza,
Yes, I considered using PROC GEOCODE but it seems to be catered specifically for USA/Canada/UK (anywhere with a definied postal code system such as zip codes) and not for Ireland
That's why I'm wondering specifically about the Google Maps API
Also, I have SAS 9.3
Here are two examples. One issue is that they wrote them a while back and the API changes over time.
I think the second one has been maintained over time. I do know that it's still possible 🙂
http://www.sascommunity.org/wiki/Geocoding_using_SAS_and_Google_Maps
http://www.sascommunity.org/wiki/Driving_Distances_and_Drive_Times_using_SAS_and_Google_Maps
Reeza,
Thanks for digging these out for me. Unfortunately I have not been able to adapt these to work for me
From the first source, http://www.sascommunity.org/wiki/Geocoding_using_SAS_and_Google_Maps, I get the following errors
ERROR: Host name maps.google.com not found.
ERROR: Physical file does not exist, C:\GoogleGeocode\Googlexml2.xml.
ERROR: Physical file does not exist, C:\GoogleGeocode\Googlexmlmap.map.
ERROR: Encountered during XMLMap parsing at or near line 1, column 1.
ERROR: XML describe error: Internal processing error.
I know the second one works...
What is the minimum version number of Enterprise Guide this will work with please?
I'm using EG 6.1 and I'm being told by our IT support team that the reason I'm getting a "Host not Found" error is because this isn't supported in the version we run, and nothing to do with the setup or my access priviledges.
Thanks,
Jamie
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.