Kick-start Your Data Exploration Journey with SAS Information Catalog
Recent Library Articles
Recently in the SAS Community Library: @smanoj introduces you to the SAS Information Catalog, which provides a powerful search engine to find needed data assets.
Empowers the Academic Community! Part 2 of 3.
Welcome back to our journey through the latest upgrades in SAS Visual Analytics in SAS Viya for Learners 4 . In part 1, we delved into the general enhancements. Now, let's zoom in on one of the most significant enhancements: the process of creating data items including calculated expressions and dynamic features. So, buckle up and get ready to revolutionize your data with SAS Visual Analytics.
Custom Categories: The custom categories interface has been enhanced with a new look and feel. The interface is more compact and easier to use. For interval groups, a visual shows how large each interval is compared to all other intervals.
You can also automatically generate groups from measures. You can specify the number of groups to generate. Equally sized ranges will be created, and you can edit those ranges.
Outlier detection: The new Insights window identifies possible outlier values in the data for the objects in your report. It provides a new outlier analysis pop-up window that shows how outlier values affect your data.
Measures in the Data pane are automatically checked for possible outliers. An icon appears beside measures that might have outlier values.
Expression Builder: The visual expression builder has been overhauled upgraded to use a new editor called, Monaco.
Selecting a function will automatically display the interface on the right side of the dialog, and previews will be generated automatically at the bottom of the dialog. The expression builder also includes typeahead, tab autocomplete, and hint features, dynamically giving people help along the way as they type. The new interface includes a help menu. This menu is new to SAS® Visual Analytics and describes exactly what each argument does with in the function.
A new Abbreviate numeric values option enables you to specify the scale and digits of precision.
Additional enhancements:
The min() and max() operators are now supported for dates and datetimes.
The term “quick calculation” replaces “derived item” for data items that you can create by using the new calculation pop-up menu selection on the Data pane.
Hovering over a calculated data item will reveal its expression without needing to edit the calculation.
Axes for time-series objects, line charts and more support logarithmic scales.
Excited to check out all the new features in SAS Visual Analytics in SAS Viya for Learners? Educators and students can sign up for free access to SAS Viya for Learners using an academic email address.
Stay tuned for my upcoming post unveiling the thrilling updates to Objects! Did you miss my first post on General Enhancements? If so, you can find it here:https://communities.sas.com/t5/SAS-Communities-Library/Unveiling-the-Latest-Upgrades-SAS-Visual-Analytics-Empowers-the/ta-p/932246
... View more
Watch this Ask the Expert session to learn how you can create reports in SAS Visual Analytics more efficiently using page and object templates.
Watch the webinar
You will learn how to:
Use existing page templates to build pages more efficiently.
Create custom page templates that meet the needs of your organization.
Create object templates to customize and streamline your reports.
The questions from the Q&A segment held at the end of the webinar are listed below and the slides from the webinar are attached.
Q&A
Answered
I currently use SAS 9.4. Is the Visual Analytics 8.3 compatible? And if so, how do I add it, or get setup to use it?
SAS Visual Analytics 8.3 is not available on SAS 9.4. Visual Analytics 7.5 is available on SAS 9.4M6. Object templates were introduced in SAS Visual Analytics 8.3 (18w39). The ability to include data with object templates and hare object templates was introduced in SAS Visual Analytics 8.4. Page templates were introduced in Visual Analytics 8.5. Custom page templates were introduced in Visual Analytics 2020.1.3 (February 2021).
What software is this? How do I bring it up?
This is using SAS Visual Analytics, available under Explore and Visualize from the applications menu in SAS Viya. Specifically, the webinar showed features available in SAS Visual Analytics 2023.10 (November 2023), although several features were available in earlier versions. Object templates were introduced in SAS Visual Analytics 8.3 (18w39). The ability to include data with object templates and hare object templates was introduced in SAS Visual Analytics 8.4. Page templates were introduced in Visual Analytics 8.5. Custom page templates were introduced in Visual Analytics 2020.1.3 (February 2021).
Can you edit object templates?
You cannot edit object templates. Once you use an object template, you can make changes to it. You can modify options, you can modify data, but it doesn't change the object template itself. So, if you want to make changes to the object template for the next time you use it, you will need to make the changes and then save a new object template with those changes.
Can I share page templates I’ve created with members of my team?
Yes, but you must be an application administrator. Users can create page templates, modify their own page templates, and delete them. Application administrators, on the other hand, can publish page templates. When an application administrator creates a page template, they have an extra option, Make available to all users. This will publish the custom page template to other users, who will see the published page template when they start a new session or refresh their current session. If you do have specific templates that you think everybody on your team would want to use, instead of creating them individually, you can get an application administrator to create them and then publish them. Once a page template is published, only the application administrator can modify and delete the page template.
Can I make changes to page templates after they are added to my report?
Once you add the page template, you can make any changes you want. You can delete objects, reorganize content, and modify options. Be aware that those changes are not applied to the page template. If you want to make changes to the page template that are applied the next time you use it in a report, you will need to save another page template of those modifications.
Can I share object templates with my team?
Yes, but you must be an application administrator. Users can create, rename, and delete their own object templates. Application administrators, on the other hand, can publish object templates. When an application administrator creates an object template, they have an extra option, Publish. This will publish the object template to other users, who will see the published object template when they start a new session or refresh their current session. If you do have specific object templates that you think everybody on your team would want to use, instead of creating them individually, you can get an application administrator to create them and then publish them. Once an object template is published, only the administrator can rename and delete the object template, but all users can hide them if they won’t be using them.
So, it is not possible to edit an object template and overwrite the previous name?
Visual Analytics is a little bit different from most products. You can have multiple objects with the same name. To make your life easier, it’s a best practice to make changes to an object template, give it a new name, delete the old object template, and then rename the new one. If you use the same name, you might get the object templates confused.
How do we get details about a report? What objects are in the report, what data items (source, column name) are used in an object.
Object templates, page templates, and data views are stored on the SAS Infrastructure Data Server and are stored in the SAS Content/Products/SAS Visual Analytics/Resources folder. When you export the content, a JSON file is created. Some information about the content is available in the JSON file.
There are also several codes you can use to access additional information:
Ctrl + Alt + B will open the Visual Analytics diagnostics window. This window shows you the JSON (or XML) used to render the report. From this window, you can see details about the data, the visuals, the prompts and parameters, the view of the report, the actions, the display rules, and the styles. This window can also be used to save the report as a file and import it into another folder or another environment.
Ctrl + Alt + Q will open the Query Diagnostic tool. This tool can be used to investigate the issues concerning the queries that SAS Visual Analytics generates for the CAS (Cloud Analytic Services) server. This tool can help you pinpoint which objects and queries are causing performance issues.
Ctrl + Alt + P will open the performance statistics window. This window shows the time and elapsed time needed to render the data, the report, and the application. This window can help you pinpoint which objects and queries are causing performance issues.
Ctrl + Alt + U will open the Report State window. This window shows the state for each element in the report.
In addition, you can see details about all content in SAS Viya using SAS Lineage. SAS Lineage provides a business-level impact analysis view of the assets in SAS Information Catalog. You can use SAS Lineage to view assets, their sources and outputs, and the relationships between them. For more information on SAS Lineage, see “Viewing Lineage” in the SAS Viy Platform: Data Preparation documentation. For more information on SAS Information Catalog, see the SAS Information Catalog documentation.
Recommended Resources
SAS Visual Analytics: Use Object Templates for consistency and faster report development
Sharing Data Views and Object Templates with other Viya environments
Documentation: Using Page Templates
Documentation: Using Object Templates
Please see additional resources in the attached slide deck.
Want more tips? Be sure to subscribe to the Ask the Expert board to receive follow up Q&A, slides and recordings from other SAS Ask the Expert webinars.
... View more
I have data which has already been aggregated like this:
Category
Groups
People
A
23
235
B
45
754
C
12
89
And I want something like this (prefer Proc Report for the bells and whistles)
Category
Groups
Groups Percent
People
People Percent
A
23
28.8%
235
21.8%
B
45
56.3%
754
69.9%
C
12
15.0%
89
8.3%
Total
80
100.0%
1078
100.0%
All the examples I can find online seem to use dis-aggregated data.
... View more
Hello, With this syntax: proc sgplot data=plot ;
vbox value / category=DV group=genre ;
run; SGPLOT produces a VBOX with different colors for the two groups defined in GROUP= See graphs below. Instead, I would like the two levels of groups (liteary and popular) to have different patterns (for instance, small dots for one and small x for the other). I have been looking into various options with ATTRMAP, but I do not seem to be able to get it. Suggestions?
... View more
Dear All, I am writing a custom objective function in the PROC IML environment where I want to estimate 56 parameters. Of these, I have 51 are week fixed effects and the rest 5 are parameters of interest. I want to conduct the estimation on a dataset with 4,037,641 rows. The code below works but takes very long; no output in over 16 hours. However, for a sub-sample of 23,809 rows, the code executes in 4:45.73 real-time and 1:38.68 CPU time. I would like your suggestions on ways to optimize this code. Thank you in advance. Best, Rakesh proc iml;
/************************/
/*Read relevant variables from the data into a matrix X*/
varNames = {"seq" "position" "usage_upto" "lag_mean_usage_after_p" "credits_left" "sl_fixed_effect" "pos_fixed_effect" "max_pos" "wk" "choice_p" "chosen" "week_fe_scroll"};
use scroll;
read all var varNames into x;
close scroll;
/************************/
b = uniqueby(x[,1],1)`; /*starting points in each session*/
u = unique(x[,1]);
b = b ||(nrow(x[,1])+1); /* trick: append (n+1) to end of b for taking care of the last session*/
param = {3.354 -0.097 -2.538 0.146 0.002 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0}; /*set initial parameter values for models with CHOSEN VARIABLE*/
start LogLik(param) global(x,b);
s = j(1, ncol(b)-1,.); /*Create an empty matrix to store probability of each session*/
do i = 1 to ncol(b)-1;
idx = b[1,i]:(b[1,i+1]-1);
/*Extract unique session Ids in vector u*/
pos = x[idx,2]`;
sess_usage_upto = x[idx,3]`;
lag_use = x[idx,4]`;
sess_credits = max(x[idx,5]`);
sl_fe_scroll = max(x[idx,6]`);
sl_pos_scroll = max(x[idx,7]`);
max_pos = max(max(x[idx,8]`),3);
wk = max(x[idx,9]`);
choice_p = x[idx,10]`;
chosen = x[idx,11]`;
wk_fe_scroll = x[idx,12]`;
/************************/
/*Create a vector for transaction probability at all positions. Create the probability of observing the choice at each position (choice_mult)*/
choice_mult = (choice_p##chosen) # ((1-choice_p)##(1-chosen));
/************************/
/*Create a vector for probability of scrolling further at all positions
The seller always scrolls further from the first two positions*/
if wk = 52 then k = 0; else do; z = wk + 5; k = param[z]; end;
sc = logistic(param[1] + param[2]*pos + param[3]*(sess_usage_upto/pos) + param[4]*lag_use + param[5]*sess_credits + k);
sc[1,1] = 1; sc[1,2] = 1;
choice_mult_sc = choice_mult # sc; /*multiply choice prob and scrolling prob at each position*/
/************************/
/************************/
/*Create a vector for probability of ending at all positions greater then the maximum position
Up to the maximum position, the probability of ending is 0*/
ed = 1 - sc;
ed[1, 1:max_pos-1] = 0;
choice_mult_ed = choice_mult # ed; /*multiply choice prob and scrolling prob at each position*/
/************************/
/************************/
/*Compute the probability of a sample path for all possible end points in a session. Store each probability in a vector called LL*/
lag_prod_sc = lag(cuprod(choice_mult_sc))`;
lag_prod_sc[1,1] = 1;
LL = lag_prod_sc # choice_mult_ed;
if LL < 1/(2**500) then LL = 1/(2**500);
/************************/
s[i] = log(10*sum(LL)); /*Probability of aN OBSERVED session is the sum of all sample paths */
end;
return sum(s);
finish;
/************************/
/*Maximize sum(s)*/
optn = {1, /* 3. find max of function, and */ 2}; /* print moderate amount of output */
con = {. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ,
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .};
call nlpnra(rc, xres, "LogLik", param, optn, con);
/************************/
quit;
... View more