Commit 9d93cf1b authored by Stephanie Wegscheidl's avatar Stephanie Wegscheidl

fixing bug when memory is cleared

parent 1dc3f219
......@@ -34,6 +34,7 @@ server <- function(input, output, session) {
#loading CoConUT data
json_data_coco <- fromJSON(paste(inFile$datapath, sep = ""), flatten = TRUE)
print("1")
coconut.df <<- json_data_coco[["data"]]
lastCoConUT <<- inFile$name
......@@ -190,69 +191,90 @@ server <- function(input, output, session) {
output$title <- renderText({ input$title })
#barchart
#selectInput("time_data", "data", choices=colnames(coconut.df))
output$input_hist_x <- renderUI({
if (is.null(input$nut))
return(NULL)
selectInput("in1", "x-axis:", cbind("unixTime", "longitude", "latitude", "speed", "gps.acc","lux", "light.acc","acc.coordinates", "acc.acc","bluetooth","ble.bpm","ble.bpmlist","ble.hrv","ble.hrvlist","activity.name", "acctivity.confidence","screen.status" ,"touch"),multiple=TRUE, selectize=TRUE)
selectInput("bar_x", "x-axis:", choices = colnames(coconut.df))
})
output$input_hist_y <- renderUI({
if (is.null(input$nut))
return(NULL)
selectInput("in2", "y-axis:", cbind("unixTime", "longitude", "latitude", "speed", "gps.acc","lux", "light.acc","acc.coordinates", "acc.acc","bluetooth","ble.bpm","ble.bpmlist","ble.hrv","ble.hrvlist","activity.name", "acctivity.confidence","screen.status" ,"touch"),multiple=TRUE, selectize=TRUE)
selectInput("bar_y", "y-axis:", choices = colnames(coconut.df))
})
#Timeline
output$input_time_x <- renderUI({
# output$input_time_data <- renderUI({
# if (is.null(input$nut))
# return(NULL)
# selectInput("input_time_data", "x-axis:", choices = colnames(coconut.df))
# })
#
# output$input_time_y <- renderUI({
# if (is.null(input$nut))
# return(NULL)
# selectInput("in4", "y-axis:", cbind("unixTime", "longitude", "latitude", "speed", "gps.acc","lux", "light.acc","acc.coordinates", "acc.acc","bluetooth","ble.bpm","ble.bpmlist","ble.hrv","ble.hrvlist","activity.name", "acctivity.confidence","screen.status" ,"touch"),multiple=TRUE, selectize=TRUE)
# })
#Map
output$input_map <- renderUI({
if (is.null(input$nut))
return(NULL)
selectInput("in3", "x-axis:", cbind("unixTime", "longitude", "latitude", "speed", "gps.acc","lux", "light.acc","acc.coordinates", "acc.acc","bluetooth","ble.bpm","ble.bpmlist","ble.hrv","ble.hrvlist","activity.name", "acctivity.confidence","screen.status" ,"touch"),multiple=TRUE, selectize=TRUE)
selectInput("map_data", "data", choices=colnames(coconut.df))
})
output$input_time_y <- renderUI({
#linechart
output$input_line_x <- renderUI({
if (is.null(input$nut))
return(NULL)
selectInput("in4", "y-axis:", cbind("unixTime", "longitude", "latitude", "speed", "gps.acc","lux", "light.acc","acc.coordinates", "acc.acc","bluetooth","ble.bpm","ble.bpmlist","ble.hrv","ble.hrvlist","activity.name", "acctivity.confidence","screen.status" ,"touch"),multiple=TRUE, selectize=TRUE)
selectInput("line_x", "x-axis", choices=colnames(coconut.df))
})
#Map
output$input_map <- renderUI({
output$input_line_y <- renderUI({
if (is.null(input$nut))
return(NULL)
selectInput("in5", "Data:", cbind("unixTime", "speed", "gps.acc","lux", "light.acc","acc.coordinates", "acc.acc","bluetooth","ble.bpm","ble.bpmlist","ble.hrv","ble.hrvlist","activity.name", "acctivity.confidence","screen.status" ,"touch"),multiple=TRUE, selectize=TRUE)
})
selectInput("line_y", "y-axis", choices=colnames(coconut.df)) })
output$input_map_x <- renderUI({
#scatterplot
output$input_scat_x <- renderUI({
if (is.null(input$nut))
return(NULL)
selectInput("in5", "x-axis:", cbind("unixTime", "longitude", "latitude", "speed", "gps.acc","lux", "light.acc","acc.coordinates", "acc.acc","bluetooth","ble.bpm","ble.bpmlist","ble.hrv","ble.hrvlist","activity.name", "acctivity.confidence","screen.status" ,"touch"),multiple=TRUE, selectize=TRUE)
selectInput("scat_x", "x-axis", choices=colnames(coconut.df))
})
output$input_map_y <- renderUI({
output$input_scat_y <- renderUI({
if (is.null(input$nut))
return(NULL)
selectInput("in6", "y-axis:", cbind("unixTime", "longitude", "latitude", "speed", "gps.acc","lux", "light.acc","acc.coordinates", "acc.acc","bluetooth","ble.bpm","ble.bpmlist","ble.hrv","ble.hrvlist","activity.name", "acctivity.confidence","screen.status" ,"touch"),multiple=TRUE, selectize=TRUE)
selectInput("scat_y", "y-axis", choices=colnames(coconut.df))
})
#boxplot
#linechart
output$input_line_x <- renderUI({
output$input_box_x <- renderUI({
if (is.null(input$nut))
return(NULL)
selectInput("in7", "x-axis:", cbind("unixTime", "longitude", "latitude", "speed", "gps.acc","lux", "light.acc","acc.coordinates", "acc.acc","bluetooth","ble.bpm","ble.bpmlist","ble.hrv","ble.hrvlist","activity.name", "acctivity.confidence","screen.status" ,"touch"),multiple=TRUE, selectize=TRUE)
selectInput("box_x", "data", choices=colnames(coconut.df))
})
output$input_line_y <- renderUI({
output$input_box_y <- renderUI({
if (is.null(input$nut))
return(NULL)
selectInput("in8", "y-axis:", cbind("unixTime", "longitude", "latitude", "speed", "gps.acc","lux", "light.acc","acc.coordinates", "acc.acc","bluetooth","ble.bpm","ble.bpmlist","ble.hrv","ble.hrvlist","activity.name", "acctivity.confidence","screen.status" ,"touch"),multiple=TRUE, selectize=TRUE)
selectInput("box_y", "y-axis", choices=colnames(coconut.df))
})
#Continue to dashboard page
observeEvent(input$dashboardSite, {
......@@ -277,9 +299,8 @@ server <- function(input, output, session) {
status= "warning",
solidHeader = TRUE,
collapsible = TRUE,
selectInput(xplotname, "x-axis", choices=colnames(coconut.df)),
selectInput(yplotname, "y-axis", choices=colnames(coconut.df)),
# selectInput(xplotname, "x-axis", choices=colnames(coconut.df)),
# selectInput(yplotname, "y-axis", choices=colnames(coconut.df)),
print(plotname),
plotOutput(plotname, height = 250))
)
......@@ -335,7 +356,7 @@ server <- function(input, output, session) {
status= "warning",
solidHeader = TRUE,
collapsible = TRUE,
timevisOutput("time", height = 150)
timevisOutput("time", height = 175)
)
})
......
......@@ -75,48 +75,51 @@ ui <- dashboardPage(
tabsetPanel(
tabPanel("Barchart",
#Barchart
uiOutput("input_hist_x"),
uiOutput("input_hist_y"),
actionButton("check_hist", "add Barchart")
#uiOutput("input_hist_x"),
#uiOutput("input_hist_y")
),
#TIMELINE
tabPanel("Timeline",
textOutput("texttimeline"),
#uiOutput("input_time_data"),
actionButton("check_time", "add Timeline")
#selectInput("time_data", "data", choices=colnames(coconut.df))
#uiOutput("input_time_x"),
#uiOutput("input_time_y")
),
#Linechart
tabPanel("Linechart",
selectInput("line_x", "x-axis", choices=colnames(coconut.df)),
selectInput("line_y", "y-axis", choices=colnames(coconut.df)),
uiOutput("input_line_x"),
uiOutput("input_line_y"),
actionButton("check_line", "add Linechart")
#uiOutput("input_line_x"),
#uiOutput("input_line_y")
),
#Scatterplot
tabPanel("Scatterplot",
selectInput("scat_x", "x-axis", choices=colnames(coconut.df)),
selectInput("scat_y", "y-axis", choices=colnames(coconut.df)),
# selectInput("scat_x", "x-axis", choices=colnames(coconut.df)),
# selectInput("scat_y", "y-axis", choices=colnames(coconut.df)),
uiOutput("input_scat_x"),
uiOutput("input_scat_y"),
actionButton("check_scat", " add Scatterplot")
),
#Boxplot
tabPanel("Boxplot",
selectInput("box_x", "x-axis", choices=colnames(coconut.df)),
# selectInput("box_x", "x-axis", choices=colnames(coconut.df)),
uiOutput("input_box_x"),
#uiOutput("input_box_y"),
actionButton("check_box", "add Boxplot")
#selectInput("box_y", "y-axis", choices=colnames(coconut.df))
),
#MAP
tabPanel("Map",
selectInput("map_data", "data", choices=colnames(coconut.df)),
# selectInput("map_data", "data", choices=colnames(coconut.df)),
uiOutput("input_map"),
actionButton("check_map", "add Map")
)
)
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment