Mixed Effect Models confirm the differences within shipping modes. In detail, this is explained by the variation seen in the models. There is a statistically significant relationship between LateDeliveryRisk and DaysForShippingReal. Adding random effects to the model confirms the differences in delivery times between shipping modes. On average, deliveries move around by 1.6 days. By looking at the correlation of fixed effects we confirm that the different shipping modes are not balanced
First Class is the most reliable shipping mode. Almost half of Same Day deliveries are late by one day. Standard Class and Second Class Deliveries account for most deliveries and face the biggest risk to be delivered late by about 2.5 days
Same Day: 5.4% of total deliveries are shipped with Same Day. Almost half (46%) of deliveries are late. The average delay is one day
First Class: 15.4% of total deliveries are shipped with First Class. It´s the most reliable Shipping Method (95% on Time)
Second Class: 19.5% of total deliveries are shipped with Second Class. About 76% of all deliveries are late. The average delay is about two days
Standard Class: 59.7% of total deliveries are shipped with Standard Class. Of these deliveries, 39% are late. The average delay is about 2.5 days
Further analysis on operational efficiency and in-house supply chain: Are late deliveries caused by internal or external factors? Are certain geographies more affected by late deliveries? Are specific products more likely to be delivered late? Are there problems with transportation routes, product sizes, batching etc?
After further analysis of the supply chain, and assuming there are no internally driven problems causing late deliveries: DataCo Global should find a more reliable Shipping Partner and shift most deliveries to First Class and Same Day.
Created by: David Springhetti
---
title: "DataCo Global"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: fill
social: menu
source_code: embed
html_document:
df_print: paged
---
```{r setup, include=FALSE}
library(flexdashboard)
library(knitr)
library(DT)
library(rpivotTable)
library(ggplot2)
library(plotly)
library(dplyr)
library(openintro)
library(highcharter)
library(ggvis)
```
```{r}
scmD <- read.csv("DataCoGlobal.csv")
```
```{r}
mycolors <- c("blue", "#FFC125", "darkgreen", "darkorange")
```
Deliveries Overview
=====================================
Row
-------------------------------------
###
```{r}
valueBox(paste("Freight Mode Analysis"),
color = "cornflowerblue", icon = "fa-shipping-fast")
```
### Total Deliveries
```{r}
valueBox(length(scmD$LateDeliveryRisk))
```
### First Class (%)
```{r}
valueBox(paste("15.4"))
```
### Same Day (%)
```{r}
valueBox(5.4)
```
### Second Class (%)
```{r}
valueBox(19.5)
```
### Standard Class (%)
```{r}
valueBox(59.7)
```
Row
-------------------------------
### Total Deliveries by Shipping Mode
```{r}
library(plotly)
Shipping_D <- table(scmD$LateDeliveryRisk, scmD$ShippingMode)
Shipping_P <- prop.table(Shipping_D, margin = 2) %>% {. * 100} %>% round(1)
Splot = as.data.frame(Shipping_P)
ShippingMode <- c("First Class", "Same Day", "Second Class", "Standard Class")
OnTime <- c(95.3, 54.3, 23.4, 61.9)
Late <- c(4.7, 45.7, 76.6, 38.1)
data <- data.frame(ShippingMode, OnTime, Late)
fig <- plot_ly(data, x = ~ShippingMode, y = ~OnTime, type = 'bar',
name = 'On Time', marker = list(color = 'blue'))
fig <- fig %>% add_trace(y = ~Late, name = 'Late',
marker = list(color = 'red'))
fig <- fig %>% layout(yaxis = list(title = ''), barmode = 'group',
xaxis = list(title = ''))
fig
```
### Random Intercept Model
```{r}
library(ggplot2)
scmD$ShippingMode <- factor(scmD$ShippingMode, levels = c("Standard Class", "Second Class", "First Class", "Same Day"))
scmd_ship <- scmD %>%
group_by(ShippingMode, LateDeliveryRisk) %>%
summarise(mean_days = mean(DaysForShippingReal, na.rm = TRUE))
ggplot(scmd_ship, aes(LateDeliveryRisk, mean_days,
group = ShippingMode, color = ShippingMode)) +
geom_line(linetype = 'dashed', size = 1) +
geom_point (size = 4) +
labs(title = " ",
x = "Delivery",
y = "Shipping Days",
color = " ") +
scale_y_continuous(breaks=c(1,2,3,4,5)) +
scale_x_continuous(breaks=c(0, 0.25, 0.5, 0.75, 1),
labels=c("On Time", " ", " ", " ", "Late")) +
theme_minimal()
```
Next Steps
========================================
Row
-------------------------------------
### Step 1
```{r}
valueBox("Further analysis on in-house supply chain")
```
Row
-------------------------------
### Step 2
```{r}
valueBox("Use analysis to discuss new shipping terms")
```
Row
-------------------------------
### Step 3
```{r}
valueBox("Offer Premium Membership with unlimited free shipping")
```
Actions
========================================
Row
-------------------------------------
### Action Steps
```{r}
valueBox(3, icon = "fa-tasks")
```
### Progress
```{r}
ActualProgress <- 1
gauge(ActualProgress,
min = 0,
max = 3,
gaugeSectors(success = c(3,3),
warning = c(2,2),
danger = c(0,1),
colors = c("green", "yellow", "red")))
```
Row
-------------------------------
### Detailed Action Steps
1) Mixed Effect Models confirm the differences within shipping modes. In detail, this is explained by the variation seen in the models.
There is a statistically significant relationship between LateDeliveryRisk and DaysForShippingReal. Adding random effects to the model confirms the differences in delivery times between shipping modes. On average, deliveries move around by 1.6 days. By looking at the correlation of fixed effects we confirm that the different shipping modes are not balanced
2) First Class is the most reliable shipping mode. Almost half of Same Day deliveries are late by one day. Standard Class and Second Class Deliveries account for most deliveries and face the biggest risk to be delivered late by about 2.5 days
* Same Day: 5.4% of total deliveries are shipped with Same Day. Almost half (46%) of deliveries are late. The average delay is one day
* First Class: 15.4% of total deliveries are shipped with First Class. It´s the most reliable Shipping Method (95% on Time)
* Second Class: 19.5% of total deliveries are shipped with Second Class. About 76% of all deliveries are late. The average delay is about two days
* Standard Class: 59.7% of total deliveries are shipped with Standard Class. Of these deliveries, 39% are late. The average delay is about 2.5 days
3) Further analysis on operational efficiency and in-house supply chain:
Are late deliveries caused by internal or external factors?
Are certain geographies more affected by late deliveries?
Are specific products more likely to be delivered late?
Are there problems with transportation routes, product sizes, batching etc?
4) After further analysis of the supply chain, and assuming there are no internally driven problems causing late deliveries: DataCo Global should find a more reliable Shipping Partner and shift most deliveries to First Class and Same Day.
a) Close a deal with a Shipping Company (FedEx, UPS) for First Class Shipping on all products
b) Offer a membership package to customers with unlimited First Class Shipping
5) Once actions are implemented, customer satisfaction and sales are projected to increase. DataCo Global should focus on current and niche markets to sell their products to establish a favorable position within the market
Data Table
========================================
```{r, layout="l-body-outset"}
library(rmarkdown)
library(knitr)
rmarkdown::paged_table(scmD, options = list(rows.print = 15))
```
About
========================================
Created by: David Springhetti