Recently, Scott Jackson, Director Business Intelligence at the University of North Carolina at Chapel Hill shared their data quality, reporting and analytics journey. They're using SAS in a multitude of ways – from operations, institutional research, athletics – and are now looking to scale to the enterprise. They've been so successful [...]
In SAS Visual Analytics 8.3, a Data View is a reusable and shareable template for a data source. That means that the data view is tied to the data source, and not to the report. If you update a data view it will not automatically propagate those changes into a report.
So, what can a data view do for you? Plenty! Here are just a few of the settings and customizations that a data view can save for a data source: (taken from documentation here):
- Data item settings such as names, formats, classifications, and aggregations
- Data source filters
- Derived data items
- Calculated items
- Custom categories
- Duplicate data items
- Show / hide status for data items
- Unique row identifier selection
Create a Data View
Now you must be wondering, how do you save all these wonderful customizations for your data source? Answer: by creating a Data View.
To get started, use the Data Source menu and select Save data view…. In this example, I created a hierarchy for the SASHELP CARS data set but as you can see from the list above you could have created many more calculations, custom categories, etc.
Then give the Data View a name. A few other things you may notice about this Save Data View dialogue are the options for: Default data view and Shared data view.
Default data view
A default data view is automatically applied whenever the data source is added to the report.
Each user can create their own data view of the source data and select their own default data view. This could lead to each user having a personalized default view. But, what if you want share your data views with others on your team? Or have everyone start with the same default view? That is when you need to first be an Application Administrator and second use the Shared data view option.
Shared data view
In order to be able to share a data view, you must be an Application Administrator. Then the option to share a data view will be available. Once a data view is shared for a data source, other users with access to that data source will be able to apply that data view.
Apply a Data View
Data views are templates of saved settings, hierarchies, custom categories, calculated data item, etc. which can be combined in an infinite amount of ways. Therefore, it follows that multiple data views can be applied to the same data source. In the example above, I created a new hierarchy for the SASHELP CARS data set. But I could also create a new data view which changes the aggregation of the MPG measures to reflect the average aggregation and not the default sum aggregation.
To apply a data view: open a new report, select your data source, then use the Data Source menu and select Data views…. You will see any individually created data views as well as any shared data views. Highlight the data view you wish to apply, then select Apply. Repeat for all of the data views you wish to apply.
If any data items are duplicated with the addition of data views then, as shown below, those data items are given a (n) after their names.
Administrator-controlled Default Data View
We've learned what Data Views are and that we can share them. How can we ensure that all the users who select a data source get the same starting point with a particular data view? To set this up, you must be an Application Administrator and the Data View must be Shared.
Once these two criteria are met, you can navigate to the report's overflow menu and select Edit administration settings. Then select the data source and which data view to apply as the default for all users.
Caution: If the user has already selected a personal default data view, then the personal default data view overrides the administrator-set default data view. Remember that an individual user can apply a personal or another shared data view and override the default data view.
Data Views are just one of the exciting new features in SAS Visual Analytics 8.3. A few key points to remember:
- Data Views are tied to a data source, not a report. If a data view is edited, those edits do not propagate to the reports that applied that Data View.
- A data source can have multiple Data Views applied.
- Only an Application Administrator can share a data view with other users as well as define a default data view for a data source for all users. Any personal defined default data views override the administrator-set default data view.
- Data Views are a template of data settings and edits – not a fully robust semantic layer where updates are pushed to all instances of usage. While Data Views can be used to assist in defining commonly used calculations and custom categories, remember that each user can still create their own data views and thus override the administrator-set default.
Introduced with SAS Visual Analytics 8.2 is a new object named: Key Value. The intent of this object is call attention to an aggregated value for a measure, a category, or both. For additional specifics,
I’ve mocked up several reports to show some of the combinations available to give you an idea of what the Key Value object can look like. Toward the end of the blog, I will add additional reports to provide design ideas for placement and action assignments. Click on any image to enlarge.
Text Style with Measure Value Highlight
Here you can see in the report, I am highlighting two measure values. Both are representing the Highest value but I selected one to show the aggregation and the other not. I was able to mimic similar headings by renaming my data item. Be sure to look at the Options and Roles pane for the assignments to understand how I accomplished this.
Infographic Style with Measure Value Highlight
Here is the same information represented using the Infographic style. Seeing the same report using the different styles allows you to quickly determine the most powerful and appropriate visualization to meet your needs. We cannot control the size of the circle, only the color. In this case, the circles are different thicknesses because of the number of characters used to represent the measure values inside the visual.
Text Style displaying both Measure Value and Category
In this report, I have shown how to use the Text style to display both a Category value and a Measure value. As you can see, only one can be Highlighted, i.e. given the largest font. Notice that in this report I used the object’s Title to help explain the key value being displayed, this is a recommended best practice.
Infographic Style displaying both Measure Value and Category
Below I am using the Infographic style and notice in the Options pane below that I had to use the Additional information attribute to better label the data. Make sure that when you are in the design phase and toggling between text and infographic to review and test the available Key Value Style attributes to better label the visual.
Text Style with Category Value Highlight
In this report, I show how to highlight the Category value using the Text style. Since I chose to not use any of the available label attributes it is critical that I use the object’s Title to better explain the key value displayed.
Infographic Style with Category Value Highlight
In this report, you can see how I changed the layout from the previous report to make the Key Value object side-by-side the other report objects. If you are interested in using the Infographic style with the circle enabled then you may have to adjust your report design to accommodate for the space the circle needs to display. Remember not to shy away from adding white space to your report, it can assist when adding emphasis to a particular visual, in this case a key value.
Some important things to remember about using the Key Value object in your reports:
- Use the Key Value object’s Title to inform your users what the number or category value represents so there is no ambiguity as to if they are looking at the maximum or minimum value.
- When determining which style you prefer, Text or Infographic, it may be easier to make a duplicate of the Page and then adjust the style attributes till you find the desired combination.
- Take time to adjust the arrangement of objects on your report to get the most pleasing configuration. Don’t shy away from leaving white space in your report. You can also experiment with the Container object using the Precision container type to layer the Key Value object.
- The Key Value object will be affected by Report and Page Prompts like any other report object and you can even define Actions to filter the Key Value object.
Here are some additional examples of using the Key Value object:
In this example, you can see from the Actions Diagram how the Key Value object is being filtered. First, by the two page prompts and second, there is a direct filter action defined from the List Control object
In this example, we can see from the Actions Diagram that I used the Container object. I then selected the Precision container type and overlaid the Key Value object on the Line Chart. The only filters applied to these report objects are the page prompts.
And in this last example, you can see how I have no Report or Page prompts or any other filters impacting the Key Value objects. Therefore, these values are representative for the entire data.
As a resident of Northern California, I was interested in learning more about the causes of wildfires. My area has recently experienced large fires that caused many residents to evacuate their homes and some who have even lost their lives. Last October there were more than 170 fires that burned [...]
We hear a lot about how various industries are using data visualization and analytics. But what about the education industry? The institutional research office (IR) at universities is the center for data, reports and analytics and provides decision makers with information about the university. The IR teams are working on [...]
In SAS Visual Analytics 8.2 on SAS Viya 3.3, there are a number of new data features available. Some of these features are completely new, and some are features from the 7.x release that had not yet been included in the 8.1 release. I’ll cover a few of these new features in this post.
First of all, the Data pane interface has changed to enable users to access actions via fewer and better organized menus.
Data item properties can also be displayed for viewing or editing with a single click.
The new Change data source action displays a Repair report window if report data items are not in the new data source. The window enables you to replace the missing data items with replacement data items from the new data source before continuing with the change.
Speaking of mapping, in SAS Visual Analytics 8.2, linked selections and filters can automatically be add to objects, and the objects may use different data sources. In that case, you can manually map data sources from the data pane. The + icon enables you to add additional pairs of mappings.
When you create a new Geography data item in SAS Visual Analytics 8.2, in addition to using Predefined names and codes or your own custom latitude and longitude data items, you can now also use custom polygon shapes to display your own custom regions. Once you select Custom polygon shapes, you specify, in additional dialogs, the characteristics of your polygon provider. You can use a CAS table or an Esri Feature Service.
For more information on custom polygons, see my previous blog here.
If you need to use and Esri shape file for your polygon data, there are macros available in VA 8.2 to convert the data to a SAS dataset and to load the data into CAS.
- %SHPCNTNT display the contents of the shape file
- %SHPIMPRT converts the shapefile into a SAS dataset and loads it into CAS.
The Custom Sort feature is also back in SAS Visual Analytics 8.2. Just right-click the data item, select Custom sort, and then select and order your data values.
For creating a new derived data item, there are several new calculations available for measures:
And speaking of creating calculated data items, you’ll want to check out three useful new operators that are available in SAS Visual Analytics 8.2:
SAS Viya provides import and export functionality for user-created content like reports and data plans. Often, in addition to content, an administrator will want to save configuration so that it can be reloaded or updated and applied to a different system. SAS Viya provides the capability to save and reload configuration using the SAS Viya command-line interfaces that are previous blog post.
It is possible to save a set of configuration settings and reload them to the same or a different system. This can be useful when you have your configuration established and you wish to keep a backup, or make a selective backup of configuration prior to making a change.
The connection to LDAP is a key early step in a SAS Viya implementation. With the configuration CLI, once you have the SAS Viya LDAP configuration established, you can export it to a file, and then use that file (with any necessary modifications) to stage additional systems, or as a backup prior to making changes to your existing systems configuration.
How to save and reload configuration
./sas-admin configuration configurations list --definition-name sas.identities.providers.ldap.user --service identities
Next, using the id from the previous step you can list the configuration properties.
./sas-admin configuration configurations show -id b313a5a7-1c73-4f4a-9d3d-bba05b626939
Save LDAP Configuration
The save process creates json files. The following steps use the download command to save to json files the connection, user and group configuration instances for the SAS Viya connection to LDAP.
./sas-admin configuration configurations download --target /tmp/ldapconnection.json --definition-name sas.identities.providers.ldap.connection --service identities ./sas-admin configuration configurations download --target /tmp/user.json --definition-name sas.identities.providers.ldap.user --service identities ./sas-admin configuration configurations download --target /tmp/group.json --definition-name sas.identities.providers.ldap.group --service identities
You should open the json files and check that the correct configuration has been saved. It is possible for the process to complete without errors and return json that is not what you are expecting. This would cause problems with your reload, so checking the saved json is important.
You can keep the JSON file as is, or make changes to key attributes. You may want to do this if you are importing to a different system.
Load the SAS Viya LDAP Configuration
To load you simply use the update command and pass the json file.
./sas-admin configuration configurations update --file /tmp/ldapconnection.json ./sas-admin configuration configurations update --file /tmp/user.json ./sas-admin configuration configurations update --file /tmp/group.json
The impact of isDefault
There is a value, isDefault, stored within the configuration which has an impact on the persistence of changes made to configuration.
isDefault impacts how services treat existing configuration when a service starts. When a service starts a setting of:
- isDefault=true in the existing configuration means the service will overwrite the configuration object with new defaults.
- isDefault=false in the existing configuration means the service will NOT overwrite the existing configuration object.
In other words, if the configuration is flagged as “default” then the service is permitted to update or add to the default values.
Objects created by the services at startup always have isDefault set to true. Objects created in Environment Manager always have isDefault set to false. This means changes in Environment Manager are always respected by services on restart, they will not be overwritten. But services are allowed to overwrite their own defaults at startup.
When using the CLI, the administrator needs to decide what is the appropriate value for isDefault. If you require the configuration change to persist across service restarts then set isDefault=false.
Saving and Reloading Micro-Service Logging Levels
Let’s look at another use case for save and reload of configuration. Updating micro-service logging configuration levels in batch can be very useful. You may want to save your current logging configuration and modify it to raise logging levels. You may create multiple json files with different logging configurations for different scenarios. When debugging an issue in the environment you could load a verbose logging configuration. If you wish to keep the new configuration you would edit the json and set IsDefault=false.
The step below saves all configuration instances created from the logging.level configuration definition. These configuration instances control the logging level for the SAS Viya microservices and servers.
./sas-admin configuration configurations download --definition-name logging.level -target /tmp/default_logging.level.txt
If you wish to persist your new logging configuration, edit the file to set metadata.isDefault=false, save the new file and then and update the logging configuration using the update command:
./sas-admin configuration configurations update --file /tmp/new_logging.level.txt
When you are done, you can use the original file to reset the logging level back to default values.
In most cases a server restart is not required after a configuration update, find details in the administration guide.