Which products are driving customer satisfaction and repeat purchases? Identifying these Regork products could create a list of products that should have more stock and have an increase of visibility to consumers to boost those products sales.
To address this problem, I analyzed Regork’s customer transaction data, product data, and a little of their demogrpahic data from the Complete Journey data set. I focused on identifying the products with a high repeat purchase rate and high customer satisfaction. I then compared these rates with the number of repeated purchases for products. Once I had identified the products with the highest repeated purchase rate as well as the number of repeated purchases, we took both factors into consideration as we found the products that would benefit the most from an increase in stock and visibility.
My analysis can help Regorks CEO as well as company locations understand and identify which of their products are key drivers of customer loyalty. This analysis can guide Regorks inventory and marketing strategies to maximize their customer satisfaction and to increase sales.
Complete Journey: Holds all of Regorks data
dyplr: Used for data manipulation
ggplot2: Used for data visualization
lubridate:Used for time/date data manipulation
tidyr: Used for data tidying
DT: Used for creating data tables in HTML
# Load packages
suppressPackageStartupMessages({
library(completejourney)
library(dplyr)
library(ggplot2)
library(tidyr)
library(lubridate)
library(DT)
})
# Load datasets
transactions <- get_transactions()
data("demographics", package = "completejourney" )
data("products", package = "completejourney")
# Join transactions data with product data
transactions_products <- transactions %>%
inner_join(products, by = "product_id")
Joining the transactions data and the product data can help us identify the products names that are have many purchases Once we join both datasets, we can use a row that each dataset has in common which is called product id. This id links us to the product name and to the transactions of all products. We then can see how much a product is purchased based on the product id and we can also find the product name based on the product id.
# Calculate repeat purchase rates
repeat_purchases <- transactions_products %>%
group_by(product_id) %>%
summarise(
total_purchases = n(),
repeat_purchases = sum(duplicated(household_id)),
repeat_rate = repeat_purchases / total_purchases
) %>%
arrange(desc(repeat_rate))
# Join with product information
repeat_purchases <- repeat_purchases %>%
inner_join(products, by = "product_id")
Since we have now linked the transactions to the products, we can create a rate that properly shows how often customers purchase a product and then the purchase is repeated in a different transaction. This will give us one number to look at so we can compare since every product has a different number of transactions and repeated transactions.
datatable(head(repeat_purchases, 500), options = list(pageLength = 10))
This table shows a repeat purchase rate for many products that has had a transaction in the given data set. There are 68492 rates and therefore products.
# Select the top 10 products by repeat purchase rate
top_repeat_products <- repeat_purchases %>%
top_n(10, repeat_rate) %>%
arrange(desc(repeat_rate))
We are focused on finding the the products with the top repeat purchase rates as those are the products we would like to explore options on. This code creates a new table that only shows the top repeat purchase rates.
datatable(head(top_repeat_products, 10), options = list(pageLength = 10))
This table presents those 10 products with the highest repeat purchase rates.
ggplot(top_repeat_products, aes(x = reorder(product_type, repeat_rate), y = repeat_rate)) +
geom_bar(stat = "identity", fill = "skyblue") +
coord_flip() +
theme_minimal() +
labs(title = "Top 9 Products by Repeat Purchase Rate", x = "Product", y = "Repeat Purchase Rate") +
geom_text(aes(label = scales::percent(repeat_rate, accuracy = 0.01)), hjust = -0.1, color = "black") +
scale_y_continuous(breaks = seq(0, 1, by = 0.10), limits = c(0, 1.1))
## Warning: Removed 1 row containing missing values or values outside the scale range
## (`geom_bar()`).
This bar graph presents a visual for the products high repeated purchase rate. We can see that every one of the products on the chart have a repeated purchase rate of 96% or more. These products are:
ggplot(top_repeat_products, aes(x = "", y = repeat_purchases, fill = product_type)) +
geom_bar(stat = "identity", width = 1) +
coord_polar("y", start = 0) +
theme_void() +
labs(title = "Number of Repeated Purchases for Top 9 Products") +
geom_text(aes(label = repeat_purchases),
position = position_stack(vjust = 0.5)) +
scale_fill_manual(values = rainbow(10))
This pie chart presents the number of repeated purchases of those products with the highest repeated purchase rate. Although a product has a high repeated purchase rate, that does not mean the product is popular. The pie chart shows us which of those products have a high repeated purchase rate and and a high number of repeated purchases. These products are:
I aimed to identify products that play an important part customer satisfaction and repeat purchases to explore possible inventory and marketing strategies. I analyzed store data focusing on repeat purchase rates and then compared these rates with popular products and repeatedly purchased popular products to come up with a list of products that would greatly benefit from my recommendation. The data I used includes Regorks transactions, products, and demographics data sets.
My analysis revealed that certain products, such as Cigarettes, South American Wines, Salty Snacks, and Adult Incontience Misc Products have the highest repeat purchase rates. Because of their rates, these products are the key drivers of customer loyalty for Regorks. By increasing the stock or visibility of these high-repeat products, Regork can potentially boost sales and enhance customer satisfaction. A few options to explore could be:
My analysis was created and based on yearly data and does not account for seasonal variations. My analysis does also not account for changes in consumer preferences. Future analyses could include recent data or data from a wider time frame and additional variables such as the time of the year to give more information.