Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rhortensius committed Jul 27, 2020
1 parent f1f40ff commit 349c4e1
Show file tree
Hide file tree
Showing 354 changed files with 52 additions and 25 deletions.
Binary file added .DS_Store
Binary file not shown.
66 changes: 43 additions & 23 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,28 @@
# by Ruud Hortensius (University of Glasgow), part of the Cozmo4HRI project (github.com/comzmo4hri)
#
# This Shiny app displays the data from a emotion validation / classification study
# The user will be able to select the confidence of the ratings, the previous engagement of the raters with robots, and
# The user will be able to select the valence, arousal, and confidence of the ratings, the previous engagement of the raters with robots, and
# the animation category of the Cozmo robot
#
# Send me a message ([email protected]), find me on twitter (@ruudhortensius) or github (github.com/comzmo4hri).
#
# This is one of my first attempts to build a Shiny app: http://shiny.rstudio.com/. Just hit the 'Run App' button above.
#
#
# The code is based and inspired by Lisa DeBruine's code for this shiny app: http://shiny.psy.gla.ac.uk/lmem_sim/
# The code is based and inspired by Lisa DeBruine's code for this shiny app: http://shiny.psy.gla.ac.uk/lmem_sim/
#
#
# Ruud's wishlist:
# - Information displayed in the app
# - Density plots normal (lines are weird)
# - Reduce loading time
# - Automatically add new datapoints (link to OSF?)
# - Make it interactive: a click on a datapoint results in the video loaded
# - Select group_by(participant or video_id)
# - Display the animation categories in two columns

# load the dependencies
library(shiny)
library(shinydashboard)
library(plotly)
library(shinydashboard)
library(plotly) #this is a problem
library(tidyverse)
library(DT)

Expand Down Expand Up @@ -85,7 +83,7 @@ ui <- dashboardPage(
value = c(1,7),
step = 1)
),
# group input ----
# group input - animation ----
box(
title = "Animation group",
solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE,
Expand All @@ -95,17 +93,19 @@ ui <- dashboardPage(
"Animation category of the robot (select one or more):",
b <- unique(DF.main$group)
)
),
box(
title = "Data",
solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE,
width = NULL,
background = "black",
radioButtons("collapse", "Show data at video or individual level:",
list("video_id", "ppn"))
)
)#,
# group input - participant/video ----
# box(
# title = "Data",
# solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE,
# width = NULL,
# background = "black",
# radioButtons("collapse", "Show data at video or individual level:",
# list("video_id", "ppn"))
# )
)
),

###---- dashboardBody
dashboardBody(
tabItems(
Expand All @@ -118,14 +118,13 @@ ui <- dashboardPage(
skin = "black"
)



## server ----
server <- function(input, output) {

DF.re <- reactive({
# filter and group - density ----
DF.de <- reactive({
DF.main %>%
group_by_(input$collapse, "group", "animation_name") %>%
dplyr::group_by(ppn, group, animation_name) %>% #input$collapse (to have a reactive grouping)
summarise(valence = mean(valence),
arousal = mean(arousal),
confidence = mean(confidence),
Expand All @@ -136,9 +135,27 @@ server <- function(input, output) {
between(interaction_score, input$filter_interaction[1], input$filter_interaction[2]))%>%
filter(if(length(input$behaviour>0)) group %in% input$behaviour else TRUE)
})
# filter and group - scatter ----

DF.sc <- reactive({
DF.main %>%
dplyr::group_by(video_id, group, animation_name) %>% #input$collapse (to have a reactive grouping)
summarise(valence = mean(valence),
arousal = mean(arousal),
confidence = mean(confidence),
interaction_score = mean(interaction_score)) %>%
filter(between(valence, input$filter_valence[1], input$filter_valence[2]) &
between(arousal, input$filter_arousal[1], input$filter_arousal[2]) &
between(confidence, input$confidence[1], input$filter_confidence[2]) &
between(interaction_score, input$filter_interaction[1], input$filter_interaction[2]))%>%
filter(if(length(input$behaviour>0)) group %in% input$behaviour else TRUE)
})



#plot for density
output$densPlot <- renderPlotly({
DF.re() %>%
DF.de() %>%
ggplot(aes(x=valence,
y=arousal,
#by=animation_name,
Expand All @@ -159,9 +176,10 @@ server <- function(input, output) {
strip.background = element_rect(fill="white")) +
theme(legend.position="none")
})

#plot for scatter
output$scatterPlot <- renderPlotly({
DF.re() %>%
DF.sc() %>%
ggplot(aes(x=valence,
y=arousal,
by = group,
Expand All @@ -175,13 +193,15 @@ server <- function(input, output) {
theme_linedraw() +
coord_fixed(1/1) +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank()) +
theme(legend.position="none") +
geom_hline(yintercept=0,color = "grey", size=1, alpha = 0.5) +
geom_vline(xintercept = 0,color = "grey", size=1, alpha = 0.5)
})

#table
#Creating table -------
output$tableDF <- DT::renderDataTable({
DF.re()
DF.sc()
})
}

Expand Down
6 changes: 4 additions & 2 deletions tab_intro.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ tab_intro <- tabItem(
span(" | "),
tags$a(href="https://github.com/cozmo4hri/interactive-tool", "Code for this app"),
span(" | "),
tags$a(href="https://github.com/cozmo4hri/interactive-tool", "Download data"),
tags$a(href="https://github.com/cozmo4hri/interactive-tool/blob/master/fullset_shiny.csv", "Download data"),
tags$br(),
tags$br(),
p("To be added: explanation of the three taps")
img(src='cozmo.png'),
p("To be added: explanation of the three taps. More on shiny")
)

5 changes: 5 additions & 0 deletions tab_scatter.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ tab_scatter <- tabItem(
title = "Animation group",
#width = NULL,
plotlyOutput(outputId = "scatterPlot", height = "auto")
),
box(
title = "Animation group",
tags$video(id="video2", type = "video/mp4",src = "1.mp4", width = "320px", height = "180px", controls = "controls")
)
)
)

#1280 × 720
Binary file added www/.DS_Store
Binary file not shown.
Binary file added www/1.mp4
Binary file not shown.
Binary file added www/10.mp4
Binary file not shown.
Binary file added www/100.mp4
Binary file not shown.
Binary file added www/101.mp4
Binary file not shown.
Binary file added www/102.mp4
Binary file not shown.
Binary file added www/103.mp4
Binary file not shown.
Binary file added www/104.mp4
Binary file not shown.
Binary file added www/105.mp4
Binary file not shown.
Binary file added www/106.mp4
Binary file not shown.
Binary file added www/107.mp4
Binary file not shown.
Binary file added www/108.mp4
Binary file not shown.
Binary file added www/109.mp4
Binary file not shown.
Binary file added www/11.mp4
Binary file not shown.
Binary file added www/110.mp4
Binary file not shown.
Binary file added www/111.mp4
Binary file not shown.
Binary file added www/112.mp4
Binary file not shown.
Binary file added www/113.mp4
Binary file not shown.
Binary file added www/114.mp4
Binary file not shown.
Binary file added www/115.mp4
Binary file not shown.
Binary file added www/116.mp4
Binary file not shown.
Binary file added www/117.mp4
Binary file not shown.
Binary file added www/118.mp4
Binary file not shown.
Binary file added www/119.mp4
Binary file not shown.
Binary file added www/12.mp4
Binary file not shown.
Binary file added www/120.mp4
Binary file not shown.
Binary file added www/121.mp4
Binary file not shown.
Binary file added www/122.mp4
Binary file not shown.
Binary file added www/123.mp4
Binary file not shown.
Binary file added www/124.mp4
Binary file not shown.
Binary file added www/125.mp4
Binary file not shown.
Binary file added www/126.mp4
Binary file not shown.
Binary file added www/127.mp4
Binary file not shown.
Binary file added www/128.mp4
Binary file not shown.
Binary file added www/129.mp4
Binary file not shown.
Binary file added www/13.mp4
Binary file not shown.
Binary file added www/130.mp4
Binary file not shown.
Binary file added www/131.mp4
Binary file not shown.
Binary file added www/132.mp4
Binary file not shown.
Binary file added www/133.mp4
Binary file not shown.
Binary file added www/134.mp4
Binary file not shown.
Binary file added www/135.mp4
Binary file not shown.
Binary file added www/136.mp4
Binary file not shown.
Binary file added www/137.mp4
Binary file not shown.
Binary file added www/138.mp4
Binary file not shown.
Binary file added www/139.mp4
Binary file not shown.
Binary file added www/14.mp4
Binary file not shown.
Binary file added www/140.mp4
Binary file not shown.
Binary file added www/141.mp4
Binary file not shown.
Binary file added www/142.mp4
Binary file not shown.
Binary file added www/143.mp4
Binary file not shown.
Binary file added www/144.mp4
Binary file not shown.
Binary file added www/145.mp4
Binary file not shown.
Binary file added www/146.mp4
Binary file not shown.
Binary file added www/147.mp4
Binary file not shown.
Binary file added www/148.mp4
Binary file not shown.
Binary file added www/149.mp4
Binary file not shown.
Binary file added www/15.mp4
Binary file not shown.
Binary file added www/150.mp4
Binary file not shown.
Binary file added www/151.mp4
Binary file not shown.
Binary file added www/152.mp4
Binary file not shown.
Binary file added www/153.mp4
Binary file not shown.
Binary file added www/154.mp4
Binary file not shown.
Binary file added www/155.mp4
Binary file not shown.
Binary file added www/156.mp4
Binary file not shown.
Binary file added www/157.mp4
Binary file not shown.
Binary file added www/158.mp4
Binary file not shown.
Binary file added www/159.mp4
Binary file not shown.
Binary file added www/16.mp4
Binary file not shown.
Binary file added www/160.mp4
Binary file not shown.
Binary file added www/161.mp4
Binary file not shown.
Binary file added www/162.mp4
Binary file not shown.
Binary file added www/163.mp4
Binary file not shown.
Binary file added www/164.mp4
Binary file not shown.
Binary file added www/165.mp4
Binary file not shown.
Binary file added www/166.mp4
Binary file not shown.
Binary file added www/167.mp4
Binary file not shown.
Binary file added www/168.mp4
Binary file not shown.
Binary file added www/169.mp4
Binary file not shown.
Binary file added www/17.mp4
Binary file not shown.
Binary file added www/170.mp4
Binary file not shown.
Binary file added www/171.mp4
Binary file not shown.
Binary file added www/172.mp4
Binary file not shown.
Binary file added www/173.mp4
Binary file not shown.
Binary file added www/174.mp4
Binary file not shown.
Binary file added www/175.mp4
Binary file not shown.
Binary file added www/176.mp4
Binary file not shown.
Binary file added www/177.mp4
Binary file not shown.
Binary file added www/178.mp4
Binary file not shown.
Binary file added www/179.mp4
Binary file not shown.
Binary file added www/18.mp4
Binary file not shown.
Binary file added www/180.mp4
Binary file not shown.
Binary file added www/181.mp4
Binary file not shown.
Binary file added www/182.mp4
Binary file not shown.
Binary file added www/183.mp4
Binary file not shown.
Binary file added www/184.mp4
Binary file not shown.
Binary file added www/185.mp4
Binary file not shown.
Binary file added www/186.mp4
Binary file not shown.
Binary file added www/187.mp4
Binary file not shown.
Binary file added www/188.mp4
Binary file not shown.
Binary file added www/189.mp4
Binary file not shown.
Binary file added www/19.mp4
Binary file not shown.
Binary file added www/190.mp4
Binary file not shown.
Binary file added www/191.mp4
Binary file not shown.
Binary file added www/192.mp4
Binary file not shown.
Binary file added www/193.mp4
Binary file not shown.
Binary file added www/194.mp4
Binary file not shown.
Binary file added www/195.mp4
Binary file not shown.
Binary file added www/196.mp4
Binary file not shown.
Binary file added www/197.mp4
Binary file not shown.
Binary file added www/198.mp4
Binary file not shown.
Binary file added www/199.mp4
Binary file not shown.
Binary file added www/2.mp4
Binary file not shown.
Binary file added www/20.mp4
Binary file not shown.
Binary file added www/200.mp4
Binary file not shown.
Binary file added www/201.mp4
Binary file not shown.
Binary file added www/202.mp4
Binary file not shown.
Binary file added www/203.mp4
Binary file not shown.
Binary file added www/204.mp4
Binary file not shown.
Binary file added www/205.mp4
Binary file not shown.
Binary file added www/206.mp4
Binary file not shown.
Binary file added www/207.mp4
Binary file not shown.
Binary file added www/208.mp4
Binary file not shown.
Binary file added www/209.mp4
Binary file not shown.
Binary file added www/21.mp4
Binary file not shown.
Binary file added www/210.mp4
Binary file not shown.
Binary file added www/211.mp4
Binary file not shown.
Binary file added www/212.mp4
Binary file not shown.
Binary file added www/213.mp4
Binary file not shown.
Binary file added www/214.mp4
Binary file not shown.
Binary file added www/215.mp4
Binary file not shown.
Binary file added www/216.mp4
Binary file not shown.
Binary file added www/217.mp4
Binary file not shown.
Binary file added www/218.mp4
Binary file not shown.
Binary file added www/219.mp4
Binary file not shown.
Binary file added www/22.mp4
Binary file not shown.
Binary file added www/220.mp4
Binary file not shown.
Binary file added www/221.mp4
Binary file not shown.
Binary file added www/222.mp4
Binary file not shown.
Binary file added www/223.mp4
Binary file not shown.
Binary file added www/224.mp4
Binary file not shown.
Binary file added www/225.mp4
Binary file not shown.
Binary file added www/226.mp4
Binary file not shown.
Binary file added www/227.mp4
Binary file not shown.
Binary file added www/228.mp4
Binary file not shown.
Binary file added www/229.mp4
Binary file not shown.
Binary file added www/23.mp4
Binary file not shown.
Binary file added www/230.mp4
Binary file not shown.
Binary file added www/231.mp4
Binary file not shown.
Binary file added www/232.mp4
Binary file not shown.
Binary file added www/233.mp4
Binary file not shown.
Binary file added www/234.mp4
Binary file not shown.
Binary file added www/235.mp4
Binary file not shown.
Binary file added www/236.mp4
Binary file not shown.
Binary file added www/237.mp4
Binary file not shown.
Binary file added www/238.mp4
Binary file not shown.
Binary file added www/239.mp4
Binary file not shown.
Binary file added www/24.mp4
Binary file not shown.
Binary file added www/240.mp4
Binary file not shown.
Binary file added www/241.mp4
Binary file not shown.
Binary file added www/242.mp4
Binary file not shown.
Binary file added www/243.mp4
Binary file not shown.
Binary file added www/244.mp4
Binary file not shown.
Binary file added www/245.mp4
Binary file not shown.
Binary file added www/246.mp4
Binary file not shown.
Binary file added www/247.mp4
Binary file not shown.
Binary file added www/248.mp4
Binary file not shown.
Binary file added www/249.mp4
Binary file not shown.
Binary file added www/25.mp4
Binary file not shown.
Binary file added www/250.mp4
Binary file not shown.
Binary file added www/251.mp4
Binary file not shown.
Binary file added www/252.mp4
Binary file not shown.
Binary file added www/253.mp4
Binary file not shown.
Binary file added www/254.mp4
Binary file not shown.
Binary file added www/255.mp4
Binary file not shown.
Binary file added www/256.mp4
Binary file not shown.
Binary file added www/257.mp4
Binary file not shown.
Binary file added www/258.mp4
Binary file not shown.
Binary file added www/259.mp4
Binary file not shown.
Binary file added www/26.mp4
Binary file not shown.
Binary file added www/260.mp4
Binary file not shown.
Binary file added www/261.mp4
Binary file not shown.
Binary file added www/262.mp4
Binary file not shown.
Binary file added www/263.mp4
Binary file not shown.
Binary file added www/264.mp4
Binary file not shown.
Binary file added www/265.mp4
Binary file not shown.
Binary file added www/266.mp4
Binary file not shown.
Binary file added www/267.mp4
Binary file not shown.
Binary file added www/268.mp4
Binary file not shown.
Binary file added www/269.mp4
Binary file not shown.
Binary file added www/27.mp4
Binary file not shown.
Binary file added www/270.mp4
Binary file not shown.
Binary file added www/271.mp4
Binary file not shown.
Binary file added www/272.mp4
Binary file not shown.
Binary file added www/273.mp4
Binary file not shown.
Binary file added www/274.mp4
Binary file not shown.
Binary file added www/275.mp4
Binary file not shown.
Binary file added www/276.mp4
Binary file not shown.
Binary file added www/277.mp4
Binary file not shown.
Binary file added www/278.mp4
Binary file not shown.
Binary file added www/279.mp4
Binary file not shown.
Binary file added www/28.mp4
Binary file not shown.
Binary file added www/280.mp4
Binary file not shown.
Binary file added www/281.mp4
Binary file not shown.
Binary file added www/282.mp4
Binary file not shown.
Binary file added www/283.mp4
Binary file not shown.
Binary file added www/284.mp4
Binary file not shown.
Binary file added www/285.mp4
Binary file not shown.
Binary file added www/286.mp4
Binary file not shown.
Binary file added www/287.mp4
Binary file not shown.
Binary file added www/288.mp4
Binary file not shown.
Binary file added www/289.mp4
Binary file not shown.
Binary file added www/29.mp4
Binary file not shown.
Binary file added www/290.mp4
Binary file not shown.
Binary file added www/291.mp4
Binary file not shown.
Binary file added www/292.mp4
Binary file not shown.
Binary file added www/293.mp4
Binary file not shown.
Binary file added www/294.mp4
Binary file not shown.
Binary file added www/295.mp4
Binary file not shown.
Binary file added www/296.mp4
Binary file not shown.
Binary file added www/297.mp4
Binary file not shown.
Binary file added www/298.mp4
Binary file not shown.
Binary file added www/299.mp4
Binary file not shown.
Binary file added www/3.mp4
Binary file not shown.
Binary file added www/30.mp4
Binary file not shown.
Binary file added www/300.mp4
Binary file not shown.
Binary file added www/301.mp4
Binary file not shown.
Binary file added www/302.mp4
Binary file not shown.
Binary file added www/303.mp4
Binary file not shown.
Binary file added www/304.mp4
Binary file not shown.
Binary file added www/305.mp4
Binary file not shown.
Binary file added www/306.mp4
Binary file not shown.
Binary file added www/307.mp4
Binary file not shown.
Binary file added www/308.mp4
Binary file not shown.
Binary file added www/309.mp4
Binary file not shown.
Binary file added www/31.mp4
Binary file not shown.
Binary file added www/310.mp4
Binary file not shown.
Binary file added www/311.mp4
Binary file not shown.
Binary file added www/312.mp4
Binary file not shown.
Binary file added www/313.mp4
Binary file not shown.
Binary file added www/314.mp4
Binary file not shown.
Binary file added www/315.mp4
Binary file not shown.
Binary file added www/316.mp4
Binary file not shown.
Binary file added www/317.mp4
Binary file not shown.
Binary file added www/318.mp4
Binary file not shown.
Binary file added www/319.mp4
Binary file not shown.
Binary file added www/32.mp4
Binary file not shown.
Binary file added www/320.mp4
Binary file not shown.
Binary file added www/321.mp4
Binary file not shown.
Binary file added www/322.mp4
Binary file not shown.
Binary file added www/323.mp4
Binary file not shown.
Binary file added www/324.mp4
Binary file not shown.
Binary file added www/325.mp4
Binary file not shown.
Binary file added www/326.mp4
Binary file not shown.
Binary file added www/327.mp4
Binary file not shown.
Binary file added www/328.mp4
Binary file not shown.
Binary file added www/329.mp4
Binary file not shown.
Binary file added www/33.mp4
Binary file not shown.
Binary file added www/330.mp4
Binary file not shown.
Binary file added www/331.mp4
Binary file not shown.
Binary file added www/332.mp4
Binary file not shown.
Binary file added www/333.mp4
Binary file not shown.
Binary file added www/334.mp4
Binary file not shown.
Binary file added www/335.mp4
Binary file not shown.
Binary file added www/336.mp4
Binary file not shown.
Binary file added www/337.mp4
Binary file not shown.
Binary file added www/338.mp4
Binary file not shown.
Binary file added www/339.mp4
Binary file not shown.
Binary file added www/34.mp4
Binary file not shown.
Binary file added www/340.mp4
Binary file not shown.
Binary file added www/341.mp4
Binary file not shown.
Binary file added www/342.mp4
Binary file not shown.
Binary file added www/343.mp4
Binary file not shown.
Binary file added www/344.mp4
Binary file not shown.
Binary file added www/345.mp4
Binary file not shown.
Binary file added www/346.mp4
Binary file not shown.
Binary file added www/347.mp4
Binary file not shown.
Binary file added www/348.mp4
Binary file not shown.
Binary file added www/35.mp4
Binary file not shown.
Binary file added www/36.mp4
Binary file not shown.
Binary file added www/37.mp4
Binary file not shown.
Binary file added www/38.mp4
Binary file not shown.
Binary file added www/39.mp4
Binary file not shown.
Binary file added www/4.mp4
Binary file not shown.
Binary file added www/40.mp4
Binary file not shown.
Binary file added www/41.mp4
Binary file not shown.
Binary file added www/42.mp4
Binary file not shown.
Binary file added www/43.mp4
Binary file not shown.
Binary file added www/44.mp4
Binary file not shown.
Binary file added www/45.mp4
Binary file not shown.
Binary file added www/46.mp4
Binary file not shown.
Binary file added www/47.mp4
Binary file not shown.
Binary file added www/48.mp4
Binary file not shown.
Binary file added www/49.mp4
Binary file not shown.
Binary file added www/5.mp4
Binary file not shown.
Binary file added www/50.mp4
Binary file not shown.
Loading

0 comments on commit 349c4e1

Please sign in to comment.