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.
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:
I hope this helps,
Sam
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.
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.
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.
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.
@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!
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.