-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
72 lines (52 loc) · 2.28 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
library(shiny)
library(plotly)
library(tidyr)
#load("p_cj_cl.Rdata")
load("finaldat.Rdata")
finaldat$CodPart <- as.factor(finaldat$CodPart)
# Define UI for dataset viewer application
shinyUI(pageWithSidebar(
# Application title
headerPanel("Vizualizare date alegeri locale 2016"),
# Sidebar with controls to select a dataset and specify the number
# of observations to view
sidebarPanel(
selectInput("ox_poz", "OX: alege o pozitie:",
choices = levels(finaldat$Alegeri),
selected = "consilieri_locali"),
selectInput("ox_part", "OX: alege un partid:",
choices = levels(finaldat$CodPart),
selected = "psd"),
selectInput("oy_poz", "OY: alege o pozitie:",
choices = levels(finaldat$Alegeri),
selected = "primari"),
selectInput("oy_part", "OY: alege un partid:",
choices = levels(finaldat$CodPart),
selected = "psd"),
# selectInput("oy", "alege o variabila (OY):",
# choices = c("pnl_p", "pnl_cj", "pnl_cl",
# "psd_p", "psd_cj", "psd_cl",
# "nule_p", "nule_cj", "nule_cl")),
# selectInput("judet", "alege un judet (sau nu):",
# choices = c("none", levels(p_cj_cl$NumeJudet))),
checkboxInput(inputId = "smoother",
label = strong("linie smoother"),
value = TRUE),
checkboxInput(inputId = "straightline",
label = strong("linie de egalitate"),
value = FALSE),
# checkboxInput(inputId = "medii",
# label = strong("linii de medie"),
# value = FALSE),
sliderInput("nrOrase", "Numar de orase:", min = 3, max = 200, value = 50),
selectInput("sort_how", label = "ordonate dupa... ",
choices = c("populatie", "proc_voturi_ox", "proc_voturi_oy")),
checkboxGroupInput("judet", label = "selecteaza judete (sau nu):", choices = levels(finaldat$NumeJudet),
selected = NULL, inline = FALSE, width = NULL)
),
# Show a summary of the dataset and an HTML table with the requested
# number of observations
mainPanel(
plotlyOutput("sctplt")
)
))