Commit 704e8bcf authored by Stephanie's avatar Stephanie

upload style working, data page inserted, first trys reading uploaded data, doesn't work by now

parent 84a7572e
......@@ -8,9 +8,37 @@
#
library(shiny)
library(jsonlite)
server <- function(input, output) {
set.seed(122)
output$data <- renderTable({
inFile <- input$file1
if (is.null(inFile))
return(NULL)
#read.csv(inFile$datapath, header = input$header)
print("filename: ")
print(inFile$name)
print("filepath: ")
print(inFile$datapath)
json_file <- paste(inFile$datapath,inFile$name, sep="")
json_data_coco <- fromJSON(paste(json_file, sep = ""), flatten = TRUE)
prin("json_data_coco")
print(json_data_coco)
})
#data<-reactive({
#file1 <- input$file1
#if(is.null(file1)){return()}
#read_json(file1=file1$datapath)
#})
#histdata <- rnorm(500)
#output$plot1 <- renderPlot({
......
## app.R ##
library(shiny)
library(shinydashboard)
library(leaflet)
#library(jsonlite)
library(anytime)
#library(leaflet)
ui <- dashboardPage(
skin="purple",
......@@ -10,6 +13,7 @@ ui <- dashboardPage(
dashboardSidebar(
sidebarMenu(
menuItem("Upload", tabName = "upload", icon =icon("upload")),
menuItem("Data", tabName = "data", icon =icon("list")),
menuItem("Contolls", tabName = "controlls", icon = icon("cog")),
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Help", tabName = "help", icon = icon("book"))
......@@ -37,8 +41,19 @@ ui <- dashboardPage(
"text/comma-separated-values,text/plain",
".json"))
),
#show data tab content
tabItem(tabName = "data",
h2("CoConUT Data here:"),
textOutput("data"),
h2("CoCoQuest Data here:")
),
# Controlls tab content
tabItem(tabName = "controlls",
h2("Controlls here:"),
......@@ -76,7 +91,7 @@ ui <- dashboardPage(
status = "warning",
solidHeader = TRUE,
collapsible = TRUE,
plotOutput("plot1", height = 250)),
plotOutput("plot2", height = 250)),
box(title="Timeline",
status = "warning",
solidHeader = TRUE,
......@@ -91,9 +106,21 @@ ui <- dashboardPage(
# Help tab content
tabItem(tabName = "help",
h2("I am here to Help.")
h2("I am here to Help."),
"This tool was created to help visualize and analyse data which is recorded with the CoConUT and CoCoQuest Applications.",
h3("Uploading Data"),
"Please make sure the files you want to upload are *.json files Otherwise the upload won't work.", br(),
"For uploading you have to click on the 'Browse'-Button and an explorer-window will open.", br(),
"Please navigate to the wanted file, select it and click on 'open'.
Then the name of the selected file and a loadingbar will apear. 'Upload complete' will show you that the upload worked and is finished.", br(),
"Please make sure, that you upload the right data into the right field.", br(),
"First field: CoConUT and second field: CoCoQuest. Otherwise the visualization won't work.",
h3("Controlls"),
"", br(),
h3("Dashboard"),
"", br()
)
))
)
\ No newline at end of file
)
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