Market Basket Analysis

The purpose of this report is to perform a market basket analysis on a 12-month transactional dataset from an online store. The primary objective of this analysis is to understand customer purchasing behavior and identify opportunities for product cross-selling by analyzing items that are frequently purchased together.
Data Source: Kaggle Store Sales Dataset

  • Type Jupyter Notebook

Data Understanding:

The dataset contains XXX rows and 6 columns. The columns in the dataset include:

  1. Order ID – A unique identifier assigned to each transaction.
  2. Product – The product that have been sold.
  3. Quantity Ordered – Total item quantity ordered.
  4. Price Each – The price of each product unit.
  5. Order Date – This is the date the customer is requesting the order be shipped.
  6. Purchase Address – The address of the customer, consisting of 4 levels (street name, city name, state name, and zip code).

Data Preparation:

Before conducting the analysis, the following data preparation steps were performed:

  1. Missing values were checked and found to be absent in the dataset.
  2. Duplicate values were checked and removed from the dataset.
  3. Date and Time columns were combined into a single column and converted to a datetime datatype.
  4. A new column was created for the day of the week of the transaction.

Analysis:

  1. Sales Trend by Weekday:

The total sales amount for each day of the week was calculated and plotted in a bar chart. The analysis showed that the highest sales were on Saturday, followed by Sunday and Friday. Monday had the lowest sales.

  1. Product Line Analysis:

The product lines were analyzed to identify the most popular product categories. The top three product lines by sales were Food and beverages, Fashion accessories, and Electronic accessories.

Conclusion:

The analysis of the Supermarket Sales dataset provided insights into
customer purchasing behavior, popular product categories, and sales
trends. The analysis showed that the highest sales were on weekends, the
most popular product categories were Food and beverages, Fashion
accessories, and Electronic accessories, and most customers preferred
using e-wallets for payment. The analysis also showed that members had
higher sales in all product categories compared to normal customers.