SAS Visual Analytics: Maps and Data! Come on Down!
When I was younger I would watch the Price is Right with my grandma – we loved to hear the announcer say, “Come on DOWN!” There was so much excitement and enthusiasm as the selected contestant ran screaming down the aisle! It’s exactly how I felt when I saw how awesome the maps were in the SAS Visual Analytics (VA) tool. [Check this post for a basic VA tool overview and where to find more examples.]
In one of the And Data lab systems I have been busy preparing some customer demos. It’s always fun to show data on a map to help the customers understand the system capabilities. Usually it means using a stored process with PROC GMAP [see this paper or this video for a details] to display the data in SAS BI Dashboard or SAS Web Report Studio. It always piques interest.
Let’s Do Some Visual Analytics People!
When preparing the demos or papers, the first thing you need is a data source. For this blog, I use Clicky.Com to collect the statistics about the visitors, which I can download through their API and load into a SAS dataset. Clicky provides the country_code along with the latitude and longitude for each site visitor. From listing the data I know that visitors from the countries most represented are US, India, UK, Canada, and Australia, but I don’t know much over that. I’m hoping the Visual Analytics can bring some insight about the particulars.
For the demos, I am running SAS VA 6.1 on a single server, which is considered a non-distributed deployment. Basically this means I am missing the fancy relational database hookup or co-located data provider. For the small amount of data I have – this works okay. However since the data loads into memory, I am limited by the lab system and thus I’m missing some of the super fast VA data processing bravado. <heavy sigh>
Working with the Data
At first, I was a little surprised that SAS Management Console was an integral part of VA. You create libraries and register data just as you would for SAS BI. SAS VA is intended to work with databases but you can use CSV imports, spreadsheets, and even SAS datasets, which is what I have done.
After you have a dataset registered in the SAS Management Console, you can view and manipulated it in the Visual Data Builder, which creates a metadata object that is essentially a view, but is called a query This application is the most like SAS Information Map Studio. It allows you to join data tables and create new data items. When creating new data items, you can use SAS functions, such as YEAR or simply select how the variable is aggregated (ie, SUM, AVG, etc). It also writes SQL code, which you can edit.
After I drag the dataset to the main work area I can make changes and then save the query as WebsiteVisits. Here’s a preview of the data with the columns I want to use. Next I’ll save this query to the SAS Visual Analytics LASR library and load it into the SAS LASR server.
Loading the Data
To load the data into the in-memory area, I switch to the SAS Visual Analytics Administrator application. This application allows me to manage the environment, such as start/stop servers and load/unload tables. This part is different from the SAS BI tool. I am loading the data into in-memory area and deciding what data is allowed there.
The green dot indicates the LASR Analytic Server and dataset is active. When I saved the query earlier to the VA LASR libary, it was saved here and ready to load.
Visualize the Data
Once the query is saved and loaded into the SAS LASR server, I can use the SAS Visual Explorer to play with the data. First I want to see if the data by country is interesting enough to show others. By clicking a variable to plot, such as country_code or geo_location, I can associate the latitude and longitude with the variable as shown below. And I thought the GMAP Procedure was super easy.
Come On Down!
When I drag the country_code variable into the work area, SAS VA displays a map – automatically! All of the visits are represented by a bubble and the larger the bubble the more users in that area. To complete the visualization, I created some filters so I could the users interested in SAS Enterprise Guide. It starts at the worldview level but I am zooming in to the US level – where most of the blog readers live. Let’s see where the most overly interested ones live – there are some large bubbles along the east coast.
I have zoomed in on Washington DC area so you can see the detail available. Looks like a lot of hits outside of the city, which I suspect is Reston. Uh-oh … could be the NSA. They probably need some tips on aggregating data – I’m just saying.
How about a close-up …. of San Francisco and notice the slider – I’m not even zoomed in all the way. Almost seems like I could go visit the person to see if the post has the answer. I probably better take them a free copy of one of my books while I’m there.
SAS is using the open data source called Open Street Map. Darrell Massengill, SAS Institute, presented a paper at SGF13 about having maps available in the SAS products: Google-Like Maps in SAS. Looks like SAS 9.4 may be a little sexier as well due to these maps as well. You can view his presentation here but it’s mainly focused on coding and not as much about Visual Analytics.
Well – what do you think?
Learn SAS Visual Analytics
When it comes to business intelligence and analytical capabilities, SAS® Visual Analytics is the premier solution for data discovery, visualization, and reporting. Click here to learn more about the book.
Latest posts by Tricia Aanderud (see all)
- Creating a Web Analytics Report in SAS Visual Analytics 8.1 - 2017-06-19
- Designing Dashboards: Sending Your Style Vibe - 2017-01-21
- SAS Visual Analytics: Design Versus Reality - 2016-10-05
- Seize the Day! Submit an #SASGF Abstract - 2016-09-21
- Need a Dynamic X-Axis with Your SAS Visual Analytics Report? - 2016-07-31