Analysis done for Via

Importing the dataset in R

R Markdown

library(readxl)
Via_ <- read_excel("D:/UIC/Interviews/Via .xlsx", 
    col_types = c("text", "text", "date"))
Via_<-Via_[complete.cases(Via_),]

Exploratory Analysis

Calculating how many agents are there ?

library(knitr)
No_of_accounts_manager<-length(unique(Via_$`Account manager`))
Names_of_accounts_manager<-as.data.frame(unique(Via_$`Account manager`))
colnames(Names_of_accounts_manager)<-"Names"
kable(Names_of_accounts_manager)
Names
Milan Crona
Aidan Pouros
Chauncey Dach
Rigoberto White

Calculating how many different clients are there ?

No_of_unique_clients<-length(unique((Via_$`Client Name`)))
No_of_unique_clients
## [1] 35

We can see that there are 4 different accounts manager and 25 different clients

Now we will see how many account manager have handled different clients

library("ggplot2")
g1<-ggplot(data=Via_)+
geom_bar(aes(x=Via_$`Account manager`,fill=Via_$`Client Name`))

plot(g1)

library("dplyr")
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
#??? scope of improvement of code ???
 
Milan_Crona<-Via_[Via_$`Account manager`==Names_of_accounts_manager[1,],]
  
FMilanCrona<-as.data.frame(sort(table(Milan_Crona$`Client Name`),decreasing=TRUE))
colnames(FMilanCrona)<-"MCClient Name"
    
Aidan_Pouros<-Via_[Via_$`Account manager`==Names_of_accounts_manager[2,],]
  
FAidan_Pouros<-as.data.frame(sort(table(Aidan_Pouros$`Client Name`),decreasing=TRUE))
colnames(FAidan_Pouros)<-"APClient Name"

Chauncey_Dach<-Via_[Via_$`Account manager`==Names_of_accounts_manager[3,],]
  
FChauncey_Dach<-as.data.frame(sort(table(Chauncey_Dach$`Client Name`),decreasing=TRUE))
colnames(FChauncey_Dach)<-"CDClient Name"

Rigoberto_White<-Via_[Via_$`Account manager`==Names_of_accounts_manager[4,],]
  
FRigoberto_White<-as.data.frame(sort(table(Rigoberto_White$`Client Name`),decreasing=TRUE))
colnames(FRigoberto_White)<-"RWClient Name"

kable(FMilanCrona)
MCClient Name NA
Lemke-Pfannerstill 15
Hermiston, Armstrong and Balistreri 13
Ondricka-Wolff 13
Denesik, Stehr and Carter 12
Eichmann and Sons 12
Halvorson LLC 12
Kris, Shanahan and Quigley 12
Stamm-Crooks 12
Brown, Wyman and Grimes 11
Mitchell and Sons 11
Medhurst, Ankunding and Wolff 10
Veum, McClure and Schuster 10
Abbott Group 9
Franecki-Feil 9
Hoppe-Batz 9
Johnston-Schaden 9
Thompson, Howell and Hegmann 9
Donnelly-Champlin 8
Kuhic, Stark and Kreiger 8
Sanford and Sons 8
Walter Inc 8
Anderson, Kutch and Hyatt 7
Armstrong Group 7
Hagenes Inc 6
Lindgren, Graham and Spinka 6
Oga, Gottlieb and Cruickshank 6
Fahey, Wunsch and Bashirian 5
Wyman, Farrell and Haag 5
Bosco-Ortiz 4
Hauck Group 4
Lueilwitz, Moore and Hahn 4
Orn, Russel and O’Reilly 4
Koss Inc 3
Trantow Inc 3
Cormier LLC 2
kable(FAidan_Pouros)
APClient Name NA
Cormier LLC 11
Walter Inc 11
Fahey, Wunsch and Bashirian 10
Franecki-Feil 10
Abbott Group 9
Bosco-Ortiz 9
Brown, Wyman and Grimes 9
Koss Inc 9
Donnelly-Champlin 8
Eichmann and Sons 8
Hoppe-Batz 8
Johnston-Schaden 8
Medhurst, Ankunding and Wolff 8
Mitchell and Sons 8
Stamm-Crooks 8
Wyman, Farrell and Haag 8
Anderson, Kutch and Hyatt 7
Denesik, Stehr and Carter 7
Lueilwitz, Moore and Hahn 7
Thompson, Howell and Hegmann 7
Armstrong Group 6
Hagenes Inc 6
Kris, Shanahan and Quigley 6
Lindgren, Graham and Spinka 6
Hauck Group 5
Hermiston, Armstrong and Balistreri 5
Lemke-Pfannerstill 5
Oga, Gottlieb and Cruickshank 5
Ondricka-Wolff 5
Kuhic, Stark and Kreiger 4
Trantow Inc 4
Halvorson LLC 3
Orn, Russel and O’Reilly 3
Sanford and Sons 3
Veum, McClure and Schuster 3
kable(FChauncey_Dach)
CDClient Name NA
Medhurst, Ankunding and Wolff 14
Fahey, Wunsch and Bashirian 12
Stamm-Crooks 11
Denesik, Stehr and Carter 10
Donnelly-Champlin 10
Wyman, Farrell and Haag 10
Abbott Group 9
Armstrong Group 9
Johnston-Schaden 9
Mitchell and Sons 9
Hagenes Inc 8
Kuhic, Stark and Kreiger 8
Orn, Russel and O’Reilly 8
Brown, Wyman and Grimes 7
Halvorson LLC 7
Koss Inc 7
Oga, Gottlieb and Cruickshank 7
Ondricka-Wolff 7
Sanford and Sons 7
Veum, McClure and Schuster 7
Anderson, Kutch and Hyatt 6
Franecki-Feil 6
Hauck Group 6
Hermiston, Armstrong and Balistreri 6
Kris, Shanahan and Quigley 6
Lindgren, Graham and Spinka 6
Trantow Inc 6
Walter Inc 6
Cormier LLC 5
Eichmann and Sons 5
Thompson, Howell and Hegmann 5
Bosco-Ortiz 4
Hoppe-Batz 4
Lueilwitz, Moore and Hahn 4
Lemke-Pfannerstill 2
kable(FRigoberto_White)
RWClient Name NA
Eichmann and Sons 13
Lindgren, Graham and Spinka 10
Orn, Russel and O’Reilly 10
Wyman, Farrell and Haag 10
Donnelly-Champlin 9
Halvorson LLC 9
Veum, McClure and Schuster 9
Brown, Wyman and Grimes 8
Hoppe-Batz 8
Fahey, Wunsch and Bashirian 7
Johnston-Schaden 7
Mitchell and Sons 7
Oga, Gottlieb and Cruickshank 7
Thompson, Howell and Hegmann 7
Walter Inc 7
Bosco-Ortiz 6
Cormier LLC 6
Hermiston, Armstrong and Balistreri 6
Lemke-Pfannerstill 6
Sanford and Sons 6
Hauck Group 5
Koss Inc 5
Kris, Shanahan and Quigley 5
Lueilwitz, Moore and Hahn 5
Ondricka-Wolff 5
Trantow Inc 5
Abbott Group 4
Anderson, Kutch and Hyatt 4
Denesik, Stehr and Carter 4
Franecki-Feil 4
Kuhic, Stark and Kreiger 4
Medhurst, Ankunding and Wolff 4
Stamm-Crooks 4
Armstrong Group 3
Hagenes Inc 3

From the above tables we can get information such as which client met with which

library(lubridate)

Y2013<-(subset(Via_, format(Via_$`Date of Contact`,"%Y")==2013))
Y2014<-(subset(Via_, format(Via_$`Date of Contact`,"%Y")==2014))
Y2015<-(subset(Via_, format(Via_$`Date of Contact`,"%Y")==2015))
Y2016<-(subset(Via_, format(Via_$`Date of Contact`,"%Y")==2016))
Y2017<-(subset(Via_, format(Via_$`Date of Contact`,"%Y")==2016))
  
M2013<-as.data.frame(sort(table(lubridate::month(Y2013$`Date of Contact`)),decreasing = T))

colnames(M2013)<-c("Month","Frequency")
M2014<-as.data.frame(sort(table(lubridate::month(Y2014$`Date of Contact`)),decreasing = T))
colnames(M2014)<-c("Month","Frequency")
M2015<-as.data.frame(sort(table(lubridate::month(Y2015$`Date of Contact`)),decreasing = T))
colnames(M2015)<-c("Month","Frequency")
M2016<-as.data.frame(sort(table(lubridate::month(Y2016$`Date of Contact`)),decreasing = T))
colnames(M2016)<-c("Month","Frequency")
M2017<-as.data.frame(sort(table(lubridate::month(Y2017$`Date of Contact`)),decreasing = T))
colnames(M2017)<-c("Month","Frequency")

kable(M2013)
Month Frequency
10 60
11 19
12 19
kable(M2014)
Month Frequency
10 58
9 33
8 25
6 23
7 21
12 19
5 18
11 18
1 13
2 12
3 12
4 12
kable(M2015)
Month Frequency
10 53
9 29
2 20
7 20
8 20
5 18
6 16
11 16
12 16
4 15
1 14
3 14
kable(M2016)
Month Frequency
10 42
9 28
6 22
12 22
1 21
3 19
2 18
5 17
8 15
4 13
11 12
7 11
kable(M2017)
Month Frequency
10 42
9 28
6 22
12 22
1 21
3 19
2 18
5 17
8 15
4 13
11 12
7 11

From this we know that most of times agents contacted in the Month of October in all the years