Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephanie Wegscheidl
cocoVisR
Commits
87b68a73
Commit
87b68a73
authored
Nov 22, 2018
by
Stephanie Wegscheidl
Browse files
Map, timeline --> No data selecting
Scatterplot, Linechart, Barchart work with selecting data. Next Steps: Boxplot
parent
b98c9128
Changes
2
Hide whitespace changes
Inline
Side-by-side
dashboard/server.R
View file @
87b68a73
...
...
@@ -33,13 +33,12 @@ server <- function(input, output, session) {
#loading CoConUT data
json_data_coco
<-
fromJSON
(
paste
(
inFile
$
datapath
,
sep
=
""
),
flatten
=
TRUE
)
coconut.df
<<-
json_data_coco
[[
"data"
]]
lastCoConUT
<<-
inFile
$
name
#print("coconut:")
#coconut.df$timestamp <- format(coconut.df$timestamp, format="%d-%B-%Y %H:%M:%S")
#print(coconut.df)
if
(
is.null
(
coconut.df
$
timestamp
)){}
...
...
@@ -94,6 +93,7 @@ server <- function(input, output, session) {
else
{
touch
<<-
coconut.df
$
interaction.touch
}
# setting the table style
datatable
(
cbind
(
coconut.df
),
...
...
@@ -268,13 +268,12 @@ server <- function(input, output, session) {
status
=
"warning"
,
solidHeader
=
TRUE
,
collapsible
=
TRUE
,
plotOutput
(
"
hist
"
,
height
=
250
))
plotOutput
(
"
bar
"
,
height
=
250
))
})
#BAR VIEW
output
$
hist
<-
renderPlot
({
output
$
bar
<-
renderPlot
({
print
(
"BAR wird aufgerufen."
)
print
(
coconut.df
)
data
<-
structure
(
list
(
V1
=
as.numeric
(
coconut.df
[[
input
$
bar_y
]]),
V2
=
as.numeric
(
coconut.df
[[
input
$
bar_x
]])),
.Names
=
c
(
"V1"
,
"V2"
),
row.names
=
c
(
NA
,
6L
),
class
=
"data.frame"
)
...
...
@@ -336,6 +335,11 @@ server <- function(input, output, session) {
})
output
$
texttimeline
<-
renderText
({
"Check Timeline for getting a Timeline about CoCoQuest Tasks and Questions."
})
#linechart
output
$
line_box
<-
renderUI
({
...
...
@@ -350,6 +354,13 @@ server <- function(input, output, session) {
#TODO: linechart View
output
$
line
<-
renderPlot
({
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) {
#TODO: Scatterplot View
output
$
scat
<-
renderPlot
({
data
<-
structure
(
list
(
V1
=
as.numeric
(
coconut.df
[[
input
$
scat_
y
]]),
V2
=
as.numeric
(
coconut.df
[[
input
$
scat_
x
]])),
data
<-
structure
(
list
(
V1
=
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"
)
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
...
...
dashboard/ui.R
View file @
87b68a73
...
...
@@ -84,7 +84,8 @@ ui <- dashboardPage(
#TIMELINE
tabPanel
(
"Timeline"
,
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_y")
),
...
...
Write
Preview
Supports
Markdown
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