Objectives

Nowadays, as the E-sports became more and more popular, data analyses on E-sports games are also become much more common. Because of the foudations of multiple commecial E-sport Leagues, data analyses is playing a significant role, just like the role they play in NBA and other sport leagues. As a League of Legends player, I have collected the data of my recent 50 games. I want to use the data to analyse and finally optimize my playing style.

The data of the games are collected from the Riot official site.

Times of Champions Used and win rate

First I want to see how many times of each Champion I have played during the past 50 games. Thus, I built a bar chart to see all the champions that I played and the winning status of the champions. As the chart shows, Kayn, a new champion issued in July, seemed to be my favourite. I played Kayn for 18 games, and won 10 of them. Meanwhile, the second champion I played most is Yasuo, but the win rate is considerably low, which indicates that maybe I should play this champion less if I want to win more, Meanwhile, though I got a zero win rate with Ekko and Rankan and a 100% win rate with Kassadin, I only played Ekko and Rankan for two times, and Kassadin once. I will need more data to draw a conclusion about these three champions. And by analysing the bar chart, I have found that Talon should be my main champion in the future, as it has the highest win rate with considerably more games to draw a conclusion.

ggplot(LOL, aes(x=Champion, fill=Win)) + geom_bar(stat = "count") + labs(title="Times of Champion Used in 50 Games", x="Champion", y="Times of Champion Used")+ scale_fill_discrete(name="Win or Lose")

Champions Type Used and win rate

Also, I want to see wich Champion Type I played most and I am best at, so I built another bar chart. As the chart shows, Warrior is most played during the past 50 games, and the second is Physcial Damage Assain. As these two type of champions are both with a win rate higher than 50%, I should keep my style and playing more of Warriors and Phsycial Damage Assasin. However, the chart also shows that I played a lot of Marksman, which I am not that good at. I should avoid this type from now on. As for Mage and Magical Damage Assassion, since the total number of games I played them is only 5, I will need to collect more data to draw a conclusion.

ggplot(LOL, aes(x=ChampionType, fill=Win)) + geom_bar(stat = "count") + labs(title="Times of Champion Used in 50 Games", x="Champion", y="Times of Champion Type Used")+ scale_fill_discrete(name="Win or Lose")

Time and win rate

Additionally, I want to know if time is an important factor to me. As shown in the chart, the win rate is apparently lower after 35 minutes, and when it was after 45 minute, the win rate is zero. This gives me an idea that I am a better early game player than late game player. And since the early game contains more of facing the other palyer in lane, while the late game contains more team fights, these data suggested that I am a better laner than a team fighter. I will concentrate more on early game and try to finish the enemy as soon as possible in the future.

ggplot(LOL, aes(x=Time, fill=Win)) + geom_bar(stat = "count") + labs(title="Times of Champion Used in 50 Games", x="Champion", y="Times of Champion Type Used")+ scale_fill_discrete(name="Win or Lose")

Gold and Damage

Meanwhile, I also I want to know if I have spent the gold I earned in the game in the right way. Thus, I tried to use the linear regression method to see the correlation between Gold earned and Damage made. As shown below, there is a strong linear correlation between Gold and Damage, which means that I did make good use of the gold earned in the games, and convert the gold into damage to the enemies.

model_1 <- lm(LOL$Damage ~ LOL$Gold)
summary(model_1)
## 
## Call:
## lm(formula = LOL$Damage ~ LOL$Gold)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -10967.0  -3463.0   -828.7   3007.5  16261.5 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  -6444.0     2964.9  -2.173   0.0347 *  
## LOL$Gold      2137.7      237.7   8.995 7.22e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6119 on 48 degrees of freedom
## Multiple R-squared:  0.6276, Adjusted R-squared:  0.6199 
## F-statistic:  80.9 on 1 and 48 DF,  p-value: 7.221e-12
plot(model_1)

Damage per Minute and Kills

Moreover, I want to see if DPM had a strong correlation with the Kills I got. Thus, I used the linear regression method to see the relationship between Kills and DPM. As I expected, DPM did have a strong correlation with kills. As more damage made would result in more kills, the game seemed fair and encouraging for palyers. It will be worthy to practice more and play better.

model_2 <- lm(LOL$Kill ~ LOL$DPM)
summary(model_2)
## 
## Call:
## lm(formula = LOL$Kill ~ LOL$DPM)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7.3432 -1.2916 -0.6647  1.7032  8.4132 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -2.421219   1.247072  -1.942   0.0581 .  
## LOL$DPM      0.016018   0.002007   7.980 2.36e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.135 on 48 degrees of freedom
## Multiple R-squared:  0.5702, Adjusted R-squared:  0.5612 
## F-statistic: 63.67 on 1 and 48 DF,  p-value: 2.364e-10
plot(model_2)