|
@ -1,4 +1,5 @@ |
|
|
source("readData.R") |
|
|
source("readData.R") |
|
|
|
|
|
source("exponentialSmoothing.R") |
|
|
|
|
|
|
|
|
library(tidyverse) |
|
|
library(tidyverse) |
|
|
|
|
|
|
|
@ -6,6 +7,9 @@ library(tidyverse) |
|
|
RPEData <-readNArpeData() |
|
|
RPEData <-readNArpeData() |
|
|
wellnessData <- readWellnessData() |
|
|
wellnessData <- readWellnessData() |
|
|
normalizedWellnessData <- readNormalizedMetrics() |
|
|
normalizedWellnessData <- readNormalizedMetrics() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RPEData |
|
|
RPEData |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -130,17 +134,26 @@ dailyLoadCol[is.na(dailyLoadCol)] <- 0 |
|
|
acuteChronicRatioCol[is.na(acuteChronicRatioCol)] <- 0 |
|
|
acuteChronicRatioCol[is.na(acuteChronicRatioCol)] <- 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
accuteFatigueSliding <- slidingWindowSmooth(acuteChronicRatioCol) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
massiveTibble <- tibble(day = dayCol, |
|
|
massiveTibble <- tibble(day = dayCol, |
|
|
playerID = playerid, |
|
|
playerID = playerid, |
|
|
DailyLoad = dailyLoadCol, |
|
|
DailyLoad = dailyLoadCol, |
|
|
|
|
|
DailyLoadSliding = slidingWindowSmooth(DailyLoad), |
|
|
acuteChronicRatio = acuteChronicRatioCol, |
|
|
acuteChronicRatio = acuteChronicRatioCol, |
|
|
|
|
|
acuteChronicRatioSliding = slidingWindowSmooth(acuteChronicRatioCol), |
|
|
trainDuration = trainDuration, |
|
|
trainDuration = trainDuration, |
|
|
|
|
|
trainDurationSliding = slidingWindowSmooth(trainDuration), |
|
|
sleepHours = sleepHoursCol, |
|
|
sleepHours = sleepHoursCol, |
|
|
|
|
|
sleepHoursSliding = slidingWindowSmooth(sleepHours), |
|
|
fatigue = fatigueRawCol, |
|
|
fatigue = fatigueRawCol, |
|
|
|
|
|
fatigueSliding = slidingWindowSmooth(fatigue), |
|
|
sleepQuality = sleepQualityCol, |
|
|
sleepQuality = sleepQualityCol, |
|
|
soreness = sorenessCol, |
|
|
soreness = sorenessCol, |
|
|
|
|
|
sorenessSliding = slidingWindowSmooth(soreness), |
|
|
fatigueNorm = normFatCol, |
|
|
fatigueNorm = normFatCol, |
|
|
|
|
|
fatigueNormSliding = slidingWindowSmooth(fatigueNorm), |
|
|
sorenessNorm = normSoreCol, |
|
|
sorenessNorm = normSoreCol, |
|
|
sleepHoursNorm = normSleepHours, |
|
|
sleepHoursNorm = normSleepHours, |
|
|
sleepQualityNorm = normSleepQuality, |
|
|
sleepQualityNorm = normSleepQuality, |
|
@ -150,3 +163,53 @@ massiveTibble <- tibble(day = dayCol, |
|
|
BestOutOfMyselfUnknown = unknownCol) |
|
|
BestOutOfMyselfUnknown = unknownCol) |
|
|
|
|
|
|
|
|
write.csv(massiveTibble, "cleaned/personal.csv") |
|
|
write.csv(massiveTibble, "cleaned/personal.csv") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ggplot(data = massiveTibble) + |
|
|
|
|
|
theme(plot.title = element_text(hjust = 0.5)) + |
|
|
|
|
|
ggtitle("Normalized Soreness Box Plots") + |
|
|
|
|
|
geom_boxplot(na.rm = T, mapping = aes(y=sorenessNorm, group = playerID), outlier.colour = "red", outlier.shape = 1) + |
|
|
|
|
|
labs(group = "Player ID", y = "Normalized Soreness Values") + |
|
|
|
|
|
coord_flip() + |
|
|
|
|
|
theme_bw() |
|
|
|
|
|
|
|
|
|
|
|
ggplot(data = massiveTibble) + |
|
|
|
|
|
theme(plot.title = element_text(hjust = 0.5)) + |
|
|
|
|
|
ggtitle("Normalized Sleep Quality Box Plots") + |
|
|
|
|
|
geom_boxplot(na.rm = T, mapping = aes(y=sleepQualityNorm, group = playerID), outlier.colour = "red", outlier.shape = 1) + |
|
|
|
|
|
labs(group = "Player ID", y = "Normalized Sleep Quality") + |
|
|
|
|
|
coord_flip() + |
|
|
|
|
|
theme_bw() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ggplot(data = massiveTibble) + |
|
|
|
|
|
theme(plot.title = element_text(hjust = 0.5)) + |
|
|
|
|
|
ggtitle("Soreness Box Plots") + |
|
|
|
|
|
geom_boxplot(na.rm = T, mapping = aes(y=sleepQuality, group = playerID), outlier.colour = "red", outlier.shape = 1) + |
|
|
|
|
|
labs(group = "Player ID", y = "Sleep Quality") + |
|
|
|
|
|
coord_flip() + |
|
|
|
|
|
theme_bw() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ggplot(data = massiveTibble) + |
|
|
|
|
|
theme(plot.title = element_text(hjust = 0.5)) + |
|
|
|
|
|
ggtitle("Team's Percieved Fatigue") + |
|
|
|
|
|
geom_point(mapping = aes(x=day, y=fatigue)) + |
|
|
|
|
|
labs(x = "Days Since August First 2017", y = "Teams Fatigue")+ |
|
|
|
|
|
theme_bw() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ggplot(data = massiveTibble) + |
|
|
|
|
|
theme(plot.title = element_text(hjust = 0.5)) + |
|
|
|
|
|
ggtitle("Team's Percieved Fatigue") + |
|
|
|
|
|
geom_point(mapping = aes(x=day, y=sorenessSliding)) + |
|
|
|
|
|
labs(x = "Days Since August First 2017", y = "Accute Fatugue ")+ |
|
|
|
|
|
theme_bw() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ggplot(data = massiveTibble) + |
|
|
|
|
|
theme(plot.title = element_text(hjust = 0.5)) + |
|
|
|
|
|
ggtitle("Team's Percieved Fatigue") + |
|
|
|
|
|
geom_point(mapping = aes(x=sleepQuality, y=fatigueNorm)) + |
|
|
|
|
|
labs(x = "Days Since August First 2017", y = "Accute Fatugue ") + |
|
|
|
|
|
theme_bw() |