Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cocoVisR
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stephanie Wegscheidl
cocoVisR
Commits
4fc943f9
Commit
4fc943f9
authored
Jul 22, 2018
by
Stephanie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getting dropdown choices -> not finished, trying stuff with quest import
parent
2711e1a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
16 deletions
+36
-16
dashboard/server.R
dashboard/server.R
+34
-13
dashboard/ui.R
dashboard/ui.R
+2
-3
No files found.
dashboard/server.R
View file @
4fc943f9
...
...
@@ -14,14 +14,17 @@ library(DT)
server
<-
function
(
input
,
output
)
{
set.seed
(
122
)
#CoConUT Data import and showing into data site
output
$
file1
<-
renderDataTable
({
inFile
<-
input
$
file1
if
(
is.null
(
inFile
))
return
(
NULL
)
json_data_coco
<-
fromJSON
(
paste
(
inFile
$
datapath
,
sep
=
""
),
flatten
=
TRUE
)
coconut.df
<-
json_data_coco
[[
"data"
]]
#loading CoConUT data
json_data_coco
<<-
fromJSON
(
paste
(
inFile
$
datapath
,
sep
=
""
),
flatten
=
TRUE
)
coconut.df
<<-
json_data_coco
[[
"data"
]]
print
(
inFile
$
datapath
)
# setting the table style
datatable
(
cbind
(
coconut.df
),
options
=
list
(
...
...
@@ -35,30 +38,48 @@ server <- function(input, output) {
class
=
'cell-border stripe'
)
)
})
# Getting
output
$
dataSelector_x
<-
renderUI
({
selectInput
(
"in1"
,
"x-axis:"
,
as.list
(
coconut.df
),
multiple
=
TRUE
,
selectize
=
TRUE
)
})
#coconut.df$timestamp <- anytime((as.numeric(coconut.df$timestamp)/1000))
output
$
dataSelector_y
<-
renderUI
({
selectInput
(
"in1"
,
"y-axis:"
,
as.list
(
coconut.df
),
multiple
=
TRUE
,
selectize
=
TRUE
)
})
#TODO: CoCoQuest Output --> Ansätze data[] raus nehmen oder flatten richtig funken
output
$
file2
<-
renderDataTable
({
inFile
<-
input
$
file2
if
(
is.null
(
inFile
))
return
(
NULL
)
simplifyVector
<-
c
(
"studyID"
,
"studyName"
,
"description"
,
"tasks$endTime"
,
"id"
,
"startTime"
,
"endTime"
)
json_data_quest
<-
fromJSON
(
paste
(
inFile
$
datapath
,
sep
=
""
),
simplifyVector
=
TRUE
,
simplifyDataFrame
=
simplifyVector
,
simplifyMatrix
=
simplifyVector
,
flatten
=
FALS
E
)
#flatten(json_data_quest
)
#json_data <-map() <-- ansatz zum parsen?
simplifyMatrix
=
simplifyVector
,
flatten
=
TRU
E
)
print
(
"with simplify: "
)
print
(
json_data_quest
)
## ANSATZ zum rauslesen der Times: --> not working now
#questLength <<- length(json_data_quest)
#print("length")
#print(questLength)
#data <- c(json_data_quest$tasks[[1]]$`data`[[1]]$endtime, json_data_quest$tasks[[1]]$`data`[[2]]$endtime, json_data_quest$tasks[[1]]$startTime, json_data_quest$tasks[[1]]$endTime, json_data_quest$tasks[[2]]$`data`[[1]]$endtime, json_data_quest$tasks[[2]]$`data`[[2]]$endtime, json_data_endtime$tasks[[2]]$`data`[[3]]$endtime)
#data<-c(json_data_quest$tasks[[1]]$startTime, json_data_quest$tasks[[1]]$endTime, json_data_quest$tasks[[2]]$startTime, json_data_quest$tasks[[2]]$endTime )
#x<<-0
#for(x in x:questLength)
#{data<<-c(json_data_quest$tasks[[x]]$startTime, json_data_quest$tasks[[x]]$endTime)
#x=x+1}
#print("data: ")
#print(data)
})
#data<-reactive({
#file1 <- input$file1
#if(is.null(file1)){return()}
#read_json(file1=file1$datapath)
#})
#histdata <- rnorm(500)
...
...
dashboard/ui.R
View file @
4fc943f9
...
...
@@ -5,7 +5,6 @@ library(shinydashboard)
library
(
anytime
)
#library(leaflet)
ui
<-
dashboardPage
(
skin
=
"purple"
,
...
...
@@ -65,8 +64,8 @@ ui <- dashboardPage(
#TODO: SelectInput --> Get data out of loaded json to select it
checkboxInput
(
"histogram"
,
"Histogram"
,
FALSE
),
selectInput
(
'in1'
,
"x-Axis: "
,
"Bluetoothdevices"
,
multiple
=
TRUE
,
selectize
=
TRUE
),
selectInput
(
'in4'
,
"y-Axis: "
,
"Bluetoothdevices"
,
multiple
=
TRUE
,
selectize
=
TRUE
),
uiOutput
(
"dataSelector_x"
),
uiOutput
(
"dataSelector_y"
),
checkboxInput
(
"timeline"
,
"Timeline"
,
FALSE
),
selectInput
(
'in2'
,
"x-Axis: "
,
"Bluetoothdevices"
,
multiple
=
TRUE
,
selectize
=
TRUE
),
selectInput
(
'in4'
,
"y-Axis: "
,
"Bluetoothdevices"
,
multiple
=
TRUE
,
selectize
=
TRUE
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment