04-21-2014 05:43 AM
I am looking for coordinates for the mentioned address.
The data set has a address column and it contains district names and state names. It is of one column perhaps doesn't have post code.
How to get coordinates as my customer looks for geo map to locate the production units.
Thanks in advance.
04-21-2014 07:20 AM
I'm not sure what address you are referring to and what country you are hoping to geocode.
You might find this SAS Global Forum 2013 paper a good reference to understand geocoding and how to do it using PROC GEOCODE - http://support.sas.com/rnd/papers/sasgf13/Geocode2013.pdf
04-21-2014 12:02 PM
I Use a sas script that requests the longitude/latitude off an address string from google maps.
This way I get all my long/latitudes and use these in SAS VA.
If you want to solve it this way, I can sent you the related SAS code. It works well for me this way.
Requesting the Centre country long/lat also helps with drilling down. (Also for geo area)
04-21-2014 12:44 PM
Yes pls thats would be grt. Thanks Peter.
Pls inbox me.
This thing is that I have already started using the data set and I have produed visualizations, dashboards and explorations. Now I have got a new requirement from the customer to include geo maps.
kindly suggest me how I can run the codes. should I have to create a new SAS data set? will it append as a geo category automatically which is existing in-memory in SAS VA data source?
04-21-2014 02:18 PM
I will sent the full script to your mail account.
Here for all the other interested users.
The main function in SAS is as follows, but still needs some scripting to get ir right.
%MARCRO Url_get_comp(key, street, zipc, city, country);
%PUT &Url_address; FILENAME www url &Url_address;
I create a table that contains the non matched addresses and call on the macro by record.
The received log/lat are stored in the address table and sent to the VA server.
This address table in imported into VA via a data querry and ready for use.
Now Change the role of the address field name to Geography and assign the log/lat under custom.
This field will now ackt as a geo location field.
Greetings and succes.
06-01-2014 12:28 AM
Hi, Peter! How are you?
I have recently been playing with the ggmap library in R to do precisely the discussed here: give long/lat for a dataset where I have specific addresses. I just recently discovered that one can do this with SAS. Could you also share your macro code with me? That would be extremely helpful!
Greetings from Mexico
08-28-2014 09:27 AM
Thanks a bunch, Peter.
Jesper, welcome to the community! FYI, I deleted your email address on this thread for security reasons. I hope you have everything you need with Peter's attached code.