library(reshape2)
package ‘reshape2’ was built under R version 3.3.2
library(ggplot2)
package ‘ggplot2’ was built under R version 3.3.2
library(dplyr)
package ‘dplyr’ was built under R version 3.3.2
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
library(broom)
data <- read.csv("csv/all.csv")
data$date <- as.Date(data$date)
cutoff_date = "2016-10-15"
Then we define a function that can be used to filter the dataset to a particular encounter and difficulty. It also performs outlier filtering - for each 5-ilvl bucket, for each spec, we compute the 95th percentile of DPS, then remove any parses from the dataset for that ilvl/spec above that cutoff.
d <- data
m <- d %>% group_by(class, spec, encounter, difficulty) %>% do(tidy(lm(dps ~ ilvl, data=.)))
slopes <- m[m$term == "ilvl",]
slopes <- m[m$term == "ilvl",]
d <- data
m <- d %>% group_by(class, spec) %>% do(tidy(lm(dps ~ ilvl, data=.)))
|===================================================================================== | 50% ~2 s remaining
|============================================================================================ | 54% ~2 s remaining
|=================================================================================================== | 58% ~2 s remaining
|========================================================================================================== | 62% ~2 s remaining
|================================================================================================================= | 67% ~2 s remaining
|======================================================================================================================== | 71% ~1 s remaining
|=============================================================================================================================== | 75% ~1 s remaining
|====================================================================================================================================== | 79% ~1 s remaining
|============================================================================================================================================= | 83% ~1 s remaining
|==================================================================================================================================================== | 88% ~1 s remaining
|=========================================================================================================================================================== | 92% ~0 s remaining
|================================================================================================================================================================== | 96% ~0 s remaining
|==========================================================================================================================================================================|100% ~0 s remaining
all_slopes <- m[m$term == "ilvl",]
scale_encounter <- function(s, title) {
s <- filter(s, estimate > 0)
s$class = with(s, factor(class, levels = rev(levels(class))))
s$spec = with(s, factor(spec, levels = rev(levels(spec))))
ggplot(data=s, aes(x=paste(class, spec), y=estimate, group=interaction(class, spec), reorder=estimate, fill=paste(class,spec))) +
geom_bar(position=position_dodge(width = 0.9), stat="identity") +
labs(y="DPS gain/ilvl", x="Encounter", title=paste("DPS scaling per ilvl:", title)) +
coord_flip() +
guides(fill=FALSE)
}
scale_encounter(filter(slopes, encounter == "Nythendra", difficulty == "Normal"), title="Nythendra Normal")
scale_encounter(filter(slopes, encounter == "Nythendra", difficulty == "Heroic"), title="Nythendra Heroic")
scale_encounter(filter(slopes, encounter == "Nythendra", difficulty == "Mythic"), title="Nythendra Mythic")
scale_encounter(filter(slopes, encounter == "Ursoc", difficulty == "Normal"), title="Ursoc Normal")
scale_encounter(filter(slopes, encounter == "Ursoc", difficulty == "Heroic"), title="Ursoc Heroic")
scale_encounter(filter(slopes, encounter == "Ursoc", difficulty == "Mythic"), title="Ursoc Mythic")
scale_encounter(filter(slopes, encounter == "Dragons_of_Nightmare", difficulty == "Normal"), title="Dragons_of_Nightmare Normal")
scale_encounter(filter(slopes, encounter == "Dragons_of_Nightmare", difficulty == "Heroic"), title="Dragons_of_Nightmare Heroic")
scale_encounter(filter(slopes, encounter == "Dragons_of_Nightmare", difficulty == "Mythic"), title="Dragons_of_Nightmare Mythic")
scale_encounter(filter(slopes, encounter == "Elerethe_Renferal", difficulty == "Normal"), title="Elerethe_Renferal Normal")
scale_encounter(filter(slopes, encounter == "Elerethe_Renferal", difficulty == "Heroic"), title="Elerethe_Renferal Heroic")
scale_encounter(filter(slopes, encounter == "Elerethe_Renferal", difficulty == "Mythic"), title="Elerethe_Renferal Mythic")
scale_encounter(filter(slopes, encounter == "Il_gynoth__Heart_of_Corruption", difficulty == "Normal"), title="Il_gynoth__Heart_of_Corruption Normal")
scale_encounter(filter(slopes, encounter == "Il_gynoth__Heart_of_Corruption", difficulty == "Heroic"), title="Il_gynoth__Heart_of_Corruption Heroic")
scale_encounter(filter(slopes, encounter == "Il_gynoth__Heart_of_Corruption", difficulty == "Mythic"), title="Il_gynoth__Heart_of_Corruption Mythic")
scale_encounter(filter(slopes, encounter == "Cenarius", difficulty == "Normal"), title="Cenarius Normal")
scale_encounter(filter(slopes, encounter == "Cenarius", difficulty == "Heroic"), title="Cenarius Heroic")
scale_encounter(filter(slopes, encounter == "Cenarius", difficulty == "Mythic"), title="Cenarius Mythic")
scale_encounter(filter(slopes, encounter == "Xavius", difficulty == "Normal"), title="Xavius Normal")
scale_encounter(filter(slopes, encounter == "Xavius", difficulty == "Heroic"), title="Xavius Heroic")
scale_encounter(filter(slopes, encounter == "Xavius", difficulty == "Mythic"), title="Xavius Mythic")
scale_encounter(all_slopes, title="Overall")