-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
66 lines (47 loc) · 2.25 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
# ------------------------------------------------------------------------------
# This is the user-interface definition of the Shiny web application
# ------------------------------------------------------------------------------
# -- Define Sidebar UI
sidebar <- dashboardSidebar(
sidebarMenu(
menuItem("Résultats", tabName = "resultats", icon = icon("map"), selected = TRUE)),
collapsed = TRUE)
# -- Define Body UI
body <- dashboardBody(
tags$head(includeHTML(("./src/google/google-analytics.html"))),
tabItems(
# -- Presidentielles
tabItem(tabName = "resultats",
fluidRow(
column(width = 2,
# -- data
tabsetPanel(
tabPanel("Présidentielles",
select_dataset_UI("presidentielles")),
tabPanel("Législatives",
select_dataset_UI("legislatives")),
tabPanel("Européennes",
select_dataset_UI("europeennes"))),
warning_dataset_UI("polygon"),
# -- polygons
geojson_UI("polygon"),
warning_geojson_UI("polygon")),
column(width = 8,
map_UI("map"),br(),
p("© 2024 Philippe PERET | Version 2.1.1 | ",
a("LinkedIn", href="https://www.linkedin.com/in/philippeperet/"), "|",
a("GitHub", href="https://github.com/thekangaroofactory"), "|",
a("Data Source", href="https://www.data.gouv.fr/fr/pages/donnees-des-elections/"))),
column(width = 2,
filters_UI("polygon"),
hide_show_UI("polygon"),
map_search_Input("map"),
warning_perfo_UI("polygon"))))
)
)
# -- Put them together into a dashboard
dashboardPage(
dashboardHeader(title = "France Elections"),
sidebar,
body
)