0% found this document useful (0 votes)
92 views

Phase 1 Data Collection and Preparation

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

Phase 1 Data Collection and Preparation

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Bibitor LLC *

Inventory Analysis Case Study


Phase 1
*Note1: Bibitor, LLC is a fictitious company based on data created by the HUB of Analytics
Education @ www.hubae.org.
Introduction and
Case Overview

PwC
2
Objectives

• This case study is designed to enhance your understanding and knowledge of data
analytics, including leveraging analytics to make business decisions.
• By completing this case, you will obtain the following:
- An understanding of what data analytics and visualization are
- The ability to utilize analytic tools
- Comfort in leveraging data in making decisions
- Skills to select data components for analysis and illustrate results to highlight data
tracking and identify conditions for exception analysis or business advisory strategy

PwC
3
Case Format

• You should plan to work in teams of 2 to 3 students to complete the case. This will give
you the opportunity to share the learning, knowledge, and experience.
• This case will be delivered in three phases. Each phase includes an instructional
component to learn how to manage the data within the tool and case study exercises
utilizing the skills.
- Phase 1: Introduction to Data Preparation
◦ Load data exported from company into SQLite to put it into a format for analysis and
create tables which can be used by other analysis tools.
- Phase 2: Introduction to Data Discovery and Visualization
◦ Using tables created in Phase 1, load data into Tableau to perform analysis then
create and interpret visualizations.
- Phase 3: Introduction to Statistical Analysis
◦ Analyze one set of independent/dependent variables from each of the two case
studies and create a tableau worksheet that uses linear regression to provide some
insight into the data.
PwC
4
Case Materials

• All the materials required to complete the case can be found at ((LOCATION)).

PwC
5
Case Background

• Bibitor, LLC* is a liquor store chain in the fictional state of Lincoln. It is a major retailer
with approximately 80 locations and total sales in excess of $450 million.
• Bibitor has asked the team to complete due diligence on their wine and spirits business
looking at data for their beginning and ending inventory, purchases and sales for a
12 month period.

*Bibitor, LLC is a fictitious company based on data created by the HUB of Analytics Education @ www.hubae.org. The HUB of
Analytics Education materials are owned by Northeastern University. PricewaterhouseCoopers LLP is not responsible for any
errors or omissions in, or for the results obtained from the use of, the HUB of Analytics Education. The HUB of Analytics
Education materials are provided "as is", with no guarantee of completeness, accuracy, timeliness or of the results obtained
from the use of this information, and without warranty of any kind. In no event will PricewaterhouseCoopers LLP, or its partners,
principals, employees, or agents, be liable to you or anyone else for any decision made or action taken in reliance on the
information in the HUB of Analytics Education materials or for any consequential, special or similar damages, even if advised of
the possibility of such damages.

PwC
6
Getting Started – Phase 1 Pre-work

1. Download/Install SQLite application


(SQLite DB Browser is preferred; http://sqlitebrowser.org/ )
2. Download Datasets (listed in image below) onto local machine
• Note: minimum disk space required = 3GB
3. Read/Review general background on Relational Databases:
https://www.webucator.com/tutorial/learn-sql/relational-database-basics/relational-databas
es-reading.cfm#tutorial
4. Complete these Supplemental SQL exercises: https://sqlzoo.net/wiki/SELECT_names

PwC
7
Getting Started – Phase 1 Pre-work

Create a New Database and Import data


into SQLite
a. Open SQLite DB Browser and select ‘New
Database’; this .db file can be arbitrarily named by
the user.
• Note: You will need to click ‘Save’ before
closing as the application will not ask you to
‘Save’ your file; otherwise, you will lose all
work performed.
b. The datasets identified in (Prerequisite #2) are
in .csv file format, which are readable by the
standard SQLite import function. Each can be
imported individually by going to
FileImportTable from CSV file-and selecting
the respective .csv file. Be sure to check the
‘Column Names in first line’ box when importing.

PwC
8
Getting Started – Phase 1 Pre-work

c. Once all tables are imported, rename each table (by right-clicking on the table, and
selecting ‘Modify Table’) for purposes of query simplicity:
Note 1: you can also rename the files in Windows Explorer prior to the import.
Note 2: if you incorrectly import a table without column headers, you can drop that table
using (DELETE TABLE [Table Name]) and re-importing.
• ‘SalesFINAL12312016’ to ‘SalesDec’
• ‘Purchases12312016’ to ‘PurchasesDec’
• ‘InvoicePurchases12312016’ to ‘VendorInvoicesDec’
• ‘EndInvFINAL12312016’ to ‘EndInvDec’
• ‘BegInvFINAL12312016’ to ‘BegInvDec’
• ‘2017PurchasePricesDec’ to ‘PricingPurchasesDec’

PwC
9
Phase 1:
Introduction to Data Collection
and Preparation (in SQLite)

PwC
10
Accessing Data and Preparing It for Analysis

• To effectively utilize data after it has been exported from the company’s system, the data
must be appropriately formatted and tested for completion.
• The steps in this phase outline the process of taking the original source files downloaded
from the company and importing them into SQLite to perform analysis and create tables
which can be used by other data analysis tools.

PwC
11
Review of Pre-Work

PwC
12
Basic ‘Select” Syntax and Features

a. The ‘Select’ statement will return a result


set of records for specified columns, from a
specific table, for those records meeting
specified conditions. Basic ‘Select’
statement syntax is as follows:

Note: It may be helpful to google "SQL Quick


Reference From W3Schools" for a handy
listing of statements/clauses in this SQLite
reference guide.

PwC
13
Practice Ex. 1: Select ALL records/columns from the
‘VendorInvoicesDec’ table

(Hint: use an asterisk as a key word to


indicate that all columns should be
returned in the results).

PwC
14
Practice Ex. 2: Select Columns ‘VendorNumber’ and
‘VendorName’ (all records) from the ‘VendorInvoicesDec’ table.

PwC
15
Basic ‘Select” Syntax and Features

b. ‘Where’ clauses all for conditions


to be applied to the select
statement. For example, if we only
want VendorNumber ‘105’, we
execute the following:

PwC
16
Basic ‘Select” Syntax and Features

c. If we want to execute the same


condition, but for multiple values for
‘VendorNumber’, we use an ‘IN’
clause within that same
WHERE condition:

PwC
17
Basic ‘Select” Syntax and Features

d. If we want to set multiple conditions,


we can use an ‘AND’ operator after
the initial WHERE clause:

PwC
18
Practice Ex. 3: From table ‘PurchaseDec’, return records for
ALL columns where the purchase price is greater than $10.00
for any store numbered between 1 and 10

PwC
19
Basic ‘Select” Syntax and Features

e. ‘ORDER BY’ clause is a similar to


a Sort feature in excel. Use
following syntax to order by a
specific column (Note: ASC =
Ascending, and DESC =
Descending):

PwC
20
Basic ‘Select” Syntax and Features

f. Aggregate functions, such as


COUNT or SUM, will aggregate all
values in a given column if the
datatype is an integer or float.
Columns SELECTED, but not
included in the SUM argument need
to be included in both in the
SELECT Statement AND the
GROUP BY clause.

PwC
21
Practice Ex. 4: From table ‘VendorInvoicesDec’
obtain the total freight costs by VendorNumber for
transactions which the Total Dollars value of the
transaction was greater than $100 and the quantity
was less than or equal to 1000 units. Which
VendorNumber corresponded to the largest Freight
cost under these conditions?

PwC
22
‘Select’ Syntax for Total Freight Cost

PwC
23
Basic ‘Select” Syntax and Features

g. The ‘JOINS’ clauses are used to combine


records of multiple tables. A JOIN is
defined as combining two tables based on
common values among specified columns
(we typically use primary keys to perform
joins). The concatenate of all primary keys
in a given table will be unique for each
record in the table; one simple method of
checking that you’ve properly identified
primary keys is to perform a Select/Group
(and a COUNT) by those fields---ensuring
that record counts match and that there are
not counts > 1.

PwC
24
Basic ‘Select” Syntax and Features

h. There are many types of joins. A very


common join used in SQLServer, but is not
explicitly provided in SQLite is the left join.
A left join will return all records in table 1
(the ‘left’ table) and ‘matched’ records from
table 2 (the ‘right’ table). Refer to
Appendix1_Learner_SQL Joins.docx for
more details on SQL joins.

PwC
25
Basic ‘Select” Syntax and Features

i. In SQLite, we will need to piece this


together in three steps. First, we
will perform a left outer join using
the EndInvDec (‘left’ table) to
BegInvDec (‘right’ table) – store
results in temp table.

j.

PwC
26
Basic ‘Select” Syntax and Features

i. Second, we will perform an Inner


Join on those two table to identify
matched records (store results in
temp table):

PwC
27
Basic ‘Select” Syntax and Features

i. Lastly, we will use a UNION clause


to combine the two temp tables into
a new temp table.

What is one way that we can


validate the record count of the new
temp table?

PwC
28
Join Table Successfully Created

PwC
29
Count of Rows Returned in Table Creation

PwC
30
Case Studies

PwC 31
31
Instructions

• Create vendor billings and purchases activity tables and identify inventory trends outlined
in the following two cases

PwC
32
Case 1

• Executive leadership is looking for dashboard reporting that would be useful to help
identify and monitor vendor activity in order to focus efforts strategically on key supplier
relationships.
• Create (1) an aggregate table that includes all critical vendor billings and their associated
purchasing activity
• Create (2) separate tables to store key information, such as ‘top 10 vendors’ by quantity
purchased. Name all tables you create ‘c1_Prep_[table_name]’

Note: A 'Critical Vendor' may be based on your judgement and awareness of the data. For
example, a vendor with >$1,000 of inventory purchased from.

PwC
33
Case 2

• You notice that there is inventory that is purchased but sits on the shelf for a long period
of time rather than being sold.
• As such, there is an opportunity to add value to the procurement process by identifying
trends in the timing inventory purchased versus its corresponding sale.
• Consider key data points around purchase prices, seasonality, and vendor information in
creating an aggregate table for future visual & statistical analysis.
• Name the table you create ‘c2_Prep_[table_name]’.

PwC
34
Next Steps

PwC
35
Phase 2 Pre-work

1. Download/Install Tableau
2. Review background information on Tableau and other Data Discovery applications

PwC
36
Thank You.

You might also like