Data visualization with SAS programming

About GEO MAP

Reply
Frequent Contributor
Posts: 84

About GEO MAP

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.

SAS Employee
Posts: 54

Re: About GEO MAP

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

Frequent Contributor
Posts: 84

Re: About GEO MAP

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.

SAS Employee
Posts: 170

Re: About GEO MAP

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/

 

SAS Employee
Posts: 170

Re: About GEO MAP

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.

 

Frequent Contributor
Posts: 84

Re: About GEO MAP

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.

Frequent Contributor
Posts: 84

Re: About GEO MAP

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.

SAS Employee
Posts: 170

Re: About GEO MAP

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

Frequent Contributor
Posts: 84

Re: About GEO MAP

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.

SAS Employee
Posts: 170

Re: About GEO MAP

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.

Frequent Contributor
Posts: 84

Re: About GEO MAP

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

Frequent Contributor
Posts: 84

Re: About GEO MAP

any update on above?

SAS Employee
Posts: 54

Re: About GEO MAP

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

Frequent Contributor
Posts: 84

Re: About GEO MAP

Thanks

Post a Question
Discussion Stats
  • 13 replies
  • 213 views
  • 0 likes
  • 3 in conversation