Creating Region Maps in SAS Viya – VA 8.4 Report

A versatile AI agency offering end-to-end solutions across  various industries. We specialize in tailored.

March 13, 2025
Introduction:
There is an Object “Geo Map” in SAS Visual Analytics 8.4. Using Geo Map, the Bubble map, Co-ordinate map, Contour Map and Region Map can be created. But for Region Map the main requirement is Polygon Data.
What is Polygon Data?

The Polygon data is a set of several Latitude and Longitude and these Latitude and Longitude together create the boundary of a state. If one Latitude and longitude is available for a state then we can show Bubble map only not Region Map. The Polygon data can be downloaded from Website or purchased from ESRI. The Polygon data mainly contains five files:

Here “Area” is the name of file, it may be different for shape files but the extension of polygon data should be ‘cpg’, ‘dbf’, ‘prj’, ‘shp’ and ‘shx’. All these files are necessary for Region Map.

Ways to make SAS Dataset for Region Map:
There are two ways to make the data usable for Region Map:
1. SAS Code for Polygon Data:
Figure 1: Code to convert shape file into SAS Dataset
2. Data available from SAS:

SAS also made available polygon dataset. There are three library present “MAPS”, “MAPSGFK” and “MAPSSAS” in SAS EG / SAS Studio. These library contain the dataset of all the countries at State level.

Figure 2: Polygon dataset in libraries in SAS EG
For each country, two tables are available. So we have to join the tables by ID column.
Import SAS Dataset in SAS Viya VA:
Steps:
Figure 3: Importing dataset in SAS Viya VA
Now, the data is imported in CAS and you can see the all variable available in data in SAS Viya VA.
Configure the Geography Item:
Steps:
Figure 4: Creating New Custom Polygon Provider
6. Fill the information mentioned in below images:
Figure 5: Entering Information in Library and Table
Figure 6: Entering Information in ID Column

In Figure 6, the “ID Column” is DISTRICT but if any ID variable available in your data that represent the location, then you can also select that.

7. Next, after filling the below information, you can see that the data is 100% mapped.
Figure 7: Select Region ID and Latitude & Longitude
8. Now, drag and drop the new created geography variable (“Area” in my case). Go to the Options and select “Region Map” in “Map Type” and click on “Map Background” icon.
Figure 8: Final Region Map in SAS Viya VA
In Map Service option, you can change the background map. Here is the Region Map of District Level.
Thus, we can create the region map for the country, state, tehsil and city based on availability of polygon data.

Leave A Comment

Cart (0 items)

Create your account