Notes:
-
Problem Solved: Tracks and scores supplier performance based on delivery timeliness, quality, and cost.
-
Benefits: Businesses can identify top-performing suppliers and negotiate better terms.
-
Adoption: Can be extended into dashboards or monthly supplier performance reports.
Python Code:
import pandas as pd
class SupplierPerformance:
def __init__(self, performance_data):
self.df = pd.DataFrame(performance_data)
def calculate_scores(self):
self.df['Score'] = (
self.df['OnTimeDelivery'] * 0.4 +
self.df['QualityRating'] * 0.4 +
(100 - self.df['CostVariance']) * 0.2
)
return self.df.sort_values('Score', ascending=False)
# Sample supplier performance data
data = [
{'Supplier': 'Supplier A', 'OnTimeDelivery': 95, 'QualityRating': 90, 'CostVariance': 5},
{'Supplier': 'Supplier B', 'OnTimeDelivery': 85, 'QualityRating': 88, 'CostVariance': 3},
{'Supplier': 'Supplier C', 'OnTimeDelivery': 98, 'QualityRating': 92, 'CostVariance': 10},
]
sp = SupplierPerformance(data)
scores_df = sp.calculate_scores()
print(scores_df[['Supplier', 'Score']])
No comments:
Post a Comment