BookmarkSubscribeRSS Feed
japsas100
Pyrite | Level 9

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.

13 REPLIES 13
Damo
SAS Employee

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

japsas100
Pyrite | Level 9

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.

Darrell_sas
SAS Employee

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/

 

Darrell_sas
SAS Employee

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.

 

japsas100
Pyrite | Level 9

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.

japsas100
Pyrite | Level 9

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.

Darrell_sas
SAS Employee

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).

japsas100
Pyrite | Level 9

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.

Darrell_sas
SAS Employee

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.

japsas100
Pyrite | Level 9

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

japsas100
Pyrite | Level 9

any update on above?

Damo
SAS Employee

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

japsas100
Pyrite | Level 9

Thanks

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 13 replies
  • 2772 views
  • 0 likes
  • 3 in conversation