Commit 062ef1dc authored by Stephanie Wegscheidl's avatar Stephanie Wegscheidl

little changes in naming

parent 0ef40149
Pipeline #443 failed with stages
...@@ -6,6 +6,7 @@ library(webshot) ...@@ -6,6 +6,7 @@ library(webshot)
library(knitr) library(knitr)
library(leaflet) library(leaflet)
library(mapview) library(mapview)
library(ggplot2)
server <- function(input, output, session) { server <- function(input, output, session) {
...@@ -167,10 +168,10 @@ server <- function(input, output, session) { ...@@ -167,10 +168,10 @@ server <- function(input, output, session) {
} }
}) })
#Continue to control page #Continue to view page
observeEvent(input$controlSide, { observeEvent(input$viewSite, {
updateTabItems(session, "tabs",selected = "controls") updateTabItems(session, "tabs",selected = "views")
}) })
...@@ -179,7 +180,7 @@ server <- function(input, output, session) { ...@@ -179,7 +180,7 @@ server <- function(input, output, session) {
#Title Input #Title Input
output$text <- renderText({ input$title }) output$text <- renderText({ input$title })
#Histogram #barchart
output$input_hist_x <- renderUI({ output$input_hist_x <- renderUI({
if (is.null(input$nut)) if (is.null(input$nut))
...@@ -228,7 +229,7 @@ server <- function(input, output, session) { ...@@ -228,7 +229,7 @@ server <- function(input, output, session) {
#}) #})
#Linegraph #linechart
output$input_line_x <- renderUI({ output$input_line_x <- renderUI({
if (is.null(input$nut)) if (is.null(input$nut))
...@@ -252,14 +253,40 @@ server <- function(input, output, session) { ...@@ -252,14 +253,40 @@ server <- function(input, output, session) {
#DASHBOARD PAGE #DASHBOARD PAGE
#HISTOGRAM #barchart
output$hist_box <- renderUI({ output$hist_box <- renderUI({
if(input$check_hist) if(input$check_hist)
box( title="Histogram", box( title="Barchart",
status= "warning", status= "warning",
solidHeader = TRUE, solidHeader = TRUE,
collapsible = TRUE, collapsible = TRUE,
plotOutput("plot1", height = 250)) plotOutput("hist", height = 250))
})
#HIS VIEW
output$hist <- renderPlot({
print("hist wird aufgerufen")
a=1
for(a in 1:length(coconut.df$bluetooth.numOfBTDevices)){
#g <-geom_bar(mapping = NULL, data = , stat = "count",
# position = "stack", width = NULL, binwidth = NULL, na.rm = FALSE,
# show.legend = NA, inherit.aes = TRUE)
g <- ggplot(coconut.df, aes("timestamp","bluetooth"))
#g + geom_bar()
a=a+1}
g
#hist(bluetooth)
}) })
...@@ -283,50 +310,31 @@ server <- function(input, output, session) { ...@@ -283,50 +310,31 @@ server <- function(input, output, session) {
leafletOutput("map", height = 250)) leafletOutput("map", height = 250))
}) })
# actual plot # MAP VIEW
output$map <- renderLeaflet({ output$map <- renderLeaflet({
print("wird aufgerufen") print("map wird aufgerufen")
m <<- leaflet() m <<- leaflet()
x=1 x=1
m <- addTiles(m) m <- addTiles(m)
for(x in 1:length(coconut.df$gps.latitude)){ for(x in 1:length(coconut.df$gps.latitude)){
m <- addMarkers(m,lng=as.numeric(longitude[x]), lat=as.numeric(latitude[x])) #addPolylines does not work m <- addCircleMarkers(m,lng=as.numeric(longitude[x]), lat=as.numeric(latitude[x]), radius = 1, color ="red") #addPolylines does not work
x=x+1} x=x+1}
m m
}) })
#LINEGRAPH #linechart
output$line_box <- renderUI({ output$line_box <- renderUI({
if(input$check_line) if(input$check_line)
box( title="Linegraph", box( title="Linechart",
status= "warning", status= "warning",
solidHeader = TRUE, solidHeader = TRUE,
collapsible = TRUE, collapsible = TRUE,
plotOutput("plot1", height = 250)) plotOutput("plot1", height = 250))
}) })
# MAP
#function connectTheDots(data){
# c = []
# for(i in data._layers) {
# x = data._layers[i]._latlng.lat;
# y = data._layers[i]._latlng.lng;
# c.push([x, y]);
#}
#return c
#}
#pathCoords = connectTheDots(window.geojson);
#pathLine = L.polyline(pathCoords).addTo(m)
#DownloadButton #DownloadButton
#TODO: MAKE IT WORK! #TODO: MAKE IT WORK!
observeEvent(input$screenshot,{ observeEvent(input$screenshot,{
...@@ -347,7 +355,7 @@ server <- function(input, output, session) { ...@@ -347,7 +355,7 @@ server <- function(input, output, session) {
#print(appdir) #print(appdir)
#appshot(appdir, "01_hello.png") #appshot(appdir, "01_hello.png")
leaflet.print(m) #leaflet.print(m)
......
...@@ -14,7 +14,7 @@ ui <- dashboardPage( ...@@ -14,7 +14,7 @@ ui <- dashboardPage(
id="tabs", id="tabs",
menuItem("Upload", tabName = "upload", icon =icon("upload")), menuItem("Upload", tabName = "upload", icon =icon("upload")),
menuItem("Data", tabName = "data", icon =icon("list")), menuItem("Data", tabName = "data", icon =icon("list")),
menuItem("Contols", tabName = "controls", icon = icon("cog")), menuItem("Views", tabName = "views", icon = icon("cog")),
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")), menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Help", tabName = "help", icon = icon("book")) menuItem("Help", tabName = "help", icon = icon("book"))
) )
...@@ -41,8 +41,7 @@ ui <- dashboardPage( ...@@ -41,8 +41,7 @@ ui <- dashboardPage(
"text/json", "text/json",
"text/comma-separated-values,text/plain", "text/comma-separated-values,text/plain",
".json")), ".json")),
actionButton("dataSite", "next actionButton("dataSite", "Go to Data")
")
), ),
...@@ -58,19 +57,19 @@ ui <- dashboardPage( ...@@ -58,19 +57,19 @@ ui <- dashboardPage(
h2("CoCoQuest Data here:"), h2("CoCoQuest Data here:"),
h4("Last Loaded CoCoQuest Data: "), h4("Last Loaded CoCoQuest Data: "),
textOutput("lastLoadedQuest"), textOutput("lastLoadedQuest"),
h4("Starttime: "), #h4("Starttime: "),
textOutput("totalStarttime"), #textOutput("totalStarttime"),
dataTableOutput("quest"), dataTableOutput("quest"),
actionButton("controlSide", "next") actionButton("viewSite", "go to Views")
), ),
# Controls tab content # Controls tab content
tabItem(tabName = "controls", tabItem(tabName = "views",
h2("Controls here:"), h2("Views here:"),
textInput("title", "Title", " "), textInput("title", "Title", " "),
#HISTOGRAM #Barchart
checkboxInput("check_hist", "Histogram", FALSE), checkboxInput("check_hist", "Barchart", FALSE),
#uiOutput("check_hist"), #uiOutput("check_hist"),
uiOutput("input_hist_x"), uiOutput("input_hist_x"),
uiOutput("input_hist_y"), uiOutput("input_hist_y"),
...@@ -78,14 +77,14 @@ ui <- dashboardPage( ...@@ -78,14 +77,14 @@ ui <- dashboardPage(
checkboxInput("check_time", "Timeline", FALSE), checkboxInput("check_time", "Timeline", FALSE),
uiOutput("input_time_x"), uiOutput("input_time_x"),
uiOutput("input_time_y"), uiOutput("input_time_y"),
#Linechart
checkboxInput("check_line", "Linechart", FALSE),
uiOutput("input_line_x"),
uiOutput("input_line_y"),
#MAP #MAP
checkboxInput("check_map", "Map", TRUE), checkboxInput("check_map", "Map", TRUE),
uiOutput("input_map"), uiOutput("input_map"),
#uiOutput("input_map_y"), #uiOutput("input_map_y"),
#LINEGRAPH
checkboxInput("check_line", "Linegraph", FALSE),
uiOutput("input_line_x"),
uiOutput("input_line_y"),
actionButton("dashboardSite", "go to dashboard") actionButton("dashboardSite", "go to dashboard")
), ),
...@@ -104,8 +103,8 @@ ui <- dashboardPage( ...@@ -104,8 +103,8 @@ ui <- dashboardPage(
uiOutput("hist_box"), uiOutput("hist_box"),
uiOutput("time_box"), uiOutput("time_box"),
uiOutput("map_box"), uiOutput("line_box"),
uiOutput("line_box") uiOutput("map_box")
), ),
actionButton("screenshot","Download") actionButton("screenshot","Download")
......
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