layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0) %>%
add_axis("y", orient = "left", tick_size_major=0, ) %>%
add_axis("y", orient = "right", tick_size_major=0, title="") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0) %>%
add_axis("y", orient = "left", tick_size_major=0, values=1:10) %>%
add_axis("y", orient = "right", tick_size_major=0, title="") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, values=1:20) %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%m:%s") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%m:%s") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", values=NULL) %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%m:%s") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", values="") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%m:%s") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", format="") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%m:%s") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", format="[]") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%m:%s") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", format="04d") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%m:%s") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", format="d") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%m:%s") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", format="00d") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%M:%S") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", format="00d") %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%M:%S") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", values=0) %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%M:%S") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", values=0:5) %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%M:%S") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", values=0:0) %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
axis = list(stroke="#000000"),
grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%M:%S") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
add_axis("y", orient = "right", tick_size_major=0, title="", values=NULL) %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
#   add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
#     axis = list(stroke="#000000"),
#     grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%M:%S") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
#   add_axis("y", orient = "right", tick_size_major=0, title="", values=NULL) %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
#   add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
#     axis = list(stroke="#000000"),
#     grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%M") %>%
add_axis("y", orient = "left", tick_size_major=0) %>%
#   add_axis("y", orient = "right", tick_size_major=0, title="", values=NULL) %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
plotdata %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
#   add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
#     axis = list(stroke="#000000"),
#     grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%M", title ="") %>%
add_axis("y", orient = "left", tick_size_major=0, title = "") %>%
#   add_axis("y", orient = "right", tick_size_major=0, title="", values=NULL) %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600)
shiny::runApp()
input_time %>%
ggvis(~Time, ~Buildings, stroke:=~color) %>%
layer_lines() %>%
layer_points(fill = ~Player, size :=2) %>%
#   add_axis("x", orient = "top", tick_size_major=0, title="", properties = axis_props(
#     axis = list(stroke="#000000"),
#     grid = list(stroke="#262729"))) %>%
add_axis("x", orient = "bottom", tick_size_major=0, format="%M", title ="") %>%
add_axis("y", orient = "left", tick_size_major=0, title = "") %>%
#   add_axis("y", orient = "right", tick_size_major=0, title="", values=NULL) %>%
hide_legend("fill") %>%
hide_legend("stroke") %>%
scale_datetime("x", domain = c(min(plotdata$Time), max(plotdata$Time)+38), expand=c(0,0)) %>%
scale_numeric("y", domain = c(0, max(plotdata$Buildings)+7), expand=c(0,0),  nice = FALSE) %>%
set_options(width = 740, height = 600) %>%
bind_shiny("ggvis", "ggvis_ui")
shiny::runApp()
shiny::runApp()
shiny::runApp()
shiny::runApp()
shiny::runApp()
shiny::runApp()
shiny::runApp()
shiny::runApp()
shiny::runApp()
shiny::runApp()
shiny::runApp()
shiny::runApp()
buildhighlight <- read.csv(file="buildhighlight.csv", head=TRUE, sep=",")
buildhighlight
head(buildcsum)
player2 <- builddata() %>% filter(Player=="Ms. Production") %>% select(-Player) %>% tail(1)
library(shiny)
library(dplyr)
library(lubridate)
library(ggvis)
player2 <- builddata() %>% filter(Player=="Ms. Production") %>% select(-Player) %>% tail(1)
player2 <- buildcsum %>% filter(Player=="Ms. Production") %>% select(-Player) %>% tail(1)
player2
player2cond <- buildhighlight %>% filter(Player=="Ms. Production") %>% select(-Player) %>% tail(1)
player2cond
player1 <- buildcsum %>% filter(Player=="Totakeke") %>% select(-Player) %>% tail(1)
builddata <- reactive({buildcsum[buildcsum$Time <= 15,]})
builddata
builddata <- buildcsum[buildcsum$Time <= 15,]
builddata
builddata <- buildcsum[buildcsum$Time <= starttime+2*60,]
builddata
player1 <- builddata %>% filter(Player=="Totakeke") %>% select(-Player) %>% tail(1)
player1
player1cond <- buildhighlight[buildhighlight$Time <= starttime+2*60,] %>% filter(Player=="Totakeke") %>% select(-Player) %>% tail(1)
buildhighlight$Time <- buildhighlight$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
player1cond <- buildhighlight[buildhighlight$Time <= starttime+2*60,] %>% filter(Player=="Totakeke") %>% select(-Player) %>% tail(1)
player1cond
buildhighlight[buildhighlight$Time <= starttime+2*60,]
buildcsum <-  read.csv(file="offworldreplaybuildsum.csv", head=TRUE, sep=",")
buildcsum$Time <- buildcsum$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
starttime <- head(plotdata$Time, 1)
buildhighlight[buildhighlight$Time <= starttime+2*60,]
data <- read.csv(file="offworldreplay.csv",head=TRUE,sep=",")
buildingtypes <- read.csv(file="buildings.csv",head=TRUE,sep=",")
buildcsum <-  read.csv(file="offworldreplaybuildsum.csv", head=TRUE, sep=",")
buildhighlight <- read.csv(file="buildhighlight.csv", head=TRUE, sep=",")
buildcsum$Time <- buildcsum$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
buildhighlight$Time <- buildhighlight$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
data$Time <- data$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
buildingtypes$Image <- paste('<img src="', buildingtypes$Image, '" height=30 title="', buildingtypes$Building, '" />', sep ='')
plotdata <- select(data, Time, Buildings, Player, Message)
plotdata$Player <- factor(plotdata$Player, levels=c('Totakeke', 'Ms. Production', 'Mr. Sabotage', 'Ms. Launch'))
starttime <- head(plotdata$Time, 1)
color <- c('#379FA8', '#B82327', '#76A73E', '#E16823')
player <- unique(plotdata$Player)
playercolor <- data.frame(color, player)
plotdata<-left_join(plotdata, playercolor, c("Player"="player"))
colnames1 <- as.matrix(buildingtypes$Image)[1:10]
colnames2 <- as.matrix(buildingtypes$Image)[11:20]
builddata <- buildcsum[buildcsum$Time <= starttime+2*60,]
player1 <- builddata %>% filter(Player=="Totakeke") %>% select(-Player) %>% tail(1)
player1cond <- buildhighlight[buildhighlight$Time <= starttime+2*60,] %>% filter(Player=="Totakeke") %>% select(-Player) %>% tail(1)
player1
player1cond
player1cond[,2:10]
player1cond[,colnames(player1cond)==1]
player1cond[player1cond$Metal.Mine>0,]
player1cond
player1
temp <- player1
temp$Metal.Mine <- paste0('<div class="increase"',as.character(temp$Metal.Mine))
temp$Metal.Mine
temp
temp <- player1
temp2 <- player1cond
minute(temp$Time)
as.numeric(temp$Time)
as.numeric(temp$Time) - starttime
starttime
as.numeric(temp$Time) - as.numeric(starttime)
(as.numeric(temp$Time) - as.numeric(starttime) + 30)/30
as.integer(as.numeric(temp$Time) - as.numeric(starttime) + 30)/30
as.integer((as.numeric(temp$Time) - as.numeric(starttime) + 30)/30)
mutate(temp, interval = as.integer((as.numeric(temp$Time) - as.numeric(starttime) + 30)/30))
temp
temp2
paste(temp, temp2)
data <- read.csv(file="offworldreplay.csv",head=TRUE,sep=",")
buildingtypes <- read.csv(file="buildings.csv",head=TRUE,sep=",")
buildcsum <-  read.csv(file="offworldreplaybuildsum_mod.csv", head=TRUE, sep=",")
# buildhighlight <- read.csv(file="buildhighlight.csv", head=TRUE, sep=",")
buildcsum$Time <- buildcsum$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
# buildhighlight$Time <- buildhighlight$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
data$Time <- data$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
buildingtypes$Image <- paste('<img src="', buildingtypes$Image, '" height=30 title="', buildingtypes$Building, '" />', sep ='')
plotdata <- select(data, Time, Buildings, Player, Message)
plotdata$Player <- factor(plotdata$Player, levels=c('Totakeke', 'Ms. Production', 'Mr. Sabotage', 'Ms. Launch'))
starttime <- head(plotdata$Time, 1)
color <- c('#379FA8', '#B82327', '#76A73E', '#E16823')
player <- unique(plotdata$Player)
playercolor <- data.frame(color, player)
plotdata<-left_join(plotdata, playercolor, c("Player"="player"))
colnames1 <- as.matrix(buildingtypes$Image)[1:10]
colnames2 <- as.matrix(buildingtypes$Image)[11:20]
shiny::runApp()
buildsum_mod <- read.csv(file="buildsum_mod.csv", head=TRUE, sep=",")
buildsum_mod$Time <- buildsum_mod$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
buildcsum <-  read.csv(file="offworldreplaybuildsum_mod.csv", head=TRUE, sep=",")
tail(buildcsum,1)
buildcsum <-  read.csv(file="offworldreplaybuildsum.csv", head=TRUE, sep=",")
buildcsum$Time <- buildcsum$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
tail(buildcsum,1)
paste0(tail(buildsum_mod,1),tail(buildcsum,1),'</div>')
tail(buildsum_mod)
paste0(tail(buildsum_mod,1),tail(buildcsum,1),'</div>')
tail(buildsum_mod,1)
paste0(tail(buildsum_mod,1),'</div>')
paste(tail(buildsum_mod,1),tail(buildcsum,1),'</div>')
buildsum_mod
tail(buildsum_mod,1)
paste0(tail(buildsum_mod,1),"cheeky")
paste0(as.character(tail(buildsum_mod,1)),"cheeky")
paste0(as.vector(tail(buildsum_mod,1)))
str(buildsum_mod)
head(buildsum_mod$HQ)
paste(head(buildsum_mod$HQ))
buildsum_mod[,1]
buildsum_mod[1,]
paste(buildsum_mod[1,],buildcsum[1,])
paste(as.character(buildsum_mod[1,]),buildcsum[1,])
paste(unlist(buildsum_mod[1,]),buildcsum[1,])
paste(unlist(buildsum_mod[1,]))
buildsum_mod <- read.csv(file="buildsum_mod.csv", head=TRUE, sep=",", stringsAsFactors = FALSE)
buildsum_mod$Time <- buildsum_mod$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
paste(buildsum_mod[1,],buildcsum[1,])
paste0(buildsum_mod[1,],buildcsum[1,])
paste0(buildsum_mod[1,],buildcsum[1,],"<div>")
paste0(buildsum_mod[1,3:22],buildcsum[1,3:22],"<div>")
test <- buildcsum
buildcsum[1,]
buildcsum[1,] <- paste0(buildsum_mod[1,3:22],buildcsum[1,3:22],"<div>")
buildcsum[1,3:22] <- paste0(buildsum_mod[1,3:22],buildcsum[1,3:22],"<div>")
buildcsum[1,]
buildcsum <-  read.csv(file="offworldreplaybuildsum.csv", head=TRUE, sep=",")
buildcsum$Time <- buildcsum$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
shiny::runApp()
shiny::runApp()
library(shiny)
library(dplyr)
library(lubridate)
library(ggvis)
data <- read.csv(file="offworldreplay.csv",head=TRUE,sep=",")
buildingtypes <- read.csv(file="buildings.csv",head=TRUE,sep=",")
buildcsum <-  read.csv(file="offworldreplaybuildsum.csv", head=TRUE, sep=",")
buildsum_mod <- read.csv(file="buildsum_mod.csv", head=TRUE, sep=",", stringsAsFactors = FALSE)
buildcsum$Time <- buildcsum$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
buildsum_mod$Time <- buildsum_mod$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
data$Time <- data$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
buildingtypes$Image <- paste('<img src="', buildingtypes$Image, '" height=30 title="', buildingtypes$Building, '" />', sep ='')
plotdata <- select(data, Time, Buildings, Player, Message)
plotdata$Player <- factor(plotdata$Player, levels=c('Totakeke', 'Ms. Production', 'Mr. Sabotage', 'Ms. Launch'))
starttime <- head(plotdata$Time, 1)
color <- c('#379FA8', '#B82327', '#76A73E', '#E16823')
player <- unique(plotdata$Player)
playercolor <- data.frame(color, player)
plotdata<-left_join(plotdata, playercolor, c("Player"="player"))
colnames1 <- as.matrix(buildingtypes$Image)[1:10]
colnames2 <- as.matrix(buildingtypes$Image)[11:20]
shiny::runApp()
shiny::runApp()
library(shiny)
library(dplyr)
library(lubridate)
library(ggvis)
data <- read.csv(file="offworldreplay.csv",head=TRUE,sep=",")
buildingtypes <- read.csv(file="buildings.csv",head=TRUE,sep=",")
buildcsum <-  read.csv(file="offworldreplaybuildsum.csv", head=TRUE, sep=",")
buildsum_mod <- read.csv(file="buildsum_mod.csv", head=TRUE, sep=",", stringsAsFactors = FALSE)
buildcsum$Time <- buildcsum$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
buildsum_mod$Time <- buildsum_mod$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
data$Time <- data$Time %>% format(format = "%M:%S") %>% as.POSIXct(format ="%M:%S")
buildingtypes$Image <- paste('<img src="', buildingtypes$Image, '" height=30 title="', buildingtypes$Building, '" />', sep ='')
plotdata <- select(data, Time, Buildings, Player, Message)
plotdata$Player <- factor(plotdata$Player, levels=c('Totakeke', 'Ms. Production', 'Mr. Sabotage', 'Ms. Launch'))
starttime <- head(plotdata$Time, 1)
color <- c('#379FA8', '#B82327', '#76A73E', '#E16823')
player <- unique(plotdata$Player)
playercolor <- data.frame(color, player)
plotdata<-left_join(plotdata, playercolor, c("Player"="player"))
colnames1 <- as.matrix(buildingtypes$Image)[1:10]
colnames2 <- as.matrix(buildingtypes$Image)[11:20]
shiny::runApp()
shiny::runApp()
shiny::runApp()
library(shinyapps)
shinyapps::deployApp(')
library(shinyapps)
shinyapps::deployApp()
library(shinyapps)
shinyapps::deployApp('')
library(shinyapps)
shinyapps::deployApp('./')
library(shinyapps)
shinyapps::deployApp('/')
setwd("~/GitHub/edav/assets/justin/app")
shiny::runApp()
shinyapps::deployApp('')
shinyapps::deployApp()
?deployApp()
deployApp()
deployApp(name="Offworld")
deployApp(appName="Offworld")
