**Misanthrope's Thoughts**, and kindly contributed to R-bloggers)

Dire Vs Radiant winning time comparisson |

library(ggplot2)

TI3 <- read.csv("~/R/Dota2_Stats/The_International-3")

# create winning time per side plot

p <- ggplot(TI3, aes(TI3[,5], TI3[,8])) +

geom_boxplot(aes(fill = TI3[,5]))+

labs(title = 'Winning time per side at TI-3',

x = 'Side',

y = 'Time, min.',

fill = 'Side')

print(p)

Teams winning and loosing time comparison |

# get the list of teams

Teams <- unique(TI3[,3])

# create dataset to store data about winning/loosing times

A_time <- data.frame('Team'= character(),

'Result' = character(),

'Time' = numeric(),

stringsAsFactors = FALSE)

# extract time data and write it to the A_time data frame

for (team in Teams) {

A <- subset(TI3, TI3[,3] == team | TI3[,4] == team)

for (i in 1:nrow(A)) {

winner <- A[i,][5]

dire <- A[i,][4]

radiant <- A[i,][3]

time <- A[i,][8]

if ( (winner == 'DIRE' & dire == team) | (winner == 'RADIANT' & radiant == team) ) {

result <- paste(team, 'WIN')

}

else {

result <- paste(team, 'LOSS')

}

A_time[(nrow(A_time)+1),] <- c(team,result, time)

}

}

# create plot for winning time per team

p <- ggplot(A_time, aes(A_time[,2], A_time[,3])) +

geom_boxplot(aes(fill = A_time[,1]))+

theme(axis.text.x = element_text(angle=90, hjust = 0),

axis.title = element_text(face = 'bold', size = 14),

title = element_text(face = 'bold', size = 16),

legend.position = 'right'

) +

labs(title = 'Win and loss times at The International 3',

x = 'Results',

y = 'Time, min.',

fill = 'Teams')

print(p)

Generally my assumption was correct: better teams wins quicker. Alliance and NaVi (1-st and 2-nd places) is a nice conformation to it (DK and IG (TI-2 champion) have the similar pattern as well despite shared 5-th place). But Orange and TongFu (3-rd and 4-th place) tends to loose quicker than win. This could be explained by the general playstile of this two Asian teams which often aims at the late game. This infamous style with prolonged no action farming stage is often referred as ‘Chinese Dota’. But DK and IG are Chinese teams too. Seems that both TongFu and Orange were able overcame the odds and jumped over their heads in the given tournament. They took places that DK and IG should have get (DK and IG were more favourable teams than Orange and TongFu before the tournament).

**leave a comment**for the author, please follow the link and comment on their blog:

**Misanthrope's Thoughts**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...