Supply Chain Analytics in Tableau or Power BI
📖 Background
Test your BI skills on a real-world dataset focusing on supply chain analytics. As the main data analyst for Just In Time, you will help solve key shipment and inventory management challenges, analyze supply chain inefficiencies, and create insightful dashboards to inform business stakeholders about potential problems and propose structural business improvements.
Be creative and make use of your full skillset! Use this Workspace to prepare your data, import the tables into your local Tableau or Power BI instance, and share your insights below.
The end goal will be a (set of) interactive dashboards that demonstrate clear insights for Just In Time.
💾 The data
Group | Column name | Dataset | Definition |
---|---|---|---|
Customer | Customer ID | orders_and_shipments.csv | Unique customer identification |
Customer | Customer Market | orders_and_shipments.csv | Geographic grouping of customer countries, with values such as Europe, LATAM, Pacific Asia, etc. |
Customer | Customer Region | orders_and_shipments.csv | Geographic grouping of customer countries, with values such as Northern Europe, Western Europe, etc. |
Customer | Customer Country | orders_and_shipments.csv | Customer's country |
Order info | Order ID | orders_and_shipments.csv | Unique Order identification. Order groups one or multiple Order Items |
Order info | Order Item ID | orders_and_shipments.csv | Unique Order Item identification. Order Item always belong to just one Order |
Order info | Order Year | orders_and_shipments.csv | Year of the order |
Order information | Order Month | orders_and_shipments.csv | Month of the order |
Order information | Order Day | orders_and_shipments.csv | Day of the order |
Order information | Order Time | orders_and_shipments.csv | Timestamp of the order in UTC |
Order information | Order Quantity | orders_and_shipments.csv | The amount of items that were ordered within a given Order Item (1 record of the data) |
Product | Product Department | orders_and_shipments.csv | Product grouping into categories such as Fitness, Golf, Pet Shop, etc. |
Product | Product Category | orders_and_shipments.csv | Product grouping into categories such as Sporting Goods, Women's Apparel, etc. |
Product | Product Name | orders_and_shipments.csv | The name of the purchased product |
Sales | Gross Sales | orders_and_shipments.csv | Revenue before discounts generated by the sales of the Order Item (1 record of the data) |
Sales | Discount % | orders_and_shipments.csv | Discount % applied on the catalog price |
Sales | Profit | orders_and_shipments.csv | Profit generated by the sales of the Order Item (1 record of data) |
Shipment information | Shipment Year | orders_and_shipments.csv | Year of the shipment |
Shipment information | Shipment Month | orders_and_shipments.csv | Month of the shipment |
Shipment information | Shipment Day | orders_and_shipments.csv | Day of the shipment |
Shipment information | Shipment Mode | orders_and_shipments.csv | Information on how the shipment has been dispatched, with values as First Class, Same Day, Second Class, etc. |
Shipment information | Shipment Days - Scheduled | orders_and_shipments.csv | Information on typical amount of days needed to dispatch the goods from the moment the order has been placed |
Warehouse | Warehouse Country | orders_and_shipments.csv | Country of the warehouse that has fulfilled this order, the only two values being Puerto Rico and USA |
Inventory & Fulfillment | Warehouse Inventory | inventory.csv | The monthly level of inventory of a product, e.g. 930 units |
Inventory & Fulfillment | Inventory cost per unit | inventory.csv | The monthly storage cost per unit of inventory, e.g. $2.07 |
Inventory & Fulfillment | Warehouse Order fulfillment (days) | fulfillment.csv | The average amount of days it takes to refill stock if inventory drops below zero |
The data can be downloaded from the sidebar on the left (under Files).
💪 Challenge
Using either Tableau or Power BI, create an interactive dashboard to summarize your research. Things to consider:
- Use this Workspace to prepare your data (optional).
- Some ideas to get you started: visualize how shipments are delayed, by country, product, and over time. Analyze products by their supply versus demand ratio. Rank products by over or understock. Don't feel limited by these, you're encouraged to use your skills to consolidate as much information as possible.
- Create a screenshot of your (main) Tableau or Power BI dashboard, and paste that into the designated field.
- Summarize your findings in an executive summary.
Reading the Data
import pandas as pd
data = pd.read_csv("data/orders_and_shipments.csv")
data.head()
Data Cleaning
Determining if is there any null values and the data types.
def data_info():
temp = pd.DataFrame(index = data.columns)
temp["Datatype"] = data.dtypes
temp["Non-null Values"] = data.count()
temp["Null Values"] = data.isnull().sum()
temp["% of Null Values"] = (data.isnull().mean())*100
temp["Unique Count"] = data.nunique()
return temp
data_info()
Checking if there is any duplicates
dup = data[data.duplicated()].shape[0]
if dup == 0:
print("There are not duplicated rows")
else:
print(f"There are {dup} rows")
data.columns
Removing the spaces from the columns names
data.columns = data.columns.str.strip()
data.columns
Changing some data types
#Replacing some "-" for zeros and convert it to float the column Discount%
data['Discount %'] = data['Discount %'].replace(' - ', 0)
data['Discount %'] = data['Discount %'].astype('float')
#Creating a Order Date which is going to be more useful in Tableau.
data['Order Date'] = pd.to_datetime(
data["Order Year"].astype(str)+
data["Order Month"].astype(str).str.zfill(2)+
data["Order Day"].astype(str).str.zfill(2) +
' ' +
data["Order Time"], format='%Y%m%d %H:%M'
)
#Creating a shipment Date which is going to be more useful in Tableau.
data['Shipment Date'] = pd.to_datetime(
data["Shipment Year"].astype(str)+
data["Shipment Month"].astype(str).str.zfill(2)+
data["Shipment Day"].astype(str).str.zfill(2)
)
#lets drop the columns we won't use in tableau
columnstodrop = ['Order Year', 'Order Month', 'Order Day', 'Order Time', 'Order YearMonth', 'Shipment Year', 'Shipment Month', 'Shipment Day']
data = data.drop(columnstodrop,axis=1)
#Checking the new data types of our new Data Frame
data_info()
**Checking each of the variables possible values to see if there is anything to correct on the column names. **