UNSW Business School/
Information Systems and Technology Management
Solutions to SAS VA Workbook 1 Practices and Activities
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
Copyright By Assignmentchef assignmentchef
SAS Visual Analytics Workbook:
Compiled/Modified By Date SAS Visual Analytics Jacky Mo Mar. 2022 SAS Viya for Learners
All the SAS Visual Analytics Workbooks will help the students to learn and gain experience and skills in data preparation; data exploration; creating reports; and constructing dashboard.
Reference:
This learning material is extracted from SAS Academic Hub (LWYVA185) with the permission from SAS Australia to use and publish for teaching purpose at the University of Wales.
File Name:
SAS Viya for Learners Solutions to SAS VA Workbook 1 Practices and Activities
Copyright:
This lab workshop material is created for the Business Analytics courses, offered by the School of Information Systems and Technology Management, the University of Wales, Sydney, Australia
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
Solutions to Lesson 3
Solutions to Practices
1. Working with Data Items
a. Open the browser and sign in to SAS Viya. SAS Drive is displayed by default.
b. Open the VA1- Practice3.1 report from the Courses/YVA185/Basics/Practices (HR) folder.
1) In the upper left corner, click (Show list of applications) and select Explore and Visualize. SAS Visual Analytics appears.
2) Click All Reports.
a) In the Open window, navigate to the Courses/YVA185/Basics/Practices (HR) folder. b) Double-click the VA1- Practice3.1 report to open it.
c. View the items in the Data pane. 1) In the left pane, click Data. 2) Answer the questions.
What is the classification of Employee ID? Manager at 1. level? Answer: Employee ID has a classification of category.
Manager at 1. level has a classification of measure.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
What does the Frequency data item represent?
Answer: Because there is one row per employee in the EMPLOYEES_CLEAN
data source, Frequency represents the number of employees. Change the classification for Manager at 1. level to Category.
1) In the Measure group, next to Manager at 1. level, click (Edit properties). 2) For the Classification field, select Category.
Manager at 1. level should now appear in the Category group. Change the format for Annual Salary to Dollar13.2.
1) In the Measure group, next to Annual Salary, click (Edit properties).
2) For the Format field, click (Edit).
a) In the Format window, for the Width field, verify that 13 is specified.
b. Open the VA1- Practice3.2a report from the Courses/YVA185/Basics/Practices (HR) folder.
1) In the upper left corner, click (Show list of applications) and select Explore and Visualize. SAS Visual Analytics appears.
2) Click All Reports.
a) Navigate to the Courses/YVA185/Basics/Practices (HR) folder. b) Double-click the VA1- Practice3.2a report to open it.
b) For the Decimals field, enter 2.
c) Click OK. Rename data items.
1) In the Category group, next to Employee ID, click 2) In the Name field, enter ID and press Enter.
3) In the Category group, next to Employee Name, click 4) In the Name field, enter Name and press Enter.
(Edit properties). (Edit properties).
5) In the Category group, next to Manager at 1. level, click (Edit properties). 6) In the Name field, enter Manager ID and press Enter.
7) In the Measure group, next to Frequency, click (Edit properties). 8) In the Name field, enter Number of Employees and press Enter.
9) Click (Actions) and select Refresh EMPLOYEES_CLEAN at the top of the Data pane to collapse the data item properties.
Save the report.
a. Open the browser and sign in to SAS Viya. SAS Drive is displayed by default.
2. Exploring Data: Part 1
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
c. Create an automatic chart.
1) In the left pane, click Data.
2) Click the following data items to select them:
Annual Salary
Frequency Percent
3) Drag the data items to the canvas.
The automatic chart functionality determines the best way to display the selected data.
d. Modify the options for the automatic chart.
1) In the right pane, click Options.
2) In the Object group, for the Name field, enter Distribution of Salary.
3) In the Histogram group, for the Bin range field, select Measure values. 4) Select Set a fixed bin count.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
5) In the Bin count field, enter 4 and press Enter.
Maximize the histogram and answer the question.
1) In the upper right corner of the chart, click (Maximize) to view additional details. A detail table is displayed at the bottom of the chart.
2) Click the highest bar in the graph.
3) Answer the question.
Into which range do the majority of salaries fall?
Answer: More than 75% of salaries fall within the $25K to $30K range.
4) In the upper left corner, click (Restore). Create a bar chart on the right of the automatic chart.
1) In the left pane, click Objects.
2) Drag the Bar chart object, from the Graphs group, to the right side of the canvas.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
3) In the right pane, click Roles.
4) For the Category role, select AddJob Title.
5) For the Measure role, select Number of Employees Annual Salary. 6) For the Group role, select AddDepartment.
The bar chart should resemble the following:
g. Modify the name of the bar chart.
1) In the right pane, click Options.
2) In the Object group, for the Name field, enter Total Salary by Job and Department.
h. Answer the questions.
In which department are a majority of our salary costs spent? For which job title?
Answer: Most of our salary costs are spent in the Sales Department, with a majority going toward the Sales Rep. I job title.
What could be some reasons why salary costs are so much higher for this group?
Answer: Salary costs could be higher for this group either because this job title pays more or there are more employees with this job title. Because the Sales Rep. I job title is the lowest level of all sales reps, there are probably more employees with this job title.
i. Save the report.
3. Exploring Data: Part 2
a. Open the browser and sign in to SAS Viya. SAS Drive is displayed by default.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
b. Open the VA1- Practice3.2b report from the Courses/YVA185/Basics/Practices (HR) folder.
1) In the upper left corner, click (Show list of applications) and select Explore and Visualize. SAS Visual Analytics appears.
2) Click All Reports.
a) Navigate to the Courses/YVA185/Basics/Practices (HR) folder. b) Double-click the VA1- Practice3.2b report to open it.
c. On Page 2, create a box plot.
1) In the upper left corner of the report, click the Page 2 tab.
2) In the left pane, click Objects.
3) Drag the Box plot object, from the Graphs group, to the canvas.
4) In the right pane, click Roles.
5) For the Category role, select AddJob Title.
6) For the Measures role, select AddAnnual Salary and click OK.
The box plot should resemble the following:
d. Modify the options for the box plot.
1) In the right pane, click Options.
2) In the Object group, for the Name field, enter Salary Analysis by Job Title. 3) In the Box Plot group, for the Outliers field, select Show Outliers.
4) Select Averages.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
The Options pane should resemble the following:
The box plot should resemble the following:
e. Maximize the box plot and answer the questions.
1) In the upper right corner of the chart, click (Maximize) to view additional details.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
2) In the detail table, click Average twice to sort by that column in descending order.
Which job title has the highest average salary? The lowest?
Answer: Purchasing Agent III has the highest average salary ($35,070.00). Trainee has the lowest average salary ($25,260.80).
Which job title has the largest number of outliers?
Answer: Sales Rep. I has more outliers than other job titles.
3) In the upper right corner, click (Restore). f. Save the report.
4. Creating Data Items
a. Open the browser and sign in to SAS Viya. SAS Drive is displayed by default.
b. Open the VA1- Practice3.3a report from Courses/YVA185/Basics/Practices (HR) folder.
1) In the upper left corner, click (Show list of applications) and select Explore and Visualize. SAS Visual Analytics appears.
2) Click All Reports.
a) Navigate to the Courses/YVA185/Basics/Practices (HR) folder. b) Double-click the VA1- Practice3.3a report to open it.
c. Create a new data item, Employee Status.
1) In the left pane, click Data.
2) In the Data pane, select New data itemCustom category.
a) In the Category window, in the Name field, enter Employee Status. b) For the Based on field, select Employee Termination Date.
c) Select Value Group 1.
d) Enter Active and press Enter.
e) Drag . (missing value) from the left pane to Drag values here on the right. f) In the Remaining Values area, for the Group as field, enter Retired.
g) Click OK to create the new custom category.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
The new calculated item, Employee Status, appears in the Category group.
Note: As an alternative, you can also create a calculated data item with the following expression:
d. On Page 3, create a bar chart.
1) In the upper left corner of the report, click the Page 3 tab.
2) In the left pane, click Objects.
3) Drag the Bar chart object, from the Graphs group, to the canvas.
4) In the right pane, click Roles.
5) For the Category role, select AddJob Title.
6) For the Measure role, select Number of EmployeesYears of Service. 7) FortheGrouprole,selectAddEmployeeStatus.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
The bar chart should resemble the following:
e. Specify Years of Service by Job Title and Status as the name of the bar chart.
1) In the right pane, click Options.
2) In the Object group, for the Name field, enter Years of Service by Job Title and Status.
f. Change the aggregation for Years of Service to Average. 1) In the left pane, click Data.
2) Next to Years of Service, click (Edit properties). 3) For the Aggregation field, select Average.
The updated bar chart should resemble the following:
g. Answer the following questions:
Which job title has the highest average years of service among active employees? Among
retired employees?
Answer: Purchasing Agent III has the highest average years of service among active employees. Sales Rep. II has the highest average years of service among retired employees.
h. Save the report.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
5. Applying Filters
a. Open the browser and sign in to SAS Viya. SAS Drive is displayed by default.
b. Open the VA1- Practice3.3b report from the Courses/YVA185/Basics/Practices (HR) folder.
1) In the upper left corner, click (Show list of applications) and select Explore and Visualize. SAS Visual Analytics appears.
2) Click All Reports.
a) Navigate to the Courses/YVA185/Basics/Practices (HR) folder. b) Double-click the VA1- Practice3.3b report to open it.
c. Add a data source filter to filter for active employees in the Sales Department. 1) In the left pane, click Data.
2) In the Data pane, click (Actions) and select Apply data filter. a) On the left side of the window, click Operators.
b) Expand Boolean.
c) Double-click AND to add it to the expression.
d) On the left, click Data Items.
e) Expand Character.
f) Select Employee Status.
g) In the Conditions area, double-click Employee Status = x to add it to the first condition in the expression area.
h) Enter Active as the string for the first condition.
i) In the Character group, select Department.
j) In the Conditions area, double-click Department = x to add it to the second condition in the expression area.
k) Enter Sales as the string for the second condition. The expression should resemble the following:
The bottom of the Apply Data Filter window should resemble the following:
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
l) In the upper right corner, click (Preview result). m) Scroll down to the bottom of the list.
n) Click Close to close the preview. 3) Click OK to apply the data source filter.
The Data pane should resemble the following:
d. Change the classification for Employee Country to GeographyCountry or Region ISO 2-Letter Codes.
1) In the left pane, click Data.
2) Next to Employee Country, click (Edit properties).
3) For the Classification field, select Geography.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
Notice that 100% of countries are mapped for the geographic data item. 4) Click OK.
A new group, Geography, is added to the Data pane.
On Page 4, create a geo map.
1) In the upper left corner of the report, click the Page 4 tab.
2) In the left pane, click Objects.
3) Drag the Geo coordinate object, from the Geographic group, to the canvas. 4) In the right pane, click Roles.
5) For the Geography role, select AddEmployee Country.
6) FortheSizerole,selectAddTotalProfit.
7) For the Color role, select AddNumber of Employees.
Maximize the geo map and answer the questions.
1) In the upper right corner of the chart, click (Maximize) to view additional details.
a) For the Geography data field, verify that Geographic name or code lookup is selected.
b) For the Name or code context field, select Country or Region ISO 2-Letter Codes.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
2) In the detail table, click Total Profit twice to sort by that column in descending order.
3) Answer the questions.
Management has decided that one possible criterion for promotion is profit generated. Which two countries generate the highest profit? Why do they have such high profits?
Answer: United States ($9,490,871.30) and Germany ($6,705,983.90) generate the highest total profit. These countries have more employees than other countries, which could explain the higher profits.
4) In the upper right corner, click (Restore).
g. In the geo map, specify Average Profit for the Size role.
1) Verify that the geo map is selected.
2) In the right pane, click Roles.
3) FortheSizerole,selectTotalProfitAverageProfit.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
Specify Average Profit and Number of Employees by Country as the name of the geo map.
1) In the right pane, click Options.
2) In the Object group, for the Name field, enter Average Profit and Number of
Employees by Country.
Maximize the geo map and answer the question.
1) In the upper right corner of the chart, click (Maximize) to view additional details.
2) In the detail table, click Average Profit twice to sort by that column in descending order.
3) Answer the question.
Which country has the highest average profit? Highest number of employees?
Answer: France has the highest average profit ($144,087.39). United States has the highest number of employees (73).
4) In the upper right corner, click (Restore). Save the report.
6. Analyzing Data
a. Open the browser and sign in to SAS Viya. SAS Drive is displayed by default.
b. Open the VA1- Practice3.4a report from the Courses/YVA185/Basics/Practices (HR)
1) In the upper left corner, click (Show list of applications) and select Explore and
Visualize. SAS Visual Analytics appears. 2) Click All Reports.
a) Navigate to the Courses/YVA185/Basics/Practices (HR) folder. Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
b) Double-click the VA1- Practice3.4a report to open it. c. On Page 5, create a treemap.
1) In the upper left corner of the report, click the Page 5 tab.
2) In the left pane, click Objects.
3) Drag the Treemap object, from the Graphs group, to the canvas.
4) In the right pane, click Roles.
5) FortheTilerole,selectAddCompany.
6) For the Size role, select Number of Employees Years of Service.
7) For the Color role, select AddAverage Profit.
8) For the Data tip values role, select Add Number of Employees and click OK.
The treemap should resemble the following:
d. Create a new hierarchy (Employee Hierarchy).
1) In the left pane, click Data.
2) In the Data pane, select New data itemHierarchy.
a) In the window, in the Name field, enter Employee Hierarchy.
b) Double-click the following data items, in the specified order, in the Available items list
to move them to the Selected items list:
Company Job Title Group
c) Click OK to create the hierarchy.
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
The Hierarchy group in the Data pane should resemble the following:
e. In the treemap, specify Employee Hierarchy for the Tile role, and then answer the questions.
1) If necessary, select the treemap.
2) In the right pane, click Roles.
3) For the Tile role, select CompanyEmployee Hierarchy. 4) Answer the questions.
Which two companies have the highest average profit generated (one possible criterion for promotion)?
andSA have the highest average profit generated.
In the upper right corner of the treemap, click (Maximize) to view additional details.
In the details table below the treemap, click Average Profit twice to sort in descending order.
In the upper right corner, click (Restore).
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
For these two companies, which job titles have the highest average years of service and average profit generated?
For, the Sales Rep. IV job title has the highest average years of service and highest average profit generated.
In the treemap, double-click.
In the upper right corner of the treemap, click (Maximize) to view additional details.
In the details table below the treemap, click Years of Service twice to sort in descending order.
In the upper right corner, click (Restore).
Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
ForSA, the Sales Rep. II job title has the highest average years of service and the highest average profit generated.
In the treemap, click All Employee Hierarchy to return to the top level of the hierarchy.
Double-clickSA.
In the upper right corner of the treemap, click (Maximize) to view additional details.
In the details table below the treemap, click Years of Service twice to sort in descending order.
In the upper right corner, click (Restore).
f. Save the report.
7. Adding Data Analysis
a. Open the browser and sign in to SAS Viya. SAS Drive is displayed by default.
b. Open the VA1- Practice3.4b report from the Courses/YVA185/Basics/Practices (HR)
1) In the upper left corner, click (Show list of applications) and select Explore and
Visualize. SAS Visual Analytics appears. 2) Click All Reports.
a) Navigate to the Courses/YVA185/Basics/Practices (HR) folder.
b) Double-click the VA1- Practice3.4b report to open it. c. On Page 6, create a correlation matrix.
1) In the upper left corner of the report, click the Page 6 tab. Copyright 2021, the School of ISTM, UNSW Sydney, Australia, USA. ALL RIGHTS RESERVED.
2) In the left pane, click Objects.
3) Drag the Correlation matrix object, from the Graphs group, to the canvas. 4) In the right pane, click Roles.
5) For the Measu
CS: assignmentchef QQ: 1823890830 Email: [email protected]
Reviews
There are no reviews yet.