0% found this document useful (0 votes)
59 views5 pages

Solution - Creating A Geographic Data Source

The document provides steps to create a geographic data source in SAS by filtering a source table to include only facilities located in North or South America. Key steps include adding a filter transform to select these continents, saving the results, and analyzing the profile of the new table to compare production metrics to the overall data.

Uploaded by

DaniloVieira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views5 pages

Solution - Creating A Geographic Data Source

The document provides steps to create a geographic data source in SAS by filtering a source table to include only facilities located in North or South America. Key steps include adding a filter transform to select these continents, saving the results, and analyzing the profile of the new table to compare production metrics to the overall data.

Uploaded by

DaniloVieira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Solution to Practice

1. Creating a Geographic Data Source


a. From the browser window, sign in to SAS Viya for Learners.
b. Open VA2- Practice2.2.
1) Navigate to SAS Content/Courses/YVA285/Advanced/Practices.
2) Right-click VA2- Practice2.2 and select Prepare data.
c. View the source table properties and answer the questions.

1) In the left pane, click (Properties for the source table) to show details about the
source table.

2) Answer the following questions:


What is the name of the source table for the plan?
Answer: FACILITY_TOY
How many rows are in the source table? How many columns?
Answer: 35.2K rows and 28 columns
d. View profile information about the source table and answer the questions.
1) In the bottom pane, click Profile.
2) On the right side, click Run Profile to execute the profile, if necessary.

Copyright © 2019, SAS Institute Inc., Cary, North Carolina, US A. ALL RIGHTS RESERVED.
2-40 Lesson 2 Restructuring Data for Geographic Mapping

3) Answer the following questions:


How many unique values exist for Facility Continent?
Answer: Six unique values
• Scroll down the profile to locate the FacilityContinent column.
• The Unique column lists the percentage of unique values and the
number of unique values (in parentheses).

What is the average number of products produced (UnitActual) by each unit? The
minimum? The maximum?
Answer: 6.86 products are produced by each unit on average. The minimum
number of products produced by a unit is 1, and 55 is the maximum
number of products produced by a unit.
• Scroll down the profile to locate the UnitActual column.
• Scroll to the right to view the mean, the minimum, and the maximum.

e. Add a filter to the plan to include only facilities located in North America or South America.

1) In the left pane, click (Transforms).


2) In the Row Transforms group, double-click Filter to add the transform to the plan.

Copyright © 2019, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.4 Solutions 2-41

3) For the Column field, select FacilityContinent.


4) For the Operator field, select In.
5) In the Value field, enter the following values:
North America
South America
Note: The In and Not in operators are the only ones that can filter on multiple values.
You can enter multiple values by pressing Enter after each value. There is no
need for quotation marks around the text.
Note: You can also click Browse to choose from the distinct values for the column.
The Filter transform should resemble the following:

6) In the upper right corner, click Run to execute the transform on the data.

Copyright © 2019, SAS Institute Inc., Cary, North Carolina, US A. ALL RIGHTS RESERVED.
2-42 Lesson 2 Restructuring Data for Geographic Mapping

f. Save the plan and the result table.

1) In the upper right corner of the plan, click (More) and select Save as.
2) Navigate to My Folder.

3) In the lower right, click (Library).

4) Next to the cas-v4exxx-default server, click (Down one level).


5) Click Public.
6) Click Select.
7) Click Save.
g. View the result table properties and answer the question.

1) In the right pane, click (Properties for the result table) to show details about the
result table.

2) Answer the following question:


How many rows are in the result table?
Answer: 26.1K rows
h. View profile information about the result table and answer the questions.
1) In the bottom pane, click Profile.
2) In the upper right corner of the Profile view, select Saved table
(FACILITY_TOY_AMERICA) in the drop-down list.
3) In the upper right corner of the Profile view, click Run Profile to execute the profile, if
necessary.
4) Answer the following questions:
What is the name of the result table for the plan?
Answer: FACILITY_TOY_AMERICA

Copyright © 2019, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.
2.4 Solutions 2-43

How many unique values exist for Facility Continent?


Answer: Two unique values (South America and North America)
• Scroll down the profile to locate the FacilityContinent column.
• The Unique column lists the percentage of unique values and the
number of unique values (in parentheses).

What is the average number of products produced (UnitActual) by each unit? What
does this tell you about production in the Americas compared to production in other
continents?
Answer: 6.73 products are produced by each unit on average. Because this
average is below the average for all continents (6.86), this implies that
production in the Americas is below that in other continents.
• Scroll down the profile to locate the UnitActual column.
• Scroll to the right to view the mean.

i. Return to SAS Drive.

1) Select (Show applications menu).


2) Select SAS Drive.

Copyright © 2019, SAS Institute Inc., Cary, North Carolina, US A. ALL RIGHTS RESERVED.

You might also like