To support the 2020 MSOM Data Driven Research Challenge dataset provided by JD.com, this document provides a simple illustrative example on what is in the data and how to connect the data between varies tables to make effective analysis. The notebook can be used as a reference to help understanding the dataset. It is als runnable using the dataset for data exploration as a Jupyter notebook. For more detailed description of the data, data schema and underlying business scenario, please refer to the main document.
import pandas as pd
import numpy as np
import datetime as dt
# 'skus' table
skus = pd.read_csv('JD_sku_data.csv')
# 'users' table
users = pd.read_csv('JD_user_data.csv')
# 'clicks' table
clicks = pd.read_csv('JD_click_data.csv')
# 'orders' table
orders = pd.read_csv('JD_order_data.csv')
# 'delivery' table
delivery = pd.read_csv('JD_delivery_data.csv')
# 'inventory' table
inventory = pd.read_csv('JD_inventory_data.csv')
# 'network' table
network = pd.read_csv('JD_network_data.csv')
skus.head()
users.head()
clicks.head()
orders.head().T
delivery.head()
inventory.head()
network.head()
We first randomly select a customer order with order_ID ‘81a6fa818d’ from the order table. The data below shows the information in orders table corresponding to the order.
orders[orders['order_ID']=='81a6fa818d'].T
Taking a deeper look at the customer with user_ID '2c511cbd9e' from users table.
users[users['user_ID']=='2c511cbd9e']
Now checking the information available in the skus table for the related SKUs.
skus[skus['sku_ID'].isin(['ac61f4e10e','eb3f2d2fd8'])]
clicks table can also provide further information on how this purchase happened.
clicks[clicks['user_ID']=='2c511cbd9e'].sort_values('request_time')
Now we look at how the order is fulfilled. Firstly we can look at the warehouse that is used to fulfill the order from orders table.
orders[orders['order_ID']=='81a6fa818d'][['sku_ID', 'dc_ori', 'dc_des']]
The delivery table can provide more details on the shipment information
delivery[delivery['order_ID']=='81a6fa818d']
The inventory table would be able to provide more insights on the fulfillment logic.
inventory[(inventory['sku_ID'].isin(['ac61f4e10e','eb3f2d2fd8'])) & \
(inventory['date']=='2018-03-01') & (inventory['dc_ID']==27)]
inventory[(inventory['sku_ID'].isin(['ac61f4e10e','eb3f2d2fd8'])) & \
(inventory['date']=='2018-03-01') & (inventory['dc_ID']==9)]
The fulfillment logic can be further clarified using the network table.
network[network['dc_ID'].isin([9, 27])]