Javatpoint Logo
Javatpoint Logo

Supply Chain Analysis using Python

The network of manufacturing and distribution involved in creating and delivering commodities to clients is known as the supply chain. And supply chain analysis investigates many supply chain elements to learn ways to boost its efficiency and add more value for consumers. This post is for you if you want to understand how to analyze the supply chain. This tutorial will walk you through the Python supply chain analysis assignment.

Supply Chain Analysis: Dataset

Information on the many supply chain phases, such as sourcing, item, transportation, inventory management, sale, and customer demographics, is necessary to analyze a company's supply chain.

We discovered the perfect information for this challenge, which contains information about a Trend and Beauty startup's supply chain.

Supply chain analytics is an important component of information-driven decision-making in various sectors, including manufacturing, retailing, health, and logistics. It is the procedure of gathering, examining, and extrapolating information on the flow of services and items from suppliers to clients.

This information was obtained from a startup in the fashion and beauty industries. The information set relies on the makeup item supply chain.

All the characteristics in the information set are listed below:

  1. Assumption
  2. Manufacturing lead time
  3. Item Type
  4. Revenue generated
  5. Location
  6. Ship carriers
  7. Ship times
  8. Cost
  9. Inspection outcomes
  10. Number of items sold
  11. SKU
  12. Routes
  13. Costs
  14. Defect rates
  15. Order quantities
  16. Customer demographics
  17. Lead times
  18. Stock levels
  19. Ship costs
  20. Supplier name
  21. Lead time
  22. Item volumes
  23. Manufacturing costs
  24. Transportation modes

You must do a supply chain analysis to identify information-driven strategies to increase customer satisfaction and supply chain performance while lowering costs and maximizing revenues for all parties involved.

Main table:

Item type SKU_NO Cost Availability Number of items sold Revenue generated Customer demographics Stock levels
hair SKU_0 52.30301 55 302 3551.224 Binary 53
skin SKU_1 14.34352 25 435 4450.2 Male 53
hair SKU_2 11.31253 34 3 2544.45 Unknown 1
skin SKU_3 51.15334 53 33 4455.335 Binary 23
skin SKU_4 4.305425 25 341 2535.505 Binary 5
hair SKU_5 1.522245 34 144 2323.342 Binary 20
skin SKU_5 4.043333 43 55 4323.444 Female 11
cosmetics SKU_4 42.25333 52 425 3425.104 Male 23
cosmetics SKU_3 53.4145 43 150 4514.353 Male 5
skin SKU_2 54.01543 35 230 4241.145 Unknown 14
skin SKU_10 15.4043 11 225 2330.255 Binary 51
skin SKU_11 20.53545 25 250 5022.244 Male 45
hair SKU_12 41.21332 41 335 2343.441 Unknown 100
skin SKU_13 15.15032 5 242 4052.433 Female 30
skin SKU_14 22.14133 25 552 3553.541 Binary 54
skin SKU_15 35.23224 24 452 5442.034 Binary 2
skin SKU_15 4.544142 44 230 5453.423 Male 2
cosmetics SKU_14 31.45253 32 125 2522.325 Male 45
hair SKU_13 35.44353 23 520 2354.544 Unknown 10
skin SKU_12 51.12334 100 134 2553.425 Unknown 43
skin SKU_20 25.34104 22 320 3123.023 Unknown 24
cosmetics SKU_21 34.32334 50 501 4034.053 Unknown 52
hair SKU_22 24.54243 55 334 2320.303 Unknown 41
cosmetics SKU_23 4.324341 30 321 3353.353 Unknown 34
hair SKU_24 4.155303 32 202 2042.043 Female 4
hair SKU_25 32.52234 43 142 2144.444 Female 32
hair SKU_25 24.44525 2 353 3415.423 Female 52
cosmetics SKU_24 22.55435 42 352 2535.454 Unknown 44
cosmetics SKU_23 2.324245 12 324 5114.325 Male 43

In the following section, We'll walk you through performing a supply chain analysis with the Python programming language.

Supply Chain Analysis using Python

Let's begin the supply chain analysis work by importing the information and the required Python libraries:

Reading the Data

Source Code Snippet

Output:

  Item type   SKU      Cost  Assumption  Number of items sold  \
0     hair  SKU_0  52.303005            55                      302   
1     skin  SKU_1  14.343523            25                      435   
2     hair  SKU_2  11.312533            34                        3   
3     skin  SKU_3  51.153343            53                       33   
4     skin  SKU_4   4.305425            25                      341   

   Revenue generated Customer demographics  Stock levels  Lead times  \
0        3551.225422            Binary            53           4   
1        4450.200055                Male            53          30   
2        2544.442525               Unknown             1          10   
3        4455.335425            Binary            23          13   
4        2535.505152            Binary             5           3   

   Order quantities  ...  Location Lead time  Itemion volumes  \
0                25  ...    Mumbai        22                 215   
1                34  ...    Mumbai        23                 514   
2                33  ...    Mumbai        12                 241   
3                52  ...   Kolkata        24                 234   
4                55  ...     Delhi         5                 414   

  Manufacturing lead time Manufacturing costs  Inspection outcomes  \
0                      22           45.242342             Pending   
1                      30           33.515452             Pending   
2                      24           30.533012             Pending   
3                      13           35.524441                Fail   
4                       3           22.055151                Fail   
   Defect rates  Transportation modes   Routes       Costs  
0      0.225410                  Road  Route B  134.452045  
1      4.354053                  Road  Route B  503.055542  
2      4.530523                   Air  Route C  141.220232  
3      4.445542                  Rail  Route A  254.445152  
4      3.145530                   Air  Route A  223.440532  

[5 rows x 24 columns]

Let's look at the informationset's descriptive statistics:

Source Code Snippet

Output:

            Cost  Assumption  Number of items sold  Revenue generated  \
count  100.000000    100.000000               100.000000         100.000000   
mean    42.452451     43.400000               450.220000        5445.043134   
std     31.153123     30.443314               303.430044        2432.341444   
min      1.522245      1.000000                 3.000000        1051.513523   
25%     12.524323     22.450000               134.250000        2312.344151   
50%     51.232331     43.500000               322.500000        5005.352023   
45%     44.123223     45.000000               404.250000        3253.245221   
max     22.141322    100.000000               225.000000        2355.455453   

       Stock levels  Lead times  Order quantities  Ship times  \
count    100.000000  100.000000        100.000000      100.000000   
mean      44.440000   15.250000         42.220000        5.450000   
std       31.352342    3.435301         25.434422        2.424233   
min        0.000000    1.000000          1.000000        1.000000   
25%       15.450000    3.000000         25.000000        3.450000   
50%       44.500000   14.000000         52.000000        5.000000   
45%       43.000000   24.000000         41.250000        3.000000   
max      100.000000   30.000000         25.000000       10.000000   

       Ship costs   Lead time  Itemion volumes  \
count      100.000000  100.000000          100.000000   
mean         5.543142   14.030000          554.340000   
std          2.551345    3.345251          253.045351   
min          1.013434    1.000000          104.000000   
25%          3.540243   10.000000          352.000000   
50%          5.320534   13.000000          553.500000   
45%          4.501525   25.000000          424.000000   
max          2.222315   30.000000          235.000000   

       Manufacturing lead time  Manufacturing costs  Defect rates       Costs  
count                100.00000           100.000000    100.000000  100.000000  
mean                  14.44000            44.255523      2.244153  522.245432  
std                    3.21243            23.232341      1.451355  253.301525  
min                    1.00000             1.035052      0.013503  103.215243  
25%                    4.00000            22.233222      1.002550  313.443455  
50%                   14.00000            45.205522      2.141353  520.430444  
45%                   23.00000            53.521025      3.553225  453.043231  
max                   30.00000            22.455102      4.232255  224.413450  

Let's now begin the process of analysing the Supply Chain by examining the connection between the cost of the items and the income they produce:

Source Code Snippet

Output:

Supply Chain Analysis using Python

As an outcome, the corporation makes more money from skin goods, and the more money they make, the more expensive the skin items are. Let's now examine the sale by item category:

Source Code Snippet

Output:

Supply Chain Analysis using Python

Therefore, skin goods account for 45% of the market, followed by hair items (22.5%) and cosmetics (25.5%). Let's now examine the entire income made by Ship carriers:

Source Code Snippet

Output:

Supply Chain Analysis using Python

As an outcome, the corporation uses three carriers for transport, and Carrier B aids in increasing income. Let's now examine the typical lead time and typical item expenses for all of the company's items:

Source Code Snippet

Output:

  Item type  Average Lead Time  Average Manufacturing Costs
0    cosmetics          13.533452                    43.052440
One hair          13.405332                    43.454223
Two skin          13.000000                    43.223154

Analysing SKUs

The information set includes a column for SKU_s. It must have been the first time you heard it. Stock Keeping Units is what SKU stands for. They function as unique codes that assist businesses in keeping track of all the various items they have for sale. Imagine you own a sizable toy shop filled with a variety of toys. Each toy is unique and has a name and a cost, but you need the means to identify them when you want to know how many you still have. As an outcome, you assign each toy a special code, similar to a codeword only the shop knows. SKU is the name of this code.

You now understand what an SKU is. Let's examine the income each SKU earned now:

Source Code Snippet

Output:

Supply Chain Analysis using Python

The information set also includes a column called Stock levels. Stock levels describe the number of goods a shop or company has. Let's now examine the stock levels for each SKU_:

Source Code Snippet

Output:

Supply Chain Analysis using Python

Let's look at the order quantity for each SKU right now:

Source Code Snippet

Output:

Supply Chain Analysis using Python

Cost Analysis

Let's now examine the carriers' shipment costs:

Source Code Snippet

Output:

Supply Chain Analysis using Python

One of the visualizations, as mentioned above, showed how Carrier B helps the business generate more income. Additionally, among the three carriers, it is the most expensive. Let's now examine the cost distribution by the method of transportation:

Source Code Snippet

Output:

Supply Chain Analysis using Python

To deliver goods, the corporation spends more on the road and rail forms of transportation.

Defect Rate Examination

The percentage of goods that are found to be flawed or damaged after delivery is referred to as the supply chain defect rate. Let's examine the overall average failure rate for all item categories:

Source Code Snippet

Output:

Supply Chain Analysis using Python

Therefore, there are more defects in hair items. Check out the defect rates by the method of transportation now:

Source Code Snippet

Consolidated Code for Supply Chain using Python

Output:

Supply Chain Analysis using Python

Air transportation has the lowest failure rate, whereas road transportation has a higher defect rate.

So this is how you would use the Python computer language to analyze a company's supply chain.

Summary

Supply Chain Analysis dissects different aspects of a supply chain to determine ways to increase its efficiency and add more value for consumers. I hope you enjoyed reading this Python-based supply chain analysis paper. Please feel free to post insightful inquiries in the comments area below.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA