Introduction

Greetings!. I made up a dataset for practice purposes detailing the performance of Fenix, aka the Steward of the Templar, in Hero League matches.

In order for there to be some clarity. Let us make some assumptions:

On this R Markdoawn document, we focus more on the wins

The objectives of this analysis are: - To determine and visualize what map in where Fenix arguably does well in terms of kills, assists, deaths - To determine and visualize what map does Fenix have the longest games and shortest games in during his wins - To determine and visualize what ultimate does Fenix do well (in terms of kills and assists) in. - To determine which hero, if banned (HotS now has 3 bans), contributes to Fenix doing well in terms of kills and which will he still end up dying in spite of banning a certain hero (take the top 7)

Importing the data and calling the libraries

Importing the data

library(readxl)
FenixHL <- read_excel("D:/Working Directory/FenixHL.xlsx")
View(FenixHL)
head(FenixHL)
## # A tibble: 6 x 16
##   Ultimate Map   Kills Assists Deaths Duration_mins Siege_Dmg Hero_Dmg
##   <chr>    <chr> <dbl>   <dbl>  <dbl>         <dbl>     <dbl>    <dbl>
## 1 Purific~ Brax~     9      22      5            19     65255    52566
## 2 Planet ~ Alte~    15      13      7            26    155722   101255
## 3 Purific~ Warh~    18      22     10            27    166255   101255
## 4 Planet ~ Brax~    10       3      3            25     57255    38255
## 5 Purific~ Drag~     8      22      3            23    180255   100255
## 6 Planet ~ Batt~     6       6      5            20     25688    32555
## # ... with 8 more variables: XP_Gained <dbl>, Draft_Order <dbl>,
## #   Win_Or_Loss <chr>, Level_End <dbl>, Ban1 <chr>, Ban2 <chr>,
## #   Ban3 <chr>, MVP <chr>
tail(FenixHL)
## # A tibble: 6 x 16
##   Ultimate Map   Kills Assists Deaths Duration_mins Siege_Dmg Hero_Dmg
##   <chr>    <chr> <dbl>   <dbl>  <dbl>         <dbl>     <dbl>    <dbl>
## 1 Planet ~ Warh~    13      15      4            23    100215    68216
## 2 Purific~ Infe~    10      12      4            23     82766    62751
## 3 Purific~ Gard~    15      13      3            19    104255    72156
## 4 Purific~ Infe~    20       8      6            26    122167    78216
## 5 Purific~ Haun~    22       7      7            21     62455   100188
## 6 Planet ~ Warh~    24      24      4            30    133266    88299
## # ... with 8 more variables: XP_Gained <dbl>, Draft_Order <dbl>,
## #   Win_Or_Loss <chr>, Level_End <dbl>, Ban1 <chr>, Ban2 <chr>,
## #   Ban3 <chr>, MVP <chr>
str(FenixHL)
## Classes 'tbl_df', 'tbl' and 'data.frame':    269 obs. of  16 variables:
##  $ Ultimate     : chr  "Purification Salvo" "Planet Cracker" "Purification Salvo" "Planet Cracker" ...
##  $ Map          : chr  "Braxis Holdout" "Alterac Pass" "Warhead Junction" "Braxis Holdout" ...
##  $ Kills        : num  9 15 18 10 8 6 11 10 25 10 ...
##  $ Assists      : num  22 13 22 3 22 6 12 10 15 3 ...
##  $ Deaths       : num  5 7 10 3 3 5 4 5 10 3 ...
##  $ Duration_mins: num  19 26 27 25 23 20 24 20 25 16 ...
##  $ Siege_Dmg    : num  65255 155722 166255 57255 180255 ...
##  $ Hero_Dmg     : num  52566 101255 101255 38255 100255 ...
##  $ XP_Gained    : num  21222 28255 38255 14255 25666 ...
##  $ Draft_Order  : num  3 4 2 3 5 3 3 1 1 3 ...
##  $ Win_Or_Loss  : chr  "Loss" "Win" "Win" "Loss" ...
##  $ Level_End    : num  15 22 25 20 26 15 21 18 26 21 ...
##  $ Ban1         : chr  "Genji" "Chromie" "Chromie" "Garrosh" ...
##  $ Ban2         : chr  "Dehaka" "Genji" "Dehaka" "Malthael" ...
##  $ Ban3         : chr  "Tychus" "Junkrat" "Abathur" "Azmodan" ...
##  $ MVP          : chr  "YES" "YES" "YES" "YES" ...
summary(FenixHL)
##    Ultimate             Map                Kills          Assists     
##  Length:269         Length:269         Min.   : 2.00   Min.   : 1.00  
##  Class :character   Class :character   1st Qu.: 9.00   1st Qu.:10.00  
##  Mode  :character   Mode  :character   Median :13.00   Median :13.00  
##                                        Mean   :14.58   Mean   :13.76  
##                                        3rd Qu.:18.00   3rd Qu.:17.00  
##                                        Max.   :39.75   Max.   :31.00  
##      Deaths       Duration_mins     Siege_Dmg         Hero_Dmg     
##  Min.   : 1.000   Min.   :12.00   Min.   : 21122   Min.   : 18211  
##  1st Qu.: 2.000   1st Qu.:19.00   1st Qu.: 67256   1st Qu.: 56211  
##  Median : 4.000   Median :23.00   Median :100122   Median : 66211  
##  Mean   : 5.201   Mean   :23.76   Mean   :108719   Mean   : 77207  
##  3rd Qu.: 7.000   3rd Qu.:27.00   3rd Qu.:133126   3rd Qu.:100211  
##  Max.   :18.000   Max.   :46.00   Max.   :331211   Max.   :221522  
##    XP_Gained      Draft_Order    Win_Or_Loss          Level_End   
##  Min.   : 8000   Min.   :1.000   Length:269         Min.   :11.0  
##  1st Qu.:16211   1st Qu.:2.000   Class :character   1st Qu.:18.0  
##  Median :19255   Median :3.000   Mode  :character   Median :21.0  
##  Mean   :20032   Mean   :3.104                      Mean   :21.5  
##  3rd Qu.:22306   3rd Qu.:4.000                      3rd Qu.:25.0  
##  Max.   :38255   Max.   :5.000                      Max.   :30.0  
##      Ban1               Ban2               Ban3          
##  Length:269         Length:269         Length:269        
##  Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character  
##                                                          
##                                                          
##                                                          
##      MVP           
##  Length:269        
##  Class :character  
##  Mode  :character  
##                    
##                    
## 

Invoking the packages

library(tidyverse)
## -- Attaching packages ---------------------------------------------------- tidyverse 1.2.1 --
## v ggplot2 3.0.0     v purrr   0.2.5
## v tibble  1.4.2     v dplyr   0.7.6
## v tidyr   0.8.1     v stringr 1.3.1
## v readr   1.1.1     v forcats 0.3.0
## -- Conflicts ------------------------------------------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(broom)
library(caret)
## Loading required package: lattice
## 
## Attaching package: 'caret'
## The following object is masked from 'package:purrr':
## 
##     lift
library(infer)
library(gridExtra)
## 
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
## 
##     combine
library(plyr)
## -------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## -------------------------------------------------------------------------
## 
## Attaching package: 'plyr'
## The following objects are masked from 'package:dplyr':
## 
##     arrange, count, desc, failwith, id, mutate, rename, summarise,
##     summarize
## The following object is masked from 'package:purrr':
## 
##     compact

Separating and filtering by Loss and wins

By wins

Fenix_HL_Win <- FenixHL %>%
  filter(Win_Or_Loss == "Win") %>%
  group_by(Ultimate)

Inspecting Data

head(Fenix_HL_Win)
## # A tibble: 6 x 16
## # Groups:   Ultimate [2]
##   Ultimate Map   Kills Assists Deaths Duration_mins Siege_Dmg Hero_Dmg
##   <chr>    <chr> <dbl>   <dbl>  <dbl>         <dbl>     <dbl>    <dbl>
## 1 Planet ~ Alte~  15      13        7            26    155722   101255
## 2 Purific~ Warh~  18      22       10            27    166255   101255
## 3 Purific~ Drag~   8      22        3            23    180255   100255
## 4 Planet ~ Tomb~  10      10        5            20    110225    75255
## 5 Purific~ Warh~  25      15       10            25    106255   100222
## 6 Planet ~ Brax~  12.5    10.5      5            28     78255    56255
## # ... with 8 more variables: XP_Gained <dbl>, Draft_Order <dbl>,
## #   Win_Or_Loss <chr>, Level_End <dbl>, Ban1 <chr>, Ban2 <chr>,
## #   Ban3 <chr>, MVP <chr>
tail(Fenix_HL_Win)
## # A tibble: 6 x 16
## # Groups:   Ultimate [2]
##   Ultimate Map   Kills Assists Deaths Duration_mins Siege_Dmg Hero_Dmg
##   <chr>    <chr> <dbl>   <dbl>  <dbl>         <dbl>     <dbl>    <dbl>
## 1 Purific~ Brax~    12      10      2            14     42566    34662
## 2 Planet ~ Warh~    13      15      4            23    100215    68216
## 3 Purific~ Infe~    10      12      4            23     82766    62751
## 4 Purific~ Gard~    15      13      3            19    104255    72156
## 5 Purific~ Haun~    22       7      7            21     62455   100188
## 6 Planet ~ Warh~    24      24      4            30    133266    88299
## # ... with 8 more variables: XP_Gained <dbl>, Draft_Order <dbl>,
## #   Win_Or_Loss <chr>, Level_End <dbl>, Ban1 <chr>, Ban2 <chr>,
## #   Ban3 <chr>, MVP <chr>
str(Fenix_HL_Win)
## Classes 'grouped_df', 'tbl_df', 'tbl' and 'data.frame':  166 obs. of  16 variables:
##  $ Ultimate     : chr  "Planet Cracker" "Purification Salvo" "Purification Salvo" "Planet Cracker" ...
##  $ Map          : chr  "Alterac Pass" "Warhead Junction" "Dragonshire" "Tomb of the Spider Queen" ...
##  $ Kills        : num  15 18 8 10 25 12.5 20 5 3.5 25 ...
##  $ Assists      : num  13 22 22 10 15 10.5 20 7 18 15 ...
##  $ Deaths       : num  7 10 3 5 10 5 11 4 4 9 ...
##  $ Duration_mins: num  26 27 23 20 25 28 26 13 23 29 ...
##  $ Siege_Dmg    : num  155722 166255 180255 110225 106255 ...
##  $ Hero_Dmg     : num  101255 101255 100255 75255 100222 ...
##  $ XP_Gained    : num  28255 38255 25666 20125 20255 ...
##  $ Draft_Order  : num  4 2 5 1 1 2 3 5 5 1 ...
##  $ Win_Or_Loss  : chr  "Win" "Win" "Win" "Win" ...
##  $ Level_End    : num  22 25 26 18 26 25 28 14 20 26 ...
##  $ Ban1         : chr  "Chromie" "Chromie" "Dehaka" "Sylvanas" ...
##  $ Ban2         : chr  "Genji" "Dehaka" "Malthael" "Malthael" ...
##  $ Ban3         : chr  "Junkrat" "Abathur" "Malfurion" "Dehaka" ...
##  $ MVP          : chr  "YES" "YES" "NO" "YES" ...
##  - attr(*, "vars")= chr "Ultimate"
##  - attr(*, "drop")= logi TRUE
##  - attr(*, "indices")=List of 2
##   ..$ : int  0 3 5 7 9 14 16 19 21 23 ...
##   ..$ : int  1 2 4 6 8 10 11 12 13 15 ...
##  - attr(*, "group_sizes")= int  79 87
##  - attr(*, "biggest_group_size")= int 87
##  - attr(*, "labels")='data.frame':   2 obs. of  1 variable:
##   ..$ Ultimate: chr  "Planet Cracker" "Purification Salvo"
##   ..- attr(*, "vars")= chr "Ultimate"
##   ..- attr(*, "drop")= logi TRUE
names(Fenix_HL_Win)
##  [1] "Ultimate"      "Map"           "Kills"         "Assists"      
##  [5] "Deaths"        "Duration_mins" "Siege_Dmg"     "Hero_Dmg"     
##  [9] "XP_Gained"     "Draft_Order"   "Win_Or_Loss"   "Level_End"    
## [13] "Ban1"          "Ban2"          "Ban3"          "MVP"
dim(Fenix_HL_Win)
## [1] 166  16
summary(Fenix_HL_Win)
##    Ultimate             Map                Kills          Assists     
##  Length:166         Length:166         Min.   : 2.00   Min.   : 1.00  
##  Class :character   Class :character   1st Qu.:10.00   1st Qu.:11.50  
##  Mode  :character   Mode  :character   Median :15.00   Median :14.50  
##                                        Mean   :17.20   Mean   :14.82  
##                                        3rd Qu.:22.00   3rd Qu.:18.00  
##                                        Max.   :39.75   Max.   :31.00  
##      Deaths       Duration_mins     Siege_Dmg         Hero_Dmg     
##  Min.   : 1.000   Min.   :12.00   Min.   : 32110   Min.   : 32111  
##  1st Qu.: 2.000   1st Qu.:21.00   1st Qu.: 82248   1st Qu.: 62112  
##  Median : 3.000   Median :25.00   Median :111105   Median : 72482  
##  Mean   : 5.145   Mean   :25.25   Mean   :125451   Mean   : 87519  
##  3rd Qu.: 7.000   3rd Qu.:28.00   3rd Qu.:166211   3rd Qu.:112153  
##  Max.   :18.000   Max.   :46.00   Max.   :311266   Max.   :221522  
##    XP_Gained      Draft_Order    Win_Or_Loss          Level_End    
##  Min.   :11233   Min.   :1.000   Length:166         Min.   :13.00  
##  1st Qu.:18216   1st Qu.:2.000   Class :character   1st Qu.:19.25  
##  Median :20885   Median :3.000   Mode  :character   Median :23.00  
##  Mean   :21696   Mean   :3.024                      Mean   :22.93  
##  3rd Qu.:26189   3rd Qu.:4.000                      3rd Qu.:26.00  
##  Max.   :38255   Max.   :5.000                      Max.   :30.00  
##      Ban1               Ban2               Ban3          
##  Length:166         Length:166         Length:166        
##  Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character  
##                                                          
##                                                          
##                                                          
##      MVP           
##  Length:166        
##  Class :character  
##  Mode  :character  
##                    
##                    
## 

Inspecting Win Percentages

Win_percentage = (nrow(Fenix_HL_Win)/nrow(FenixHL)) * 100

print(Win_percentage)
## [1] 61.71004

For Analysis purposes, we would like to filter out further the data

By Map

Fenix_HL_Win1 <- Fenix_HL_Win[,c(1:9,13:16)]
print(Fenix_HL_Win1)
## # A tibble: 166 x 13
## # Groups:   Ultimate [2]
##    Ultimate Map   Kills Assists Deaths Duration_mins Siege_Dmg Hero_Dmg
##    <chr>    <chr> <dbl>   <dbl>  <dbl>         <dbl>     <dbl>    <dbl>
##  1 Planet ~ Alte~  15      13        7            26    155722   101255
##  2 Purific~ Warh~  18      22       10            27    166255   101255
##  3 Purific~ Drag~   8      22        3            23    180255   100255
##  4 Planet ~ Tomb~  10      10        5            20    110225    75255
##  5 Purific~ Warh~  25      15       10            25    106255   100222
##  6 Planet ~ Brax~  12.5    10.5      5            28     78255    56255
##  7 Purific~ Sky ~  20      20       11            26    188255   121066
##  8 Planet ~ Vols~   5       7        4            13     32110    49226
##  9 Purific~ Batt~   3.5    18        4            23     38255    62199
## 10 Planet ~ Curs~  25      15        9            29    211155   118255
## # ... with 156 more rows, and 5 more variables: XP_Gained <dbl>,
## #   Ban1 <chr>, Ban2 <chr>, Ban3 <chr>, MVP <chr>
head(Fenix_HL_Win1)
## # A tibble: 6 x 13
## # Groups:   Ultimate [2]
##   Ultimate Map   Kills Assists Deaths Duration_mins Siege_Dmg Hero_Dmg
##   <chr>    <chr> <dbl>   <dbl>  <dbl>         <dbl>     <dbl>    <dbl>
## 1 Planet ~ Alte~  15      13        7            26    155722   101255
## 2 Purific~ Warh~  18      22       10            27    166255   101255
## 3 Purific~ Drag~   8      22        3            23    180255   100255
## 4 Planet ~ Tomb~  10      10        5            20    110225    75255
## 5 Purific~ Warh~  25      15       10            25    106255   100222
## 6 Planet ~ Brax~  12.5    10.5      5            28     78255    56255
## # ... with 5 more variables: XP_Gained <dbl>, Ban1 <chr>, Ban2 <chr>,
## #   Ban3 <chr>, MVP <chr>
names(Fenix_HL_Win1)
##  [1] "Ultimate"      "Map"           "Kills"         "Assists"      
##  [5] "Deaths"        "Duration_mins" "Siege_Dmg"     "Hero_Dmg"     
##  [9] "XP_Gained"     "Ban1"          "Ban2"          "Ban3"         
## [13] "MVP"

With this filtered data, out of interest let us create a scatterplot to detail the performance of some of the important aspects of Fenix’s game based on the Dataset

#Kills vs Assists
a <- ggplot(Fenix_HL_Win1, aes(x = Kills, y = Assists, col = Ultimate)) + geom_point(alpha = 0.775)
a <- a + geom_smooth(method = "lm", se = FALSE) 
a <- a + facet_wrap(~ Map)
print(a)

#Kills vs Hero Damage
b <- ggplot(Fenix_HL_Win1, aes(x = Kills, y = Hero_Dmg, col = Ultimate)) + geom_point(alpha = 0.775)
b <- b + geom_smooth(method = "lm", se = FALSE)
b <- b + facet_wrap(~ Map)
print(b)

#Kills vs Deaths
c <- ggplot(Fenix_HL_Win1, aes(x = Kills, y = Deaths, col = Ultimate)) + geom_point(alpha = 0.775)
c <- c + geom_smooth(method = "lm", se = FALSE)
c <- c + facet_wrap(~Map)
print(c)

#Hero Dmg vs Siege Dmg
d <- ggplot(Fenix_HL_Win1, aes(x = Hero_Dmg, y = Siege_Dmg, col = Ultimate)) + geom_point(alpha = 0.775)
d <- d + geom_smooth(method = "lm", se = FALSE)
d <- d + facet_wrap(~Map)
print(d)

#XP Gained vs Siege Dmg
e <- ggplot(Fenix_HL_Win1, aes(x = XP_Gained, y = Siege_Dmg, col = Ultimate)) + geom_point(alpha = 0.775)
e <- e + geom_smooth(method = "lm", se = FALSE)
e <- e + facet_wrap(~Map)
print(e)

#Siege Dmg vs Duration
f <- ggplot(Fenix_HL_Win1, aes(x = Siege_Dmg, y = Duration_mins, col = Ultimate)) + geom_point(alpha = 0.775)
f <- f + geom_smooth(method = "lm", se = FALSE)
f <- f + facet_wrap(~Map)
print(f)

#Hero Dmg vs Duration
g <- ggplot(Fenix_HL_Win1, aes(x = Hero_Dmg, y = Duration_mins, col = Ultimate)) + geom_point(alpha = 0.775)
g <- g + geom_smooth(method = "lm", se = FALSE)
g <- g + facet_wrap(~Map)
print(g)

Aggregating Duration per Map

Fenix_Aggregate0 <- aggregate(Duration_mins ~ Map, Fenix_HL_Win1, FUN=sum)
Fenix_Aggregate0 <- arrange(Fenix_Aggregate0, desc(Duration_mins))
Fenix_Aggregate0a <- Fenix_Aggregate0[1:14,]
print(Fenix_Aggregate0a)
##                         Map Duration_mins
## 1          Warhead Junction           623
## 2                Sky Temple           459
## 3              Alterac Pass           380
## 4          Infernal Shrines           346
## 5             Cursed Hollow           326
## 6               Dragonshire           302
## 7          Volskaya Foundry           281
## 8            Towers of Doom           280
## 9          Garden of Terror           227
## 10 Tomb of the Spider Queen           213
## 11         Blackheart's Bay           207
## 12            Haunted Mines           206
## 13           Braxis Holdout           172
## 14  Battlefield of Eternity           170
Fenix_Aggregate0a_Percentage_sum <- (Fenix_Aggregate0a$Duration_mins / sum(Fenix_Aggregate0a$Duration_mins)) 

print(Fenix_Aggregate0a_Percentage_sum)
##  [1] 0.14861641 0.10949427 0.09064885 0.08253817 0.07776718 0.07204198
##  [7] 0.06703244 0.06679389 0.05415076 0.05081107 0.04937977 0.04914122
## [13] 0.04103053 0.04055344
Percentage_Total_Duration <- Fenix_Aggregate0a_Percentage_sum * 100

Fenix_Aggregate0a <- cbind(Fenix_Aggregate0a, Percentage_Total_Duration)

print(Fenix_Aggregate0a)
##                         Map Duration_mins Percentage_Total_Duration
## 1          Warhead Junction           623                 14.861641
## 2                Sky Temple           459                 10.949427
## 3              Alterac Pass           380                  9.064885
## 4          Infernal Shrines           346                  8.253817
## 5             Cursed Hollow           326                  7.776718
## 6               Dragonshire           302                  7.204198
## 7          Volskaya Foundry           281                  6.703244
## 8            Towers of Doom           280                  6.679389
## 9          Garden of Terror           227                  5.415076
## 10 Tomb of the Spider Queen           213                  5.081107
## 11         Blackheart's Bay           207                  4.937977
## 12            Haunted Mines           206                  4.914122
## 13           Braxis Holdout           172                  4.103053
## 14  Battlefield of Eternity           170                  4.055344

Aggregating Kills per Map

Fenix_Aggregate1 <- aggregate(Kills ~ Map, Fenix_HL_Win1, FUN=sum)
Fenix_Aggregate1 <- arrange(Fenix_Aggregate1, desc(Kills))
Fenix_Aggregate1a <- Fenix_Aggregate1[1:14,]
print(Fenix_Aggregate1a)
##                         Map  Kills
## 1          Warhead Junction 460.75
## 2                Sky Temple 358.75
## 3          Volskaya Foundry 250.50
## 4          Infernal Shrines 233.00
## 5             Cursed Hollow 230.00
## 6              Alterac Pass 219.00
## 7            Towers of Doom 196.50
## 8               Dragonshire 188.00
## 9          Garden of Terror 164.00
## 10 Tomb of the Spider Queen 130.50
## 11         Blackheart's Bay 129.50
## 12            Haunted Mines 121.50
## 13           Braxis Holdout  99.50
## 14  Battlefield of Eternity  73.50
Fenix_Aggregate1a_Percentage_sum <- (Fenix_Aggregate1a$Kills / sum(Fenix_Aggregate1a$Kills))

print(Fenix_Aggregate1a_Percentage_sum)
##  [1] 0.16138354 0.12565674 0.08774081 0.08161121 0.08056042 0.07670753
##  [7] 0.06882662 0.06584939 0.05744308 0.04570928 0.04535902 0.04255692
## [13] 0.03485114 0.02574431
Percentage_Total_Kills <- Fenix_Aggregate1a_Percentage_sum * 100

Fenix_Aggregate1a <- cbind(Fenix_Aggregate1a, Percentage_Total_Kills)

print(Fenix_Aggregate1a)
##                         Map  Kills Percentage_Total_Kills
## 1          Warhead Junction 460.75              16.138354
## 2                Sky Temple 358.75              12.565674
## 3          Volskaya Foundry 250.50               8.774081
## 4          Infernal Shrines 233.00               8.161121
## 5             Cursed Hollow 230.00               8.056042
## 6              Alterac Pass 219.00               7.670753
## 7            Towers of Doom 196.50               6.882662
## 8               Dragonshire 188.00               6.584939
## 9          Garden of Terror 164.00               5.744308
## 10 Tomb of the Spider Queen 130.50               4.570928
## 11         Blackheart's Bay 129.50               4.535902
## 12            Haunted Mines 121.50               4.255692
## 13           Braxis Holdout  99.50               3.485114
## 14  Battlefield of Eternity  73.50               2.574431

Aggregating Deaths Per Map

Fenix_Aggregate2 <- aggregate(Deaths~Map, Fenix_HL_Win1, FUN=sum)
Fenix_Aggregate2 <- arrange(Fenix_Aggregate2, desc(Deaths))
Fenix_Aggregate2a <- Fenix_Aggregate2[1:14,]
print(Fenix_Aggregate2a)
##                         Map Deaths
## 1          Warhead Junction    149
## 2                Sky Temple     86
## 3          Infernal Shrines     70
## 4              Alterac Pass     69
## 5               Dragonshire     65
## 6            Towers of Doom     63
## 7          Volskaya Foundry     61
## 8             Cursed Hollow     55
## 9          Garden of Terror     53
## 10         Blackheart's Bay     50
## 11           Braxis Holdout     36
## 12 Tomb of the Spider Queen     34
## 13            Haunted Mines     32
## 14  Battlefield of Eternity     31
Fenix_Aggregate2a_Percentage_Sum <- (Fenix_Aggregate2a$Deaths / sum(Fenix_Aggregate2a$Deaths))

print(Fenix_Aggregate2a_Percentage_Sum)
##  [1] 0.17447307 0.10070258 0.08196721 0.08079625 0.07611241 0.07377049
##  [7] 0.07142857 0.06440281 0.06206089 0.05854801 0.04215457 0.03981265
## [13] 0.03747073 0.03629977
Percentage_Total_Deaths <- Fenix_Aggregate2a_Percentage_Sum * 100

Fenix_Aggregate2a <- cbind(Fenix_Aggregate2a, Percentage_Total_Deaths)

print(Fenix_Aggregate2a)
##                         Map Deaths Percentage_Total_Deaths
## 1          Warhead Junction    149               17.447307
## 2                Sky Temple     86               10.070258
## 3          Infernal Shrines     70                8.196721
## 4              Alterac Pass     69                8.079625
## 5               Dragonshire     65                7.611241
## 6            Towers of Doom     63                7.377049
## 7          Volskaya Foundry     61                7.142857
## 8             Cursed Hollow     55                6.440281
## 9          Garden of Terror     53                6.206089
## 10         Blackheart's Bay     50                5.854801
## 11           Braxis Holdout     36                4.215457
## 12 Tomb of the Spider Queen     34                3.981265
## 13            Haunted Mines     32                3.747073
## 14  Battlefield of Eternity     31                3.629977

Aggregating Assists per Map

Fenix_Aggregate3 <- aggregate(Assists ~ Map, Fenix_HL_Win1, FUN=sum)
Fenix_Aggregate3 <- arrange(Fenix_Aggregate3, desc(Assists))
Fenix_Aggregate3a <- Fenix_Aggregate3[1:14,]
print(Fenix_Aggregate3a)
##                         Map Assists
## 1          Warhead Junction  410.75
## 2                Sky Temple  250.25
## 3              Alterac Pass  233.50
## 4          Infernal Shrines  223.00
## 5             Cursed Hollow  185.50
## 6          Volskaya Foundry  180.00
## 7               Dragonshire  177.50
## 8            Towers of Doom  144.00
## 9          Garden of Terror  127.50
## 10         Blackheart's Bay  115.50
## 11 Tomb of the Spider Queen  108.50
## 12  Battlefield of Eternity  106.00
## 13           Braxis Holdout  101.50
## 14            Haunted Mines   97.00
Fenix_Aggregate3a_Percentage_Sum <- (Fenix_Aggregate3a$Assists / sum (Fenix_Aggregate3a$Assists))

print(Fenix_Aggregate3a_Percentage_Sum)
##  [1] 0.16693761 0.10170697 0.09489941 0.09063199 0.07539118 0.07315586
##  [7] 0.07213981 0.05852469 0.05181874 0.04694168 0.04409673 0.04308067
## [13] 0.04125178 0.03942288
Percentage_Total_Assists <-Fenix_Aggregate3a_Percentage_Sum * 100

Fenix_Aggregate3a <- cbind(Fenix_Aggregate3a, Percentage_Total_Assists)

print(Fenix_Aggregate3a)
##                         Map Assists Percentage_Total_Assists
## 1          Warhead Junction  410.75                16.693761
## 2                Sky Temple  250.25                10.170697
## 3              Alterac Pass  233.50                 9.489941
## 4          Infernal Shrines  223.00                 9.063199
## 5             Cursed Hollow  185.50                 7.539118
## 6          Volskaya Foundry  180.00                 7.315586
## 7               Dragonshire  177.50                 7.213981
## 8            Towers of Doom  144.00                 5.852469
## 9          Garden of Terror  127.50                 5.181874
## 10         Blackheart's Bay  115.50                 4.694168
## 11 Tomb of the Spider Queen  108.50                 4.409673
## 12  Battlefield of Eternity  106.00                 4.308067
## 13           Braxis Holdout  101.50                 4.125178
## 14            Haunted Mines   97.00                 3.942288

Script to plot Duration per minute with respect to map

Fenix_Duration_Map <- ggplot(Fenix_Aggregate0, aes(x=reorder(Map, -Duration_mins), y = Duration_mins, FILL=Map))
Fenix_Duration_Map <- Fenix_Duration_Map + geom_bar(aes(fill = Map), stat = "identity")
Fenix_Duration_Map <- Fenix_Duration_Map + geom_text(aes(label = round(Duration_mins, 0), hjust = 0.65, vjust = - 0.7), size = 4)
Fenix_Duration_Map <- Fenix_Duration_Map + labs(x = "\n MAP \n")
Fenix_Duration_Map <- Fenix_Duration_Map + labs(y = "\n DURATION PER MIN \n")
Fenix_Duration_Map <- Fenix_Duration_Map + labs(title = "\n FENIX DURATION PER MAP \n")
Fenix_Duration_Map <- Fenix_Duration_Map + coord_cartesian(ylim = c(0, 750))
Fenix_Duration_Map <- Fenix_Duration_Map + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 9.5, face = "bold"))
Fenix_Duration_Map <- Fenix_Duration_Map + theme(legend.position = "none")
Fenix_Duration_Map <- Fenix_Duration_Map + theme(plot.title = element_text(size = 11, face = "bold"))

print(Fenix_Duration_Map)

Script to plot Kills per Map

Fenix_Kills_Map <- ggplot(Fenix_Aggregate1a, aes(x=reorder(Map, -Kills), y = Kills, FILL=Map))
Fenix_Kills_Map <- Fenix_Kills_Map + geom_bar(aes(fill =Map), stat = "identity")
Fenix_Kills_Map <- Fenix_Kills_Map + geom_text(aes(label = round(Kills,0), hjust = 0.65, vjust = -0.7, size = 4))
Fenix_Kills_Map <- Fenix_Kills_Map + labs(x = "\n MAP \n")
Fenix_Kills_Map <- Fenix_Kills_Map + labs(y = "\n KILLS \n")
Fenix_Kills_Map <- Fenix_Kills_Map + labs(title = "\n FENIX KILLS PER MAP \n")
Fenix_Kills_Map <- Fenix_Kills_Map + coord_cartesian(ylim = c(0,750))
Fenix_Kills_Map <- Fenix_Kills_Map + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 9.5, face = "bold"))
Fenix_Kills_Map <- Fenix_Kills_Map + theme(legend.position = "none")
Fenix_Kills_Map <- Fenix_Kills_Map + theme(plot.title = element_text(size = 11, face = "bold"))

print(Fenix_Kills_Map)

Script to plot Deaths per Map

Fenix_Deaths_Map <- ggplot(Fenix_Aggregate2a, aes(x=reorder(Map, -Deaths), y = Deaths, FILL=Map))
Fenix_Deaths_Map <- Fenix_Deaths_Map + geom_bar(aes(fill =Map), stat = "identity")
Fenix_Deaths_Map <- Fenix_Deaths_Map + geom_text(aes(label = round(Deaths,0), hjust = 0.65, vjust = -0.7, size = 4))
Fenix_Deaths_Map <- Fenix_Deaths_Map + labs(x = "\n MAP \n")
Fenix_Deaths_Map <- Fenix_Deaths_Map + labs(y = "\n DEATHS \n")
Fenix_Deaths_Map <- Fenix_Deaths_Map + labs(title = "\n FENIX DEATHS PER MAP \n")
Fenix_Deaths_Map <- Fenix_Deaths_Map + coord_cartesian(ylim = c(0,250))
Fenix_Deaths_Map <- Fenix_Deaths_Map +  theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 9.5, face = "bold"))
Fenix_Deaths_Map <- Fenix_Deaths_Map + theme(legend.position = "none")
Fenix_Deaths_Map <- Fenix_Deaths_Map + theme(plot.title = element_text(size = 11, face = "bold"))

print(Fenix_Deaths_Map)

Script to plot Assists per Map

Fenix_Assists_Map <- ggplot(Fenix_Aggregate3a, aes(x=reorder(Map, -Assists), y = Assists, FILL=Map))
Fenix_Assists_Map <- Fenix_Assists_Map + geom_bar(aes(fill =Map), stat = "identity")
Fenix_Assists_Map <- Fenix_Assists_Map + geom_text(aes(label = round(Assists,0), hjust = 0.65, vjust = -0.7, size = 4))
Fenix_Assists_Map <- Fenix_Assists_Map + labs(x = "\n MAP \n")
Fenix_Assists_Map <- Fenix_Assists_Map + labs(y = "\n ASSISTS \n")
Fenix_Assists_Map <- Fenix_Assists_Map + labs(title = "\n FENIX ASSISTS PER MAP \n")
Fenix_Assists_Map <- Fenix_Assists_Map + coord_cartesian(ylim = c(0,750))
Fenix_Assists_Map <- Fenix_Assists_Map + theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 9.5, face = "bold"))
Fenix_Assists_Map <- Fenix_Assists_Map + theme(legend.position = "none")
Fenix_Assists_Map <- Fenix_Assists_Map + theme(plot.title = element_text(size = 11, face = "bold"))

print(Fenix_Assists_Map)

Aggregating Kills per Ultimate

Fenix_Aggregate4 <- aggregate(Kills ~ Ultimate, Fenix_HL_Win1, FUN=sum)
Fenix_Aggregate4 <- arrange(Fenix_Aggregate4, desc(Kills))
print(Fenix_Aggregate4)
##             Ultimate  Kills
## 1 Purification Salvo 1510.5
## 2     Planet Cracker 1344.5
Fenix_Aggregate4_Percentage_Kills <- Fenix_Aggregate4$Kills / sum(Fenix_Aggregate4$Kills)

print(Fenix_Aggregate4_Percentage_Kills)
## [1] 0.5290718 0.4709282
Percentage_Total_Kills_Ultimate <- Fenix_Aggregate4_Percentage_Kills * 100

Fenix_Aggregate4 <- cbind(Fenix_Aggregate4, Percentage_Total_Kills_Ultimate)

print(Fenix_Aggregate4)
##             Ultimate  Kills Percentage_Total_Kills_Ultimate
## 1 Purification Salvo 1510.5                        52.90718
## 2     Planet Cracker 1344.5                        47.09282

Scripting Fenix’s performance in terms of kills with respect to ultimate

Fenix_Kills_Ultimate <- ggplot(Fenix_Aggregate4, aes(x = reorder(Ultimate, -Kills), y = Kills, FILL = Ultimate))
Fenix_Kills_Ultimate <- Fenix_Kills_Ultimate + geom_bar(aes(fill =Ultimate), stat = "identity")
Fenix_Kills_Ultimate <- Fenix_Kills_Ultimate + geom_text(aes(label = round(Kills,0), hjust = 0.65, vjust = -0.7, size = 4))
Fenix_Kills_Ultimate <- Fenix_Kills_Ultimate + labs(x = "\n ULTIMATE \n")
Fenix_Kills_Ultimate <- Fenix_Kills_Ultimate + labs(y = "\n KILLS \n")
Fenix_Kills_Ultimate <- Fenix_Kills_Ultimate + labs(title = "\n FENIX KILLS WITH RESPECT TO ULT \n")
Fenix_Kills_Ultimate <- Fenix_Kills_Ultimate + coord_cartesian(ylim = c(0,2000))
Fenix_Kills_Ultimate <- Fenix_Kills_Ultimate + theme(axis.text.x = element_text(angle = 60, hjust = 1.25, size = 9.5, face = "bold"))
Fenix_Kills_Ultimate <- Fenix_Kills_Ultimate + theme(legend.position = "none")
Fenix_Kills_Ultimate <- Fenix_Kills_Ultimate + theme(plot.title = element_text(size = 11, face = "bold"))

print(Fenix_Kills_Ultimate)

Aggregating Assists per Ultimate

Fenix_Aggregate5 <- aggregate(Assists ~ Ultimate, Fenix_HL_Win1, FUN=sum)
Fenix_Aggregate5 <- arrange(Fenix_Aggregate5, desc(Assists))
print(Fenix_Aggregate5)
##             Ultimate Assists
## 1 Purification Salvo  1309.5
## 2     Planet Cracker  1151.0
Fenix_Aggregate5_Percentage_Assists <- Fenix_Aggregate5$Assists / sum(Fenix_Aggregate5$Assists)

print(Fenix_Aggregate5_Percentage_Assists)
## [1] 0.5322089 0.4677911
Percentage_Total_Assists_Ultimate <- Fenix_Aggregate5_Percentage_Assists * 100

Fenix_Aggregate5 <- cbind(Fenix_Aggregate5, Percentage_Total_Assists_Ultimate)

print(Fenix_Aggregate5)
##             Ultimate Assists Percentage_Total_Assists_Ultimate
## 1 Purification Salvo  1309.5                          53.22089
## 2     Planet Cracker  1151.0                          46.77911
Fenix_Assists_Ultimate <- ggplot(Fenix_Aggregate5, aes(x = reorder(Ultimate, -Assists), y = Assists, FILL = Ultimate))
Fenix_Assists_Ultimate <- Fenix_Assists_Ultimate + geom_bar(aes(fill =Ultimate), stat = "identity")
Fenix_Assists_Ultimate <- Fenix_Assists_Ultimate + geom_text(aes(label = round(Assists,0), hjust = 0.65, vjust = -0.7, size = 4))
Fenix_Assists_Ultimate <- Fenix_Assists_Ultimate + labs(x = "\n ULTIMATE \n")
Fenix_Assists_Ultimate <- Fenix_Assists_Ultimate + labs(y = "\n ASSISTS \n")
Fenix_Assists_Ultimate <- Fenix_Assists_Ultimate + labs(title = "\n FENIX KILLS WITH RESPECT TO ULT \n")
Fenix_Assists_Ultimate <- Fenix_Assists_Ultimate + coord_cartesian(ylim = c(0,2000))
Fenix_Assists_Ultimate <- Fenix_Assists_Ultimate +  theme(axis.text.x = element_text(angle = 60, hjust = 1.25, size = 9.5, face = "bold"))
Fenix_Assists_Ultimate <- Fenix_Assists_Ultimate + theme(legend.position = "none")
Fenix_Assists_Ultimate <- Fenix_Assists_Ultimate + theme(plot.title = element_text(size = 11, face = "bold"))

print(Fenix_Assists_Ultimate)

Let us examine by the Bans

Let us Analyze by Kills and Deaths with respect to team’s first, second and third Ban

Fenix_Bans_Agg1 <- aggregate(Kills ~ Ban1, Fenix_HL_Win1, FUN=sum)
Fenix_Bans_Agg1 <- arrange(Fenix_Bans_Agg1, desc(Kills))
Fenix_Bans_Agg1 <- Fenix_Bans_Agg1[1:7,]
print(Fenix_Bans_Agg1)
##       Ban1 Kills
## 1 Ragnaros 255.5
## 2  Garrosh 230.5
## 3   Dehaka 220.0
## 4 Malthael 168.0
## 5   Tracer 165.5
## 6   Raynor 147.5
## 7  Azmodan 147.0
Fenix_Bans_Agg2 <- aggregate(Deaths ~ Ban1, Fenix_HL_Win1, FUN=sum)
Fenix_Bans_Agg2 <- arrange(Fenix_Bans_Agg2, desc(Deaths))
Fenix_Bans_Agg2 <- Fenix_Bans_Agg2[1:7,]
print(Fenix_Bans_Agg2)
##       Ban1 Deaths
## 1 Malthael     84
## 2 Ragnaros     76
## 3  Garrosh     61
## 4   Dehaka     52
## 5   Tracer     51
## 6  Falstad     50
## 7  Deckard     43
Fenix_Bans_Agg3 <- aggregate(Kills ~ Ban2, Fenix_HL_Win1, FUN=sum)
Fenix_Bans_Agg3 <- arrange(Fenix_Bans_Agg3, desc(Kills))
Fenix_Bans_Agg3 <- Fenix_Bans_Agg3[1:7,]
print(Fenix_Bans_Agg3)
##       Ban2  Kills
## 1   Dehaka 316.25
## 2  Garrosh 272.25
## 3 Ragnaros 218.00
## 4 Malthael 179.50
## 5    Genji 178.50
## 6     Yrel 176.50
## 7  Deckard 127.00
Fenix_Bans_Agg4 <- aggregate(Deaths ~ Ban2, Fenix_HL_Win1, FUN=sum)
Fenix_Bans_Agg4 <- arrange(Fenix_Bans_Agg4, desc(Deaths))
Fenix_Bans_Agg4 <- Fenix_Bans_Agg4[1:7,]
print(Fenix_Bans_Agg4)
##       Ban2 Deaths
## 1   Dehaka    115
## 2  Garrosh     89
## 3    Genji     64
## 4 Ragnaros     61
## 5     Yrel     53
## 6 Malthael     47
## 7  Chromie     34
Fenix_Bans_Agg5 <- aggregate(Kills ~ Ban3, Fenix_HL_Win1, FUN=sum)
Fenix_Bans_Agg5 <- arrange(Fenix_Bans_Agg5, desc(Kills))
Fenix_Bans_Agg5 <- Fenix_Bans_Agg5[1:7,]
print(Fenix_Bans_Agg5)
##      Ban3  Kills
## 1  Dehaka 206.00
## 2    Yrel 150.75
## 3  Tracer 147.50
## 4  Diablo 144.00
## 5   Genji 141.25
## 6 Chromie 126.50
## 7     ETC 123.00
Fenix_Bans_Agg6 <- aggregate(Deaths ~ Ban3, Fenix_HL_Win1, FUN=sum)
Fenix_Bans_Agg6 <- arrange(Fenix_Bans_Agg6, desc(Deaths))
Fenix_Bans_Agg6 <- Fenix_Bans_Agg6[1:7,]
print(Fenix_Bans_Agg6)
##       Ban3 Deaths
## 1   Dehaka     58
## 2   Diablo     44
## 3 Malthael     43
## 4  Chromie     41
## 5  Garrosh     40
## 6  Azmodan     39
## 7     Yrel     39

Let us create the bar plot on the basis per ban

# Kills on the First Ban

First_Bans_Killed1 <- ggplot(Fenix_Bans_Agg1, aes(x = reorder(Ban1, -Kills), y = Kills, FILL = Ban1))
First_Bans_Killed1 <- First_Bans_Killed1 + geom_bar(aes(fill =Ban1), stat = "identity")
First_Bans_Killed1 <- First_Bans_Killed1 +  geom_text(aes(label = round(Kills,0), hjust = 0.65, vjust = -0.7, size = 4))
First_Bans_Killed1 <- First_Bans_Killed1 + labs(x = "\n HEROES BANNED FIRST \n")
First_Bans_Killed1 <- First_Bans_Killed1 + labs(y = "\n KILLS \n")
First_Bans_Killed1 <- First_Bans_Killed1 + labs(title = "\n AMOUNT OF KILLS THAT HAPPEN IF HEROES ARE BANNED FIRST (TOP 7) \n")
First_Bans_Killed1 <- First_Bans_Killed1 + coord_cartesian(ylim = c(0, 500))
First_Bans_Killed1 <- First_Bans_Killed1 + theme(axis.text.x = element_text(angle = 60, hjust = 1.25, size = 9.5, face = "bold"))
First_Bans_Killed1 <- First_Bans_Killed1 + theme(legend.position = "none")
First_Bans_Killed1 <- First_Bans_Killed1 + theme(plot.title = element_text(size = 11, face = "bold"))

print(First_Bans_Killed1)

#Deaths in spite of the First Ban

First_Bans_Deaths1 <- ggplot(Fenix_Bans_Agg2, aes(x = reorder(Ban1, -Deaths), y = Deaths, FILL = Ban1))
First_Bans_Deaths1 <- First_Bans_Deaths1 + geom_bar(aes(fill =Ban1), stat = "identity")
First_Bans_Deaths1 <- First_Bans_Deaths1 + geom_text(aes(label = round(Deaths,0), hjust = 0.65, vjust = -0.7, size = 4))
First_Bans_Deaths1 <- First_Bans_Deaths1 + labs(x = "\n HEROES BANNED FIRST \n")
First_Bans_Deaths1 <- First_Bans_Deaths1 + labs(y = "\n DEATHS \n")
First_Bans_Deaths1 <- First_Bans_Deaths1 + labs(title = "\n AMOUNT OF DEATHS THAT HAPPEN IN SPITE OF HEROES THAT ARE BANNED FIRST (TOP 7) \n")
First_Bans_Deaths1 <- First_Bans_Deaths1 + coord_cartesian(ylim = c(0, 500))
First_Bans_Deaths1 <- First_Bans_Deaths1 + theme(axis.text.x = element_text(angle = 60, hjust = 1.25, size = 9.5, face = "bold"))
First_Bans_Deaths1 <- First_Bans_Deaths1 + theme(legend.position = "none")
First_Bans_Deaths1 <- First_Bans_Deaths1 + theme(plot.title = element_text(size = 11, face = "bold"))

print(First_Bans_Deaths1)

#Kills on the second ban
Second_Bans_Killed1 <- ggplot(Fenix_Bans_Agg3, aes(x = reorder(Ban2, -Kills), y = Kills, FILL = Ban2))
Second_Bans_Killed1 <- Second_Bans_Killed1 + geom_bar(aes(fill =Ban2), stat = "identity")
Second_Bans_Killed1 <- Second_Bans_Killed1 + geom_text(aes(label = round(Kills,0), hjust = 0.65, vjust = -0.7, size = 4))
Second_Bans_Killed1 <- Second_Bans_Killed1 + labs(x = "\n HEROES BANNED SECOND \n")
Second_Bans_Killed1 <- Second_Bans_Killed1 + labs(y = "\n KILLS \n")
Second_Bans_Killed1 <- Second_Bans_Killed1 + labs(title = "\n AMOUNT OF KILLS THAT HAPPEN IF HEROES ARE BANNED SECOND (TOP 7) \n")
Second_Bans_Killed1 <- Second_Bans_Killed1 + coord_cartesian(ylim = c(0, 500))
Second_Bans_Killed1 <- Second_Bans_Killed1 + theme(axis.text.x = element_text(angle = 60, hjust = 1.25, size = 9.5, face = "bold"))
Second_Bans_Killed1 <- Second_Bans_Killed1 + theme(legend.position = "none")
Second_Bans_Killed1 <- Second_Bans_Killed1 + theme(plot.title = element_text(size = 11, face = "bold"))

print(Second_Bans_Killed1)

# Deaths in spite of the second ban

Second_Bans_Deaths1 <- ggplot(Fenix_Bans_Agg4, aes(x = reorder(Ban2, -Deaths), y = Deaths, FILL = Ban2))
Second_Bans_Deaths1 <- Second_Bans_Deaths1 + geom_bar(aes(fill =Ban2), stat = "identity")
Second_Bans_Deaths1 <- Second_Bans_Deaths1 +  geom_text(aes(label = round(Deaths,0), hjust = 0.65, vjust = -0.7, size = 4))
Second_Bans_Deaths1 <- Second_Bans_Deaths1 + labs(x = "\n HEROES BANNED SECOND \n")
Second_Bans_Deaths1 <- Second_Bans_Deaths1 + labs(y = "\n DEATHS \n")
Second_Bans_Deaths1 <- Second_Bans_Deaths1 + labs(title = "\n AMOUNT OF DEATHS THAT HAPPEN IN SPITE OF HEROES BANNED SECOND (TOP 7) \n")
Second_Bans_Deaths1 <- Second_Bans_Deaths1 + coord_cartesian(ylim = c(0, 500))
Second_Bans_Deaths1 <- Second_Bans_Deaths1 +  theme(axis.text.x = element_text(angle = 60, hjust = 1.25, size = 9.5, face = "bold"))
Second_Bans_Deaths1 <- Second_Bans_Deaths1 + theme(legend.position = "none")
Second_Bans_Deaths1 <- Second_Bans_Deaths1 + theme(plot.title = element_text(size = 11, face = "bold"))

print(Second_Bans_Deaths1)

# Kills after the third ban

Third_Ban_Kills1 <- ggplot(Fenix_Bans_Agg5, aes(x = reorder(Ban3, -Kills), y = Kills, FILL = Ban3))
Third_Ban_Kills1 <- Third_Ban_Kills1 + geom_bar(aes(fill =Ban3), stat = "identity")
Third_Ban_Kills1 <- Third_Ban_Kills1 + geom_text(aes(label = round(Kills, 0), hjust = 0.65, vjust = -0.7, size = 4))
Third_Ban_Kills1 <- Third_Ban_Kills1 + labs(x = "\n HEROES BANNED THIRD \n")
Third_Ban_Kills1 <- Third_Ban_Kills1 + labs(y = "\n KILLS \n")
Third_Ban_Kills1 <- Third_Ban_Kills1 + labs(title = "\n AMOUNT OF KILLS THAT HAPPEN IF HEROES ARE BANNED THIRD (TOP 7) \n")
Third_Ban_Kills1 <- Third_Ban_Kills1 + coord_cartesian(ylim = c(0, 500))
Third_Ban_Kills1 <- Third_Ban_Kills1 + theme(axis.text.x = element_text(angle = 60, hjust = 1.25, size = 9.5, face = "bold"))
Third_Ban_Kills1 <- Third_Ban_Kills1 + theme(legend.position = "none")
Third_Ban_Kills1 <- Third_Ban_Kills1 + theme(plot.title = element_text(size = 11, face = "bold"))

print(Third_Ban_Kills1)

#Deaths in spite of third ban
Third_Ban_Deaths1 <- ggplot(Fenix_Bans_Agg6, aes(x = reorder(Ban3, -Deaths), y = Deaths, FILL = Ban3))
Third_Ban_Deaths1 <- Third_Ban_Deaths1 + geom_bar(aes(fill =Ban3), stat = "identity")
Third_Ban_Deaths1 <- Third_Ban_Deaths1 + geom_text(aes(label = round(Deaths, 0), hjust = 0.65, vjust = -0.7, size = 4))
Third_Ban_Deaths1 <- Third_Ban_Deaths1 + labs(x = "\n HEROES BANNED THIRD \n")
Third_Ban_Deaths1 <- Third_Ban_Deaths1 + labs(y = "\n DEATHS \n")
Third_Ban_Deaths1 <- Third_Ban_Deaths1 + labs(title = "\n AMOUNT OF DEATHS THAT HAPPEN IN SPITE OF HEROES BANNED THIRD(TOP 7) \n")
Third_Ban_Deaths1 <- Third_Ban_Deaths1 + coord_cartesian(ylim = c(0, 500))
Third_Ban_Deaths1 <- Third_Ban_Deaths1 + theme(axis.text.x = element_text(angle = 60, hjust = 1.25, size = 9.5, face = "bold"))
Third_Ban_Deaths1 <- Third_Ban_Deaths1 + theme(legend.position = "none")
Third_Ban_Deaths1 <- Third_Ban_Deaths1 + theme(plot.title = element_text(size = 11, face = "bold"))

print(Third_Ban_Deaths1)

Conclusion

It has been shown from the dataset that, during Fenix’s winning games, Warhead Junction is the map where Fenix spends the longest amount of minutes in, spending 14.861641% or 623 minutes total of game time there.

Battlefield of Eternity is the map where Fenix spends the shortest amount of time in during his wins.

Warhead Junction is the map where Fenix has the most number of kills in winning games in, having 460.75 kills (16.138354% of all kills tallied during wins). Battlefield of Eternity is where he has the least amount of kills (73.5 kills or 2.574431% of all kills tallied) in winning games.

In terms of deaths, based on the dataset, Fenix has the unfortunate distinction of having most amount of deaths at Warhead Junction, with a whopping 149 deaths (17.447307% of all deaths tallied). Battlefield of Eternity has the least (31 deaths or 3.629977% of all deaths tallied)

Fenix’s Playmaking ability, based on the dataset, is evident in Warhead Junction, where he has a total of 410.75 assists in winning games (16.693761% of all assists tallied). Haunted Mines has the least with 97 (3.942288% of all assists tallied)

Fenix has done really well with Purification Salvo during winning games, tallying around 1510.5 kills on all winning games across the dataset, accounting to 52.90718% of all kills. Planet Cracker, Fenix’s other ultimate ability, nails 1344.5 kills or 47.09282%.

In terms of his playmaking ability, Fenix picking Purification Salvo has nailed him 1309.5 assists or 53.22089% of all assists combined. Planet Cracker nails around 1151 assists or 46.77911%

In terms of bans, Ragnaros as the first ban has helped Fenix nail 256 kills. Garrosh is next with 230 and Dehaka with 220. In terms of deaths, Malthael being banned first has been unable to prevent 84 deaths, followed by Ragnaros with 76 and Garrosh with 61.

Dehaka being banned second has helped Fenix nail around 316 kills, followed by Garrosh with 272 and Ragnaros with 218. However, Dehaka and Garrosh being banned second has also been instrumental with 115 and 89 deaths respectively, followed by Genji with 64

Dehaka as the third ban has helped Fenix nail 206 kills, followed by Yrel with 151 and Tracer with 148. However, in terms of deaths, Dehaka also leads with 58 and Diablo follows with 44 and Malthael with 43.