BookmarkSubscribeRSS Feed
balraj
Quartz | Level 8

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.

 

6 REPLIES 6
Sam_SAS
SAS Employee

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

balraj
Quartz | Level 8

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.

 

 

Sam_SAS
SAS Employee

 

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.

 

Darrell_sas
SAS Employee

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.

Sam_SAS
SAS Employee

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.

nsaha
SAS Employee

@balraj Hi Balraj! I saw the data that you have uploaded of Indian states and in there you have Dadra and Nagar Haveli. I am just curious to know were you able to map Dadra and Nagar Haveli. I am trying the same and for me Dadra and Nagar Haveli goes unmapped. Please let me know if you are able to map it. Many Thanks!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 2706 views
  • 3 likes
  • 4 in conversation