-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
96 lines (90 loc) · 4.14 KB
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
library(shiny)
library(shinycustomloader)
library(tidyverse)
library(lubridate)
library(vroom)
library(plotly)
library(tippy)
maanden <- as_factor(c("Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli",
"Augustus", "September", "Oktober", "November", "December"))
ui <- navbarPage(
theme = bslib::bs_theme(
bootswatch = "cerulean",
base_font = "Catamaran"
),
windowTitle = "Onze Lucht in Heatmaps",
title = span(a(
img(src='OnzeLucht.png',
style="margin-top: 10px; padding-right:10px;padding-bottom:10px",
width = "50%"),
href="https://onzelucht.nl"),
strong("Onze Lucht"), style="font-size:30px;"),
br(),
wellPanel(
fluidRow(column(4,
textInput("id", "Sensor ID:",
value = "esp8266-16609729")),
column(3, actionButton("update", "Vind sensor",
icon = icon("search"),width = "100%",
style="color: #fff; background-color: #2fa4e7; border-color: #0f364d"),
tippy_this("update", tooltip = "Klik button om te verbinden met sensor"),
style = "margin-top: 31px;"),
column(2, uiOutput("kies_jaar")),
column(3, uiOutput("kies_maand"))
),
fluidRow(column(4,
withLoader(textOutput("available_zips"),
type = "text",
loader = list(marquee("Verbinden...")),
proxy.height = "25px"),
tags$head(tags$style("#available_zips{font-size: 10px;
font-style: italic;
}"))
)
), style= "background: #e6f6ff"
),
br(),
tabsetPanel(
tabPanel("Heatmaps",
icon = icon("chart-bar"),
br(),
wellPanel(fluidRow(column(3, selectInput("meetwaarde", "Meetwaarde:",
choices = list("Fijnstof PM2.5" = "SDS_P2",
"Fijnstof PM10" = "SDS_P1",
"Temperatuur" = "Temp",
"Luchtvochtigheid" = "Humidity"))),
column(3, selectInput("time_min", "Tijdsinterval (minuten):",
choices = c(5, 10, 15, 20, 30, 60),
selected = 10)),
column(2, uiOutput("png"),
tippy_this("png", tooltip = "Sla heatmap op als png"),
style = "margin-top: 31px;"),
column(2, uiOutput("pdf"),
tippy_this("pdf", tooltip = "Sla heatmap op als pdf"),
style = "margin-top: 31px;"),
column(2, uiOutput("csv"),
tippy_this("csv", tooltip = "Sla heatmap data op als csv"),
style = "margin-top: 31px;")),
style= "background: #e6f6ff"),
withLoader(plotlyOutput("heatmap", height = "800px"),
type = "image", loader = "air.gif")
),
tabPanel("Data", icon = icon("table"),
br(),
textOutput("title"),
dataTableOutput("df"),
column(4, downloadButton("csv_raw", "Download maand data",
icon = icon("download"), width = "100%",
style="color: #fff; background-color: #2fa4e7; border-color: #0f364d"),
tippy_this("csv_raw", tooltip = "Download alle data voor de geselecteerde maand"))
)
),
hr(),
div(a(
img(src = "logo_grey.png",
width = 40),
href="https://www.jebentwatjemeet.nl"),
style="text-align: center; padding-bottom:10px;"),
div("\u00A9 JeBentWatJeMeet 2021",
style="text-align:center; font-size:10px;padding-bottom:10px;")
)