Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Geo Region Map for India with drilldown state -> city

Reply
Frequent Contributor
Posts: 80

Geo Region Map for India with drilldown state -> city

Hi Community,

 

I'm trying to plot a Drilldown using SAS VA 7.2 using "Geo Region Map" object. I'm able to plot the State but unable to plot the city.

 

-> state(geography) with property (subdivision names)

For city whatever i tried it went in vain.

Attached is my sample data.

 

Attachment
SAS Super FREQ
Posts: 296

Re: Geo Region Map for India with drilldown state -> city

Hello Balraj,

 

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:

https://support.sas.com/documentation/cdl/en/vaug/68648/HTML/default/viewer.htm#n0lwmd82he8anen1qnau...

 

I hope this helps,

Sam

Frequent Contributor
Posts: 80

Re: Geo Region Map for India with drilldown state -> city

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.

or

is there any alternate method.

 

 

SAS Super FREQ
Posts: 296

Re: Geo Region Map for India with drilldown state -> city

[ Edited ]

 

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.

 

SAS Employee
Posts: 170

Re: Geo Region Map for India with drilldown state -> city

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.

SAS Super FREQ
Posts: 296

Re: Geo Region Map for India with drilldown state -> city

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:

http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#p1rlyxczwqwolvn1k...

 

It has a helpful example program showing world city lookup.

Ask a Question
Discussion stats
  • 5 replies
  • 776 views
  • 3 likes
  • 3 in conversation