BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Zorac
Fluorite | Level 6

Hello community,

 

I am new to SAS Visual Analytics / SAS Viya and currently exploring how to visualize postal areas. My goal is to depict postal code regions with associated metrics.

 

I would greatly appreciate guidance on:

  1. Whether SAS Viya supports 8-digit postal codes or any similar custom postal code regions for Germany? ("An 8-digit postal code refers to a highly specific area within Germany, known as PLZ8 (Postleitzahl 8), which is a more detailed subdivision of the standard 5-digit postcode system."

  2. How to best integrate custom shapes / polygons for visualization.

  3. Any documentation or best practices for visualizing postal code areas with associated metrics in SAS Visual Analytics.

Thank you very much for any advice or pointers!

Kind regards,

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

It is best to start with the documentation: https://go.documentation.sas.com/doc/en/vacdc/v_035/vareportdata/p031vp9uc5y5iun0zipy3c1trkqn.htm please choose the proper version that you are using.

 

Basic Steps:

 

View solution in original post

4 REPLIES 4
BrunoMueller
SAS Super FREQ

It is best to start with the documentation: https://go.documentation.sas.com/doc/en/vacdc/v_035/vareportdata/p031vp9uc5y5iun0zipy3c1trkqn.htm please choose the proper version that you are using.

 

Basic Steps:

 

Zorac
Fluorite | Level 6

Thank you @BrunoMueller  for your reply, it helped a lot!

I’ve imported custom polygon data (shp) into SAS Visual Analytics that contains coordinate pairs describing region boundaries.
I was able to generate a Geo Coordinate map using these values (with coordinate space set to Web Mercator), and the points display correctly on the map.

However, the lines between the coordinates are not connected, so the polygons are not forming closed shapes.
I don’t have access to an ESRI connection or public shape data, so I’m working entirely from a locally provided shapefile that’s already loaded in CAS.

Is there a way to visualize these regions as connected line or polygon geometries directly in Visual Analytics?

 

Thanks in advance!

Stu_SAS
SAS Employee

Hi @Zorac, can you:

  1. Post a screenshot of what the postal code areas look like in Visual Analytics
  2. Attach the shapefile or make it available for download if it is public data

When lines do not connect as expected, this is usually indicative of Visual Analytics not knowing the correct row order. In a nutshell, Visual Analytics connects the dots of vertices, and if the order of the dataset is wrong, it can look pretty weird. Data loaded to CAS is not guaranteed to have an order since it is a multithreaded, distributed environment. In order to ensure the right order, a Sequence variable is needed to tell Visual Analytics what order the shapes should be drawn.

 

When you load your shapefile with PROC MAPIMPORT, load it onto compute first and use PROC GREDUCE if needed. Afterwards, create a sequence variable:

 

data shapefile;
    set shapefile;
    sequence+1;
run;

Perform any additional data manipulation as needed, then load it to CAS. Specify that variable for the Sequence role when adding it as a geographic provider. In later versions of Viya, you can also do this with the ADDROWID option:

 

data caslib.shapefile(addrowid=yes);
    set shapefile;
run;

 

Zorac
Fluorite | Level 6

Hi @Stu_SAS,

 

Thank you for the hint. Sadly, I cannot share the shapefile since it contains sensitive private data. Yesterday I managed to get administrator rights and registered the shapefile as a geographic data provider for polygon analysis. That solved the issue, and after using the new geographic item based on my PLZ, the correct polygons were displayed. 

 

 

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
  • 4 replies
  • 267 views
  • 2 likes
  • 3 in conversation