-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.R
88 lines (60 loc) · 2.75 KB
/
app.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
library(shiny)
library(shinythemes)
library(shinycssloaders)
library(glue)
library(DT)
library(plotly)
library(gridExtra)
library(shinyjs)
library(shinydashboard)
library(shinyalert)
library(shinyWidgets)
ui <- fluidPage(
theme = shinytheme("lumen"),
#define fakeClick for buttons
(tags$head(tags$script(HTML('var fakeClick = function(tabName) {
var dropdownList = document.getElementsByTagName("a");
for (var i = 0; i < dropdownList.length; i++) {
var link = dropdownList[i];
if(link.getAttribute("data-value") == tabName) {
link.click();
};
}
};
'))) ),
chooseSliderSkin("Modern", color = "#158cba"),
tags$style(type = 'text/css',
HTML(".container-fluid > .nav > li >
a[data-value='Metodología'] {background-color: #D3D3D3; color:black}
")),
#y agregar esto?
# .container-fluid > .nav > li >
# a[data-value='Mercado de Trabajo'] {background-color: #e2616e; color:black}
# .container-fluid > .nav > li >
# a[data-value='Ingresos'] {background-color: #687aad; color:black}
# .container-fluid > .nav > li >
# a[data-value='Uso del tiempo'] {background-color: #e7bfce; color:black}
# .container-fluid > .nav > li >
# a[data-value='Trabajadoras de Casas Particulares'] {background-color: #8adbd1; color:black}
uiOutput(outputId = "main_ui") # defino un uiOutput llamado "main_ui"
)
##### server #####
server <- function (input, output,session) {
#render UI
output$main_ui <- renderUI({
main_ui}) # usa la función renderUI que se debe utilizar con los outputs "uiOutput" o "htmlOutput"
##########
# Output modules ----------------------------------------------------------
#sample_plot_server('ejemplo')
tasas_sexo_server('tasas_sexo')
tasas_edad_server('tasas_edad')
# tipo_insercion_server('jerarquias')
# ramas_server('ramas')
brechas_server('brechas_general')
# brechas_desag_server('brechas_desag')
# deciles_server('deciles')
# horas_remunerado_server('horas_remuneradas')
# horas_no_remunerado_server('horas_no_rem')
}
##### RUN #####
shinyApp(ui, server)