Commit e5cc0363 authored by jlopez's avatar jlopez
Browse files

Update shiny

parent 7dc2819a
......@@ -8,17 +8,16 @@ MenuGauche = sidebarMenu(id = "sidebarmenu",
selectInput("uuidMandrill", "Mandrill:", multiple = FALSE, selected = "32-38-31-39-58-36-8e-0c",
UUIDMANDRILL),
checkboxGroupInput("checkGroupParam", label = "Diagramme :",
choices = list("Temperature" = 1, "Acceleration X" = 2, "Acceleration Y" = 3, "Acceleration Z" = 4),
selected = c(1)),
textInput("penaltyCP", "Temperature penalty change point :", "log(n)"),
textInput("penaltyCP", "Temperature penalty change point :", "6/10 * log(n)"),
sliderInput("temperatureCP", "Temperature change point (Celcius) :",
min = 0, max = 3, step = 0.1, value = 1.5),
sliderInput("sizeCP", "Minimum temperature number change point :",
min = 0, max = 20, step = 1, value = 5),
min = 0, max = 3, step = 0.1, value = 0.5),
textInput("penaltyCPM", "Mouvement penalty change point (algo):", "30*log(n)"),
......@@ -28,6 +27,9 @@ MenuGauche = sidebarMenu(id = "sidebarmenu",
sliderInput("sizeCPM", "Minimum mouvement range size change point (minute):",
min = 0, max = 120, step = 1, value = 30),
br(),
actionButton("runButton", "Run"),
tags$br(), tags$br(), tags$br(),
......
......@@ -4,7 +4,7 @@ library(shinyjs)
library(DT)
library(dplyr)
library(devtools)
library(shinyFiles)
library(shinyFiles)
library(dplyr)
library(broman)
library(randomcoloR)
......
......@@ -4,11 +4,43 @@ tabHome = fluidPage(align="left",
includeHTML("./www/spinner.html"),
sliderInput("slider_datetime", "Date & Time:", width = "100%",
min=as.POSIXlt("2018-01-01 00:00:00", "GMT"),
max=as.POSIXlt("2019-06-06 23:59:59", "GMT"),
value=c(as.POSIXlt("2018-11-26 12:00:00", "GMT"), as.POSIXlt("2018-11-27 11:59:59", "GMT")),
timezone = "GMT"),
#sliderInput("slider_datetime", "Date & Time:", width = "100%",
# min=as.POSIXlt("2018-01-01 00:00:00", "GMT"),
# max=as.POSIXlt("2019-06-06 23:59:59", "GMT"),
# value=c(as.POSIXlt("2018-11-26 12:00:00", "GMT"), as.POSIXlt("2018-11-27 11:59:59", "GMT")),
# timezone = "GMT"),
fluidRow(
column(2,
dateInput("slider_datetime", "Date:", value = "2012-02-29", width = "100%")),
column(10,
sliderInput("jourMandrill", "Jour:", width = "100%",
min = as.POSIXct("2000-01-01 00:00", tz = "GMT+0100"),
max = as.POSIXct("2000-01-01 23:59", tz = "GMT+0100"),
value = c(as.POSIXct("2000-01-01 06:00", tz = "GMT+0100"),as.POSIXct("2000-01-01 18:00", tz = "GMT+0100")),
timezone = "GMT+0100",
timeFormat="%H:%M",
step = 60))
),
tags$head(tags$style("#selected_start{
font-size: 20px;
font-weight: bold;
}"
)),
tags$head(tags$style("#selected_end{
font-size: 20px;
font-weight: bold;
}"
)),
textOutput("selected_start"),
textOutput("selected_end"),
br(),
......@@ -17,9 +49,17 @@ tabHome = fluidPage(align="left",
plotOutput("changePointTemperature", height = "600px"),
plotOutput("JimmyChangePointTemperature", height = "600px"),
DT::dataTableOutput("dataTemperatureTable"),
downloadButton('downloadTemperature', 'Export temperature', class = "btn-primary"),
plotOutput("changePointMouvement", height = "600px"),
plotOutput("JimmyChangePointMouvement", height = "600px"),
DT::dataTableOutput("dataMouvementTable"),
downloadButton('downloadMouvement', 'Export mouvement', class = "btn-primary"),
plotOutput("accX", height = "800px"),
plotOutput("accY", height = "800px"),
......
This diff is collapsed.
extractExtTemperature <- function(file, timeS, timeE) {
extTemperature <- read.xlsx(file)
extTemperature <- read.csv(file, sep = ";", dec = ".")
if(timeS == "") {
dateS <- as.POSIXct("1111-01-01", tz = "GMT+0100")
......@@ -14,12 +14,11 @@ extractExtTemperature <- function(file, timeS, timeE) {
dateE <- as.POSIXct(timeE, tz = "GMT+0100")
}
extTemperature$dd = extTemperature$Date + extTemperature$Time
extTemperature$real <- as.POSIXct(as.Date(extTemperature$dd, origin="1899-12-30"), tz = "GMT+0100")
extTemperature$real <- as.POSIXct(as.character(extTemperature$real), tz = "GMT+0100")
resultTemperature <- data.frame(date = extTemperature$real, temperature = extTemperature$Out)
resultTemperature <- resultTemperature %>% filter(date >= dateS) %>% filter(date <= dateE)
extTemperature$ext <- as.numeric(as.character(extTemperature$ext))
extTemperature$real <- as.POSIXct(extTemperature$date, tz = "GMT+0100")
resultTemperature <- data.frame(date = extTemperature$real, temperature = extTemperature$ext)
resultTemperature <- resultTemperature %>% filter(date >= dateS) %>% filter(date <= dateE) %>% na.omit()
return (resultTemperature)
}
......
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