Commit a11186f4 authored by Stephanie's avatar Stephanie

CoCoQuest import first steps in the right direction

parent 014baa05
......@@ -50,32 +50,50 @@ server <- function(input, output) {
#CoCOQuest Data import and showing into data site
output$lastLoadedQuest <- renderText({
lastCoCoQuest
})
output$quest <- renderDataTable({
output$questTimes <- renderDataTable({
inFile <- input$quest
if (is.null(inFile))
return(NULL)
#loading CoConUT data
json_data_quest <- fromJSON(paste(inFile$datapath, sep = ""), flatten = TRUE)
cocoquest.df <<- json_data_quest[["data"]]
#loading CoCoQuest data
json_data_quest <<- fromJSON(paste(inFile$datapath, sep = ""), flatten = TRUE)
#print("json_data_qest")
#print(json_data_quest)
#lastCoCoQuest <<- inFile$name
lastCoCoQuest <<- inFile$name
json_data_quest$unix_starttime <- as.numeric(json_data_quest$startTime)/1000
json_data_quest$unix_endtime <- as.numeric(json_data_quest$endTime)/1000
starttime <- anytime(json_data_quest$unix_starttime)
endtime <- anytime(json_data_quest$unix_endtime)
# setting the table style
#unix parsed
questTimes <<- c(starttime ,endtime)
print("questTime")
print(questTimes)
mat <- matrix(questTimes,1,2)
#mat <- matrix(as.Date(questTimes),1,2)
print("mat")
print(mat)
colnames(mat)<-c("Starttime", "Endtime")
#setting the table style
datatable(
cbind(cocoquest.df),
cbind(mat),
options = list(
searching = TRUE,
autoWidth = TRUE,
rownames = FALSE,
scroller = TRUE,
scrollX = TRUE,
scrollY = "500px",
fixedHeader = TRUE,
searching = FALSE,
#autoWidth = TRUE,
rownames = TRUE,
#scroller = TRUE,
#scrollX = TRUE,
# scrollY = "500px",
class = 'cell-border stripe'
)
)
......
......@@ -29,13 +29,13 @@ ui <- dashboardPage(
tabItem(tabName = "upload",
h2("Upload here:"),
fileInput("nut", "Select CoConUT Data (*.json):",
multiple = FALSE,
multiple = TRUE,
accept = c(
"text/json",
"text/comma-separated-values,text/plain",
".json")),
fileInput("quest", "Select CoCoQuest Data (*.json):",
multiple = FALSE,
multiple = TRUE,
accept = c(
"text/json",
"text/comma-separated-values,text/plain",
......@@ -56,7 +56,7 @@ ui <- dashboardPage(
h2("CoCoQuest Data here:"),
"Last Loaded CoCoQuest Data: ",
textOutput("lastLoadedQuest"),
dataTableOutput("quest")
dataTableOutput("questTimes")
),
......
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