I would like to create a sas geo map for France country.
I need to populate the longtitude and latitude column in order to create geo map.
Please advise how we can lookup the values for France country based on ZIP code or address details.
Hi,
Maybe we'll need more details about what you're trying to achieve but you can find details about France (or other countries) from the MAPS* libraries you should have access to.
But my understanding is that you want to position points on a map based on an address.
In that case, if you want to use an address to get the coordinates, you will need to get the lookup data (available with SAS9.4 Maintenance 4 for US, canada, UK and australia, not France) and use the GEOCODE procedure.
You may find those 2 articles useful:
PROC GEOCODE: Now with Street-Level Geocoding
PROC GEOCODE: Finding Locations Outside the U.S.
Cheers,
Damo
Thnaks Damo,
If we have only City and address column then how to derived the longitude and latitude details with Proc Geocode.
City and address have in local language.
Please advise.
There are sources of French Postal Codes. For example:
https://www.aggdata.com/free/france-postal-codes
I no nothing about this data nor how up to date it is.
Perhaps you can put it in the format that Proc GEOCODE needs. Look in the second paper mentioned above or in the Doc files on http://support.sas.com/
If you have the city and want to do a City geocoding, look at the second paper that is mentioned above. There is a world geocoding lookup for cities.
I am very new to Geocode.
If input dataset is in local language how this will impact output result
and
Could you please share the sas codeing to dervive latitude details. We have sas 9.4 M3 version. all the maps data alredy downloaded.
If we have only City and address column then how to derived the longitude and latitude details with Proc Geocode.
City and address have in local language.
Please advise.
All the example code is here (for this paper):
http://support.sas.com/rnd/papers/#2013
Look for the title of the paper: PROC GEOCODE: Finding Locations Outside the U.S.
Under that are two links. One for the paper and one for a Zipfile of the examples.
You need to look at MAPSGFK.WORLD_CITIES to see if the city names match. Look at the other columns to see if matches your data (such as MapIDName).
When I submit the sas code its throw error like....'Failed to transcode data from U_UTF8_CE to U_LATIN9_CE' I am running Enterprise Guide.
Is it failing in Proc GEOCODE? Or something else? What file are you opening that is failing? I don't think it is MAPSGFK.WORLD_CITIES since it isn't UTF8. Is your address data set UTF8?
I think you will need to talk to Tech Support. I suspect that your data set is UTF8 and you need to invoke SAS as a UTF8 session but I do not know how to do that with Enterprise Guide. Tech Support will be able to help you.
Yes...I got the error in Proc geocode. Below is my code.....
data input;
input city$;
datalines;
Paris
;
run;
proc geocode
method = city /* City method */
data = input /* Addresses to geocode */
out = work.geocoded /* Geocoded data set */
lookupcity = mapsgfk.world_cities /* Default world lookup data */
addresscityvar = city /* Req’d. city name */;
run;
Please let me know how we can fix this issue
any update on above?
Hi,
As mentioned by @Darrell_sas previously, you may want to contact Technical Support in order to troubleshoot the issue related to the encoding error.
Details are available from https://support.sas.com/techsup/contact/
Cheers,
Damo
Thanks
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.