diff --git a/app.R b/app.R index c2a52eb..ca8f0d3 100644 --- a/app.R +++ b/app.R @@ -28,7 +28,6 @@ server <- function(input, output, session) imdb %>% filter(id == show_id) %>% - mutate_at(vars(season, episode, averageRating, numVotes), as.numeric) %>% by(.$season, function(x){ fit <- lm(averageRating ~ episode, data = x) x %>% diff --git a/preprocess.R b/preprocess.R index 042b3fd..bc66709 100644 --- a/preprocess.R +++ b/preprocess.R @@ -21,6 +21,7 @@ tvseries %>% inner_join(ratings, by = c("eptconst" = "tconst")) %>% inner_join(tvepisodes, by = c("eptconst" = "tconst")) %>% select(-eptconst, episodeTitle = primaryTitle) %>% + mutate_at(vars(season, episode, averageRating, numVotes), as.numeric) %>% arrange(seriesTitle, season, episode) -> final