Commit 87b68a73 authored by Stephanie Wegscheidl's avatar Stephanie Wegscheidl

Map, timeline --> No data selecting

Scatterplot, Linechart, Barchart work with selecting data.

Next Steps: Boxplot
parent b98c9128
...@@ -33,13 +33,12 @@ server <- function(input, output, session) { ...@@ -33,13 +33,12 @@ server <- function(input, output, session) {
#loading CoConUT data #loading CoConUT data
json_data_coco <- fromJSON(paste(inFile$datapath, sep = ""), flatten = TRUE) json_data_coco <- fromJSON(paste(inFile$datapath, sep = ""), flatten = TRUE)
coconut.df <<- json_data_coco[["data"]] coconut.df <<- json_data_coco[["data"]]
lastCoConUT <<- inFile$name lastCoConUT <<- inFile$name
#print("coconut:") #print("coconut:")
#coconut.df$timestamp <- format(coconut.df$timestamp, format="%d-%B-%Y %H:%M:%S") #coconut.df$timestamp <- format(coconut.df$timestamp, format="%d-%B-%Y %H:%M:%S")
#print(coconut.df) #print(coconut.df)
if(is.null(coconut.df$timestamp)){} if(is.null(coconut.df$timestamp)){}
...@@ -94,6 +93,7 @@ server <- function(input, output, session) { ...@@ -94,6 +93,7 @@ server <- function(input, output, session) {
else{touch<<-coconut.df$interaction.touch} else{touch<<-coconut.df$interaction.touch}
# setting the table style # setting the table style
datatable( datatable(
cbind(coconut.df), cbind(coconut.df),
...@@ -268,13 +268,12 @@ server <- function(input, output, session) { ...@@ -268,13 +268,12 @@ server <- function(input, output, session) {
status= "warning", status= "warning",
solidHeader = TRUE, solidHeader = TRUE,
collapsible = TRUE, collapsible = TRUE,
plotOutput("hist", height = 250)) plotOutput("bar", height = 250))
}) })
#BAR VIEW #BAR VIEW
output$hist <- renderPlot({ output$bar <- renderPlot({
print("BAR wird aufgerufen.") print("BAR wird aufgerufen.")
print(coconut.df)
data<- structure(list(V1=as.numeric(coconut.df[[input$bar_y]]), data<- structure(list(V1=as.numeric(coconut.df[[input$bar_y]]),
V2=as.numeric(coconut.df[[input$bar_x]])), V2=as.numeric(coconut.df[[input$bar_x]])),
.Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame") .Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame")
...@@ -336,6 +335,11 @@ server <- function(input, output, session) { ...@@ -336,6 +335,11 @@ server <- function(input, output, session) {
}) })
output$texttimeline <- renderText({
"Check Timeline for getting a Timeline about CoCoQuest Tasks and Questions."
})
#linechart #linechart
output$line_box <- renderUI({ output$line_box <- renderUI({
...@@ -350,6 +354,13 @@ server <- function(input, output, session) { ...@@ -350,6 +354,13 @@ server <- function(input, output, session) {
#TODO: linechart View #TODO: linechart View
output$line <- renderPlot({ output$line <- renderPlot({
print("LINE wird aufgerufen") print("LINE wird aufgerufen")
data<- structure(list(V1=as.numeric(coconut.df[[input$line_x]]),
V2=as.numeric(coconut.df[[input$line_y]])),
.Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame")
plot(data$V1,data$V2, type="l", ylab=input$line_y, xlab=input$line_x)
}) })
...@@ -365,12 +376,12 @@ server <- function(input, output, session) { ...@@ -365,12 +376,12 @@ server <- function(input, output, session) {
#TODO: Scatterplot View #TODO: Scatterplot View
output$scat <- renderPlot({ output$scat <- renderPlot({
data<- structure(list(V1=as.numeric(coconut.df[[input$scat_y]]), data<- structure(list(V1=as.numeric(coconut.df[[input$scat_x]]),
V2=as.numeric(coconut.df[[input$scat_x]])), V2=as.numeric(coconut.df[[input$scat_y]])),
.Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame") .Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame")
print("SCAT wird aufgerufen") print("SCAT wird aufgerufen")
plot(data, x= data$V2, y= data$V1, type="p") plot(data$V1, data$V2, type="p", labx=input$scat_x, laby=input$scat_y )
}) })
# Boxplot # Boxplot
......
...@@ -84,7 +84,8 @@ ui <- dashboardPage( ...@@ -84,7 +84,8 @@ ui <- dashboardPage(
#TIMELINE #TIMELINE
tabPanel("Timeline", tabPanel("Timeline",
checkboxInput("check_time", "Timeline", FALSE), checkboxInput("check_time", "Timeline", FALSE),
selectInput("time_data", "data", choices=colnames(coconut.df)) textOutput("texttimeline")
#selectInput("time_data", "data", choices=colnames(coconut.df))
#uiOutput("input_time_x"), #uiOutput("input_time_x"),
#uiOutput("input_time_y") #uiOutput("input_time_y")
), ),
......
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