09-29-2015 09:50 AM
09-29-2015 10:02 AM
SAS Visual Analytics has predefined geographic information for countries and states, but not for cities.
If you add the latitude and longitude coordinates for the cities to your data set, then you could plot the cities by defining a custom geographic role within VA.
The documentation for that task can be found here:
I hope this helps,
09-29-2015 10:06 AM
First of all, thanks sam for timely reply.
so for all the cities in a country we've to manually find the latitude and logitude and add those columns into the dataset and then use them.
is there any alternate method.
09-29-2015 10:45 AM - edited 09-29-2015 10:52 AM
I believe that is the way, but ideally you would obtain a table with the city names and coordinates, and then import and merge that table into your data.
Base SAS 9.4 ships with the mapsgfk.World_cities dataset which contains the longitude and latitude for 3,200 cities in India (and many others worldwide). This is a huge dataset, so you would likely want to subset it before importing and merging it.
There also many free sources and paid sources online for city coordinates.
09-29-2015 01:40 PM
Actually, MAPSGFK. WORLD_CITIES is in SAS/Graph. And if you have MAPSGFK, then you have Proc GEOCODE which will let you give it a list (data set) of cities that you want and getting the lat/longs back for those cities (using MAPSGFK.WORLD_CITIES). You can just use the cities in WORLD_CITIES with ID="IN" (India) and get a list of the Name of the city and the Lat/Long. But using Proc Geocode will let you make sure your list of city names is spelled the same as the MAPSGFK list.
09-29-2015 02:06 PM
That is a good addition, Darrell. World city lookup was added to GEOCODE after the time when I supported it.
The PROC GEOCODE documentation can be found here:
It has a helpful example program showing world city lookup.