šŸ“ˆ ABC Analysis & Segmentation

šŸ’”
A statistical methodology to segment your products based on turnover and demand variability using an automated solution with a web application designed with the framework Streamlit.
User Interface of the Web Application

šŸŽ“ Topic

Product segmentation refers to the activity of grouping products that have similar characteristics and serve a similar market. It is usually related to marketing (Sales Categories) or manufacturing (Production Processes).

The objective is to understand the sales volumes distribution (fast/slow movers) and demand variability to optimize your production, storage and delivery operations to ensure the best service level by considering:

  • The highest contribution to your total volume: ABC Analysis
  • The most unstable demand: Demand Variability

I have designed this Streamlit App to provide a tool to Supply Chain Engineers for Product Segmentation, with a focus on retail products, of their portfolio considering the complexity of the demand and the volume's contribution of each item.

šŸ“œ Understand the Theory

Product Segmentation for Retail with Python | Samir Saci
A statistical methodology to segment your products based on turnover and demand variability

šŸ’” Get insights about your sales records


Pareto Analysis

Concept Pareto Analysis

INSIGHTS:

  1. How many SKUs represent 80% of your total sales?
  2. How many sales represent 20% of your SKUs?
For more information about the theory behind the pareto law and its application in Supply Chain Management: Pareto Principle for Warehouse Layout Optimization


ABC Analysis with Demand Variability

Streamlit App Screenshot: ABC Analysis plot

QUESTIONS: WHAT IS THE PROPORTION OF?

  1. LOW IMPORTANCE SKUS: C references
  2. STABLE DEMAND SKUS: A and B SKUs with a coefficient of variation below 1
  3. HIGH IMPORTANCE SKUS: A and B SKUS with a high coefficient of variation

Your inventory management strategies will be impacted by this split:

  • A minimum effort should be put in LOW IMPORTANCE SKUS
  • Automated rules with moderate attention for STABLE SKUS
  • Complex replenishment rules and careful attention for HIGH IMPORTANCE SKUS
Streamlit App Screenshot: ABC SKU split for each family/category

QUESTIONS:

  1. What is the split of SKUS by FAMILY?
  2. What is the split of SKUS by ABC class in each FAMILY?


Normality Test

Streamlit App Screenshot: Normality test

QUESTION:

  • Which SKUs have a sales distribution that follows a normal distribution?

Many inventory rules and safety stock formulas can be used only if the sales distribution of your item is following a normal distribution. Therefore, it's better to know the % of your portfolio that can be managed easily.

šŸ“‰ Access the Application

You can access the application here: link

šŸ–„ļø
The entire source code with explanations is available in this Github repository: Code.

Step 0: Why should you use it?

This Streamlit Web Application has been designed for Supply Chain Engineers to support them in their Inventory Management. It will help you to automate product segmentation using statistics.

Step 1: What do you want to do?

You have two ways to use this application:

  • šŸ–„ļø Look at the results computed by the model using the pre-loaded dataset: in that case you just need to scroll to see the visuals and the analyses OR
  • šŸ’¾ Upload your dataset of sales records that includes columns related to:
  • Item master data For example SKU ID, Category, Sub-Category, Store ID
  • Date of the sales: For example Day, Week, Month, Year
  • Quantity or value: this measure will be used for the ABC analysis For example units, cartons, pallets or euros/dollars/your local currency

Step 2: Prepare the analysis

1. šŸ’¾ Upload your dataset of sales records

Step 1: upload your dataset of sales records

šŸ’” Please make sure that your dataset format is csv with a file size lower than 200MB. If you want to increase the size, you'd better copy this repository and deploy the app locally following the instructions below.

2. šŸ“… [Parameters] select the columns for the date (day, week, year) and the values (quantity, $)

Step 2: Select the columns for the date (day, week, year) and the values (quantity, $)

šŸ’” If you have several columns for the date (day, week, month) and for the values (quantity, amount) you can use only one column per category for each run of calculation.

3. šŸ“‰ [Parameters] select all the columns you want to keep in the analysis

Step 3: Select the columns for the date (day, week, year)
šŸ’” This step will basically help you to remove the columns that you do not need for your analysis to increase the speed of computation and reduce the usage of ressources.

4. šŸ¬ [Parameters] select all the related to product master data (SKU ID, FAMILIY, CATEGORY, STORE LOCATION)

Step 4: select all the related to product master data (SKU ID, FAMILIY, CATEGORY, STORE LOCATION)
šŸ’” In this step you will show at what granularity you want to do your analysis.

For example, it can be at:

  • Item, Store level: that means the same item in two stores will represent two SKU
  • Item ID level: that means you group the sales of your item in all stores

5. šŸ›ļø [Parameters] select one feature you want to use for analysis by family

Step 5: select one feature you want to use for analysis by family
šŸ’” This feature will be used to plot the repartition of (A, B, C) products by family

6. šŸ–±ļø Click on Start Calculation? to launch the analysis

Step 6: Start Calculation
šŸ’” This feature will be used to plot the repartition of (A, B, C) product by family