Introduction

This dataset was found on Oracle Elixir. It shows data on all of the esports games since 2014, however for this I only used the data from 2023. The questions I am to explore are: What are the most common character(Champions) by role? How many dragons are taken per game? And is there a connection between gold at ten minutes into the game(goldat10) and how many towers were taken in the game?

Loading

The first step was to separate the data into the team data and all the individual roles(Top, Jungle, Mid, Bot Support) through unix. Then all of the data files were loaded into R by:

setwd("C:/Stuff/Homework/ITEC_4220/")
EsportTeamData <- read.csv("EsportTeamData.csv", header=TRUE)
EsportTopData <- read.csv("EsportTopData.csv", header=TRUE)
EsportJungleData <- read.csv("EsportJungleData.csv", header=TRUE)
EsportMidData <- read.csv("EsportMidData.csv", header=TRUE)
EsportBotData <- read.csv("EsportBotData.csv", header=TRUE)
EsportSupportData <- read.csv("EsportSupportData.csv", header=TRUE)

Transformation for Most Picked Champions

The next step is to show the seven popular champion in each role. To do that first the frequency of each champion was found through the table() function. Then the sorted version of that was converted to a dataframe, and after removing the everything but the first seven element(or the seven champions that appear the most) a pie chart was created. This was done for all five roles.

TopMostPickedChamps <- as.data.frame(sort(table(EsportTopData$champion), decreasing = TRUE))
TopSevenPickedChamps <- head(TopMostPickedChamps, 7)

JungleMostPickedChamps <- as.data.frame(sort(table(EsportJungleData$champion), decreasing = TRUE))
JungleSevenPickedChamps <- head(JungleMostPickedChamps, 7)

MidMostPickedChamps <- as.data.frame(sort(table(EsportMidData$champion), decreasing = TRUE))
MidSevenPickedChamps <- head(MidMostPickedChamps, 7)

BotMostPickedChamps <- as.data.frame(sort(table(EsportBotData$champion), decreasing = TRUE))
BotSevenPickedChamps <- head(BotMostPickedChamps, 7)

SupportMostPickedChamps <- as.data.frame(sort(table(EsportSupportData$champion), decreasing = TRUE))
SupportSevenPickedChamps <- head(SupportMostPickedChamps, 7)

pie(TopSevenPickedChamps$Freq, labels = TopSevenPickedChamps$Var1, main = "Seven most picked champions for Top")

pie(JungleSevenPickedChamps$Freq, labels = JungleSevenPickedChamps$Var1, main = "Seven most picked champions for Jungle")

pie(MidSevenPickedChamps$Freq, labels = MidSevenPickedChamps$Var1, main = "Seven most picked champions for Mid")

pie(BotSevenPickedChamps$Freq, labels = BotSevenPickedChamps$Var1, main = "Seven most picked champions for Bot")

pie(SupportSevenPickedChamps$Freq, labels = SupportSevenPickedChamps$Var1, main = "Seven most picked champions for Support")

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

How many dragons in a game?

The next question to answer is how many dragons were taken in a game. In order to best show that a histogram showing the frequency of dragons taken was created. The data does not show how many dragons total were taken, however it does show how many dragons each team took, so by adding them together we can find how many were in the game. Additionally the summary showing the minimum, maximum, median, and first and third quartile of how many dragons were taken.

hist(EsportTeamData$dragons+EsportTeamData$opp_dragons, main = "Number of Dragons in a game", xlab = "Dragons", ylab = "Games played")

summary(EsportTeamData$dragons+EsportTeamData$opp_dragons)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   4.000   4.000   4.369   5.000   9.000

The summary shows that most games almost half the games have four to five dragons. This is shown because the first quartile is 4 and the third quartile is 5, meaning half of the values lie between those two. The mean also supports with a value of 4.369.

The statistical analysis done was a linear regression to see if there is a correlation between the gold earned by ten minutes and how many towers were taken at the end of the game. In the game of League of Legends towers are an important objective to take, however taking them before ten minutes is difficult. The expectation is that the more gold earned by ten minutes(goldAt10) will increase the ability to take towers.

GoldAt10VSTowers <- lm(EsportTeamData$goldat10~EsportTeamData$towers)
summary(GoldAt10VSTowers)
## 
## Call:
## lm(formula = EsportTeamData$goldat10 ~ EsportTeamData$towers)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2985.8  -606.0   -72.8   515.4  5629.2 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)           15036.221     13.225 1136.98   <2e-16 ***
## EsportTeamData$towers   106.956      1.865   57.36   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 881.7 on 16546 degrees of freedom
## Multiple R-squared:  0.1659, Adjusted R-squared:  0.1658 
## F-statistic:  3290 on 1 and 16546 DF,  p-value: < 2.2e-16
plot(EsportTeamData$goldat10~EsportTeamData$towers)
abline(GoldAt10VSTowers)

The linear regression shows that the correlation between goldAt10 and the towers taken. The forumla found by the linear regression was y = 106.96x + 15036.22. The p-value was found to be <2e-16, which shows that the results were very likely not due to chance. Thus we can reject the null hypothesis that these two variables are not correlated.