MAIN TAB
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~ MAIN TAB ----
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Date and download
# ~~~~ date_and_download --------------------
date_and_download <-
fluidRow(box(width = 4,
title = tagList(icon("hand-pointer"),
"Date of review"),
closable = FALSE,
collapsible = TRUE,
fluidRow(column(width = 12,
uiOutput("select_date_of_review", style = "height: 4.7em;"))
)
),
box(width = 8,
title = tagList(icon("file-download"),
"Download report"),
closable = FALSE,
collapsible = TRUE,
fluidRow(column(width = 5,
uiOutput("select_report_format", style = "height: 4.7em;")
),
column(width = 7,
uiOutput("download_report_button"))
)
)
)
Additional filters
# ~~~~ additional_filters --------------------
additional_filters <-
fluidRow(box(width = 12,
title = tagList(icon("filter"),
"Additional filters"),
closable = FALSE,
collapsible = TRUE,
collapsed = TRUE,
fluidRow(style = "height: 30vh; overflow-y:auto",
column(width = 4,
HTML("<br>"),
materialSwitch("filter_or_not",
label = "Load additional filters?",
value = FALSE,
status = "info"),
htmlOutput("additional_filters_text")
),
column(width = 8,
uiOutput("filters")
)
)
)
)
Value boxes
# ~~~~ value_boxes --------------------
value_boxes <-
fluidRow(valueBoxOutput("new_contacts_per_day_value_box", width = 3),
valueBoxOutput("cumulative_contacts_value_box", width = 3),
valueBoxOutput("contacts_under_surveillance_value_box", width = 3),
valueBoxOutput("pct_contacts_followed_value_box", width = 3)
)
new_contacts_today
# ~~~~ new_contacts_today ----
new_contacts_today <-
tagList(
h1(" "),
fluidRow(
column(width = 1,
icon("calendar-day", "fa-2x",
style = "align: right ; padding: 0px 0px 15px 20px")), # nudge right
column(width = 11,
htmlOutput("new_contacts_today_row_title"))),
# h3("Total contacts per admin level 1",
# style = "display: inline; line-height: 50px;"),
fluidRow(column(width = 12,
column(width = 9,
tabsetPanel(tabPanel(title = "Bar plot",
highchartOutput("new_contacts_today_bar_chart" ) %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Sunburst plot",
highchartOutput("new_contacts_today_sunburst_plot",
height = "350px") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Table",
reactableOutput("new_contacts_today_table") %>%
withSpinner(type = 6, color = burnt_sienna))
)
),
column(width = 3,
tabsetPanel(tabPanel(title = tagList(icon("info-circle"),
"Description"),
style = "overflow-y:auto",
htmlOutput("new_contacts_today_text") %>%
withSpinner(type = 1, color = burnt_sienna))
)
)
)
),
hr()
)
new_contacts_historical
# ~~~~ new_contacts_historical ----
new_contacts_historical <-
tagList(
h1(" "),
fluidRow(
column(width = 1,
icon("calendar-day", "fa-2x",
style = "align: right ; padding: 0px 0px 15px 20px")), # nudge right
column(width = 11,
htmlOutput("new_contacts_historical_row_title"))),
fluidRow(column(width = 12,
column(width = 9,
tabsetPanel(tabPanel(title = "Absolute numbers",
highchartOutput("new_contacts_historical_bar_chart") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Relative proportions",
highchartOutput("new_contacts_historical_bar_chart_relative") %>%
withSpinner(type = 6, color = burnt_sienna))
)
),
column(width = 3,
tabsetPanel(tabPanel(title = tagList(icon("info-circle"),
"Description"),
style = "overflow-y:auto",
htmlOutput("new_contacts_historical_text") %>%
withSpinner(type = 1, color = burnt_sienna))
)
)
)
),
hr()
)
cumul_contacts_today
# ~~~~ cumul_contacts_today ----
cumul_contacts_today <-
tagList(
h1(" "),
fluidRow(
column(width = 1,
icon("globe", "fa-2x",
style = "align: right ; padding: 0px 0px 15px 20px")), # nudge right
column(width = 11,
htmlOutput("cumul_contacts_today_row_title"))),
# h3("Total contacts per admin level 1",
# style = "display: inline; line-height: 50px;"),
fluidRow(column(width = 12,
column(width = 9,
tabsetPanel(tabPanel(title = "Bar plot",
highchartOutput("cumul_contacts_today_bar_chart" ) %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Sunburst plot",
highchartOutput("cumul_contacts_today_sunburst_plot",
height = "350px") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Table",
reactableOutput("cumul_contacts_today_table") %>%
withSpinner(type = 6, color = burnt_sienna))
)
),
column(width = 3,
tabsetPanel(tabPanel(title = tagList(icon("info-circle"),
"Description"),
style = "overflow-y:auto",
htmlOutput("cumul_contacts_today_text") %>%
withSpinner(type = 1, color = burnt_sienna))
)
)
)
),
hr()
)
cumul_contacts_historical
# ~~~~ cumul_contacts_historical ----
cumul_contacts_historical <-
tagList(
h1(" "),
fluidRow(
column(width = 1,
icon("globe", "fa-2x",
style = "align: right ; padding: 0px 0px 15px 20px")), # nudge right
column(width = 11,
htmlOutput("cumul_contacts_historical_row_title"))),
fluidRow(column(width = 12,
column(width = 9,
tabsetPanel(tabPanel(title = "Absolute numbers",
highchartOutput("cumul_contacts_historical_bar_chart") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Relative proportions",
highchartOutput("cumul_contacts_historical_bar_chart_relative") %>%
withSpinner(type = 6, color = burnt_sienna))
)
),
column(width = 3,
tabsetPanel(tabPanel(title = tagList(icon("info-circle"),
"Description"),
style = "overflow-y:auto",
htmlOutput("cumul_contacts_historical_text") %>%
withSpinner(type = 1, color = burnt_sienna))
)
)
)
),
hr()
)
active_contacts_today
# ~~~~ active_contacts_today ----
active_contacts_today <-
tagList(
h1(" "),
fluidRow(
column(width = 1,
icon("calendar-week", "fa-2x",
style = "align: right ; padding: 0px 0px 15px 20px")), # nudge right
column(width = 11,
htmlOutput("active_contacts_today_row_title"))),
# h3("Total contacts per admin level 1",
# style = "display: inline; line-height: 50px;"),
fluidRow(column(width = 12,
column(width = 9,
tabsetPanel(tabPanel(title = "Bar plot",
highchartOutput("active_contacts_today_bar_chart" ) %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Sunburst plot",
highchartOutput("active_contacts_today_sunburst_plot",
height = "350px") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Table",
reactableOutput("active_contacts_today_table") %>%
withSpinner(type = 6, color = burnt_sienna))
)
),
column(width = 3,
tabsetPanel(tabPanel(title = tagList(icon("info-circle"),
"Description"),
style = "overflow-y:auto",
htmlOutput("active_contacts_today_text") %>%
withSpinner(type = 1, color = burnt_sienna))
)
)
)
),
hr()
)
active_contacts_historical
# ~~~~ active_contacts_historical ----
active_contacts_historical <-
tagList(
h1(" "),
fluidRow(
column(width = 1,
icon("calendar-week", "fa-2x",
style = "align: right ; padding: 0px 0px 15px 20px")), # nudge right
column(width = 11,
htmlOutput("active_contacts_historical_row_title"))),
fluidRow(column(width = 12,
column(width = 9,
tabsetPanel(tabPanel(title = "Absolute numbers",
highchartOutput("active_contacts_historical_bar_chart") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Relative proportions",
highchartOutput("active_contacts_historical_bar_chart_relative") %>%
withSpinner(type = 6, color = burnt_sienna))
)
),
column(width = 3,
tabsetPanel(tabPanel(title = tagList(icon("info-circle"),
"Description"),
style = "overflow-y:auto",
htmlOutput("active_contacts_historical_text") %>%
withSpinner(type = 1, color = burnt_sienna))
)
)
)
),
hr()
)
contacts_per_case
# ~~~~ contacts_per_case ----
contacts_per_case <-
tagList(
h1(" "),
icon("users", "fa-2x"),
h3("Number of contacts per case",
style = "display: inline; line-height: 50px;"),
fluidRow(column(width = 12,
column(width = 9,
tabsetPanel(tabPanel(title = "Bar chart",
highchartOutput("total_contacts_per_case_bar_chart") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Donut plot",
highchartOutput("total_contacts_per_case_donut_plot") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Table",
htmlOutput("total_contacts_per_case_table") %>%
withSpinner(type = 6, color = burnt_sienna))
)
),
column(width = 3,
tabsetPanel(tabPanel(title = tagList(icon("info-circle"),
"Description"),
style = "overflow-y:auto",
htmlOutput("total_contacts_per_case_text") %>%
withSpinner(type = 1, color = burnt_sienna))
)
)
)
),
hr()
)
age_group <-
tagList(
h1(" "),
icon("user-friends", "fa-2x"),
h3("Age groups of contacts",
style = "display: inline; line-height: 50px;"),
fluidRow(column(width = 12,
column(width = 9,
tabsetPanel(tabPanel(title = "Bar chart",
highchartOutput("total_contacts_per_case_bar_chart") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Donut plot",
highchartOutput("total_contacts_per_case_donut_plot") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Table",
htmlOutput("total_contacts_per_case_table") %>%
withSpinner(type = 6, color = burnt_sienna))
)
),
column(width = 3,
tabsetPanel(tabPanel(title = tagList(icon("info-circle"),
"Description"),
style = "overflow-y:auto",
htmlOutput("total_contacts_per_case_text") %>%
withSpinner(type = 1, color = burnt_sienna))
)
)
)
),
hr()
)
Contacts per link type
# ~~~~ contacts_per_link_type ----
contacts_per_link_type <-
tagList(
h1(" "),
icon("link", "fa-2x"),
h3("Case-contact relationships",
style = "display: inline; line-height: 50px;"),
fluidRow(column(width = 12,
column(width = 9,
tabsetPanel(tabPanel(title = "Donut plot",
highchartOutput("total_contacts_per_link_type_donut_plot") %>%
withSpinner(type = 6, color = burnt_sienna)),
tabPanel(title = "Bar chart",
highchartOutput("total_contacts_per_link_type_bar_chart") %>%
withSpinner(type = 6, color = burnt_sienna))
)
),
column(width = 3,
tabsetPanel(tabPanel(title = tagList(icon("info-circle"),
"Description"),
style = "overflow-y:auto",
htmlOutput("total_contacts_per_link_type_text") %>%
withSpinner(type = 1, color = burnt_sienna))
)
)
)
),
hr()
)
Combine rows for main tab
# ~~~~ main_tab_combine_rows----
main_tab <- tabItem("main_tab",
date_and_download,
additional_filters,
value_boxes,
h1("All contacts", align = "center"),
hr(),
new_contacts_today,
new_contacts_historical,
cumul_contacts_today,
cumul_contacts_historical,
active_contacts_today,
active_contacts_historical,
contacts_per_case,
contacts_per_link_type
)