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
streamlit Application UI
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). However as a Supply Chaine Engineer your focus is not on the product itself but more on the complexity of managing its flow.
Your want 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 portofolio considering the complexity of the demand and the volumes contribution of each item.
In this Article, you can find details about the theory used to build this tool.
Access it here: Product Segmentation for Retail
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.
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 1: upload your dataset of sales records
π‘ Please make sure that you 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.
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.
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
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) product by family
Step 6: Start Calculation
π‘ This feature will be used to plot the repartition of (A, B, C) product by family
Concept Pareto Analysis
INSIGHTS:
- How many SKU represent 80% of your total sales?
- How much 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
Streamlit App Screenshot: ABC Analysis plot
QUESTIONS: WHAT IS THE PROPORTION OF?
- LOW IMPORTANCE SKUS: C references
- STABLE DEMAND SKUS: A and B SKUs with a coefficient of variation below 1
- 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 a moderate attention for STABLE SKUS
- Complex replenishment rules and careful attention for HIGH IMPORTANCE SKUS
For more information: Article
Streamlit App Screenshot: ABC SKU split for each family/category
QUESTIONS:
- What is the split of SKUS by FAMILY?
- What is the split of SKUS by ABC class in each FAMILY?
Streamlit App Screenshot: Normality test
QUESTION:
- Which SKUs have a sales distribution that follows a normal distribution?
Many inventory rules and safety stock formula can be used only if the sales distribution of your item is following a normal distribution. Thefore, it's better to know the % of your portofolio that can be managed easily.
For more information: Inventory Management for Retail β Stochastic Demand
sudo pip3 install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
streamlit run segmentation.py
-> Enjoy!
Senior Supply Chain Engineer with an international experience working on Logistics and Transportation operations.
Have a look at my portfolio: Data Science for Supply Chain Portfolio
For consulting or advising on analytics and sustainable supply chain transformation, feel free to contact me via Logigreen Consulting
Data Science for Warehousingπ¦, Transportation π and Demand Forecasting π