Difference between revisions of "Group06 Report"

From Visual Analytics and Applications
Jump to navigation Jump to search
Line 52: Line 52:
  
 
We use the column “descriptions” and “quantity” in the data set to conduct the Natural Language Processing. The description gives the product name, for example “WHITE METAL LANTERN”. The quantity gives the number of the products ordered.
 
We use the column “descriptions” and “quantity” in the data set to conduct the Natural Language Processing. The description gives the product name, for example “WHITE METAL LANTERN”. The quantity gives the number of the products ordered.
 +
 +
==3 R PROGRAMMING AND USAGE OF R PACKAGES==
 +
 +
We have developed the application in Shiny, an open source R package, which provides a powerful web framework for building web applications. For performing data cleaning and building the visualizations, we have experimented with different R packages and would like to introduce some of the key packages that we found useful in this paper.
 +
 +
===2.3 Reducing Development Time on Shiny===
 +
 +
As all the team members wanted to contribute and reduce development time on the application, we adopted two initiatives to ensure that everything is smooth sailing.
 +
 +
  
  

Revision as of 15:47, 13 August 2018

Group 6

Overview   Proposal   Poster   Application   Report


Report



1 Introduction

An e-commerce company in the United Kingdom has provided their transaction data from 1 December 2010 to 9 December 2011. This company mainly has wholesalers as its customers. Based on the data provided, the company’s client portfolio is mainly based in the United Kingdom. Within the data set, the key variables given are: (i) invoice number; (ii) stock code; (iii) description; (iv) quantity; (v) invoice date; (vi) unit price; (vii) customer identification number; and (viii) country. Being a primarily sales driven company, the key objective should be to maximize the revenue of the company. To achieve this, we will adopt a four-pronged approach: (a) understand the seasonality of the goods flow through the period; (b) identify cross-sell opportunities through customer similarities; (c) clustering of high value customers to target; and (d) reviewing product descriptions to understand the product descriptions that sell well.

2 Motivation and Objective

On the market, there are various customer intelligence platforms available: “DataSift”, “SAS Customer Intelligence”, “Accenture Insights Platform”, etc. However, none of them are offer an integrated bespoke solution for our data on hand.

Our motivation is to build an entirely bespoke application that would allow the company to fully analyse their data right at the onset.

2.1 Cosine Similarity

This part of the application aims to find similarities between customers. Given that there are 3,866 products, we have decided to utilize the customers’ historical patterns in purchasing products to measure similarities between customers. To do this, we have created a matrix comprising the customers (columns) and products (rows). The values within depict the amount of the products these customers bought. Through the similarity of product purchases, clusters of customers can then be formed. Depending on the strength of this similarity between customers, a network diagram can then be drawn to visualize the customers. This will help to provide a meaningful way of grouping customers together so that different marketing campaigns and client relationship officers can be allocated to them.

2.2 Customer Segmentation

One of aims of this application is to allow users to perform customer segmentation visually and interactively. An intuitive methodology RFM is applied in this project to strengthen the result of customer segmentation. RFM facilitates the consumer analytics process in three different dimensions: recency (how recently the customer purchased), frequency (how often customer purchase) and monetary (how much customers spend).

K-means clustering algorithm uses RFM variables to form consumers into clusters. With understanding of the characteristics of different consumers group, business operator can make customized strategy to target different consumer groups.

2.3 Natural Language Processing

It is very important for management to understand customer preferences for different products, Natural Language Processing is conducted to explore the popularity of products. By understanding what are the most and least popular products and the properties of the popular products, the management will be able to make smarter decisions towards the customer’s preference, thus improve the revenues.

We use the column “descriptions” and “quantity” in the data set to conduct the Natural Language Processing. The description gives the product name, for example “WHITE METAL LANTERN”. The quantity gives the number of the products ordered.

3 R PROGRAMMING AND USAGE OF R PACKAGES

We have developed the application in Shiny, an open source R package, which provides a powerful web framework for building web applications. For performing data cleaning and building the visualizations, we have experimented with different R packages and would like to introduce some of the key packages that we found useful in this paper.

2.3 Reducing Development Time on Shiny

As all the team members wanted to contribute and reduce development time on the application, we adopted two initiatives to ensure that everything is smooth sailing.



Data Source and Preparation

We will use an e-commerce dataset from the UCI Machine Learning Repository that contains transactional data between 2010 and 2011. The company mainly sells unique all-occasion gifts and most of their customers are wholesalers. Below is a data dictionary of the available fields within the dataset:

Field Description
InvoiceNo Invoice number. Nominal, a 6-digit integral number uniquely assigned to each transaction. If this code starts with letter 'c', it indicates a cancellation.
StockCode Product (item) code. Nominal, a 5-digit integral number uniquely assigned to each distinct product.
Description Product (item) name. Nominal.
Quantity The quantities of each product (item) per transaction. Numeric.
InvoiceDate Invoice Date and time. Numeric, the day and time when each transaction was generated.
UnitPrice Unit price. Numeric, Product price per unit in sterling.
CustomerID Customer number. Nominal, a 5-digit integral number uniquely assigned to each customer.
Country Country name. Nominal, the name of the country where each customer resides.

Approach

The application will be built primarily based on the R Shiny framework. The key focus areas will be:

  • Visualization of bipartite networks (i.e. between customers and products)
  • Visualization of clustering/segmentation of customers (RFM Model)
  • Visualization of popular products through text analytics

Some examples of visualizations are as follows:

Visualization of bipartite networks

Force Directed Network Graph

Visualization of clustering/segmentation of customers

We intend to create the feature to allow users can visualize clustering results interactively. It helps to give more meaningful labels to different clusters. And eventually it brings insightful understanding and segmentation to the customers.

RFM Clustering


Visualization of products popularity

It is very important for retailers to understand customer preferences for different products, Natural Language Processing will be conducted to explore the popularity of products. By understanding what are the most and least popular products and the properties of the popular products, the retail will be able to make smarter decisions towards the customer’s preference, thus improve the revenues. Different visualization techniques such as bar chart, word cloud and etc will be used to ease the understanding of the insights discovered.

Text Analytics


Selection of Tools

Based on our preliminary assessment, we will utilize the following libraries for the development of the R Shiny dashboard: tidyr, dplyr, ggplot2, igraph, htmlwidgets, networkD3, mclust, shiny, shinyTime, shinydashboard, shinythemes, sjmisc, readxl, stringr, data.table, dummies, sjPlot, car, DT, reshape2, sqldf, igraph, etc.