SAS Project Training 1
To begin the project, we will have to first create a library that can access the online_retail data set.
Copy the online_retail data set into your shared folder.
Run a libname statement to access the data set in your SAS Studio:
libname a '/folders/myfolders';
The LIBNAME statement creates a new library called A that contains the online_retail data set:
The online_retail data set contains the history of the sales records for a multinational retail company.
We will first get a basic understanding of the data set by looking at the individual columns.
Open the data set.
From the top of the data table, we learn that there are 370,931 observations and eight columns:
Let's look at each column in the data set.
Column 1: INVOICENO
The first column is the invoice number for each transaction.
Column 2: STOCKCODE
The second column is the stock code. It represents the product ID.
Column 3: DESCRIPTION
The third column is the product description:
Column 4 and 5: QUANTITY and INVOICEDATE
The fourth and fifth columns are the quantity sold and the date of the invoice:
Column 6: UNITPRICE
The sixth column is the unit price.
Column 7 and 8: CUSTOMERID and COUNTRY
The seventh and eighth columns are the customer id and the country of purchase:
A CONTENTS procedure can be run to get an overview of the data set.
Run the code below in your SAS Studio:
proc contents data=a.online_retail;
The CONTENTS procedure displays the descriptor portion of the data set.
The table shows, again, there are 370,931 observations in this data set.
The attributes of the eight variables in the data set are also listed: