-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathui.R
127 lines (113 loc) · 4.73 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# automatic reading rate codes, renaming the tabs, consistent naming convention
shinyUI(navbarPage(
#color #2c3e50
title = HTML(paste('<img src="CaDC_logo_bluegrey.png" ',
'href="http://californiadatacollaborative.com/" ', 'height="60" ',
'style="position: relative; top:-20px; right:-15px">')),
theme = "bootstrap.css",
windowTitle = "RateComparison",
# tags$head(tags$link(rel = "icon", type = "image/png", href = "favicon.ico")),
tabPanel(
"Rate Comparison",
fluidRow(
tags$head(tags$link(rel="icon", type="image/x-icon", href="favicon.ico")),
column( 12, #"main panel",
uiOutput('classTabs')
),#end column
column( 8, #
downloadButton('downloadData', 'Download Full Data')
)
)#end row
),#end tabpanel for navar
tabPanel("Scenario Planning",
fluidRow(
column(2, strong("Price elasticity of demand"), br(),
strong("(0 means no price response)")),
column(2, numericInput("PED", NULL,
0.24, min = 0, max = 2, step = 0.01,
width = NULL)
)
),
fluidRow(
column(2, checkboxInput("Planning", "Enable scenario planning", value = TRUE,
width = NULL)
),
column(3, numericInput("Months", "Number of months to forecast",
3, min = 1, max = 24, step = 1,
width = NULL)
)
),
fluidRow(
column(2),
column(2, h4("Monthly Growth/Decline\n(# of accounts)")),
column(2, h4("Estimated Usage per\nNew Account (# billing units)"))
),
lapply(1:length(cust_class_list), function(i) {
fluidRow(
column(2, strong(cust_class_list[i])),
column(2, numericInput(cust_class_list[i], NULL,
1, min = -1000, max = 1000, step = 1,
width = NULL)
),
column(2, numericInput(paste0("EstUsagePerAccount_",cust_class_list[i]), NULL,
10, min = 0, max = 1000, step = NA,
width = NULL)
)
)
})
# fluidRow(
# column(2, strong("Single-Family Residential")),
# column(2, numericInput("ResidentialSingle", NULL,
# 5, min = -1000, max = 1000, step = 1,
# width = NULL)),
# column(2, numericInput("EstUsagePerAccount", NULL,
# 10, min = 0, max = 1000, step = NA,
# width = NULL))
# ),
# fluidRow(
# column(2, strong("Multi-Family Residential")),
# column(2, numericInput("ResidentialMulti", NULL,
# 1, min = -1000, max = 1000, step = 1,
# width = NULL)),
# column(2, numericInput("EstUsagePerAccount_multi", NULL,
# 6, min = 0, max = 1000, step = NA,
# width = NULL))
# ),
# fluidRow(
# column(2, strong("Irrigation")),
# column(2, numericInput("Irrigation", NULL,
# 1, min = -1000, max = 1000, step = 1,
# width = NULL)),
# column(2, numericInput("EstUsagePerAccount_irrigation", NULL,
# 75, min = 0, max = 1000, step = NA,
# width = NULL))
# ),
# fluidRow(
# column(2, strong("Commercial")),
# column(2, numericInput("Commercial", NULL,
# 1, min = -1000, max = 1000, step = 1,
# width = NULL)),
# column(2, numericInput("EstUsagePerAccount_commercial", NULL,
# 24, min = 0, max = 1000, step = NA,
# width = NULL))
# ),
# fluidRow(
# column(2, strong("Institutional")),
# column(2, numericInput("Institutional", NULL,
# 1, min = -1000, max = 1000, step = 1,
# width = NULL)),
# column(2, numericInput("EstUsagePerAccount_institutional", NULL,
# 35, min = 0, max = 1000, step = NA,
# width = NULL))
# ),
# fluidRow(
# column(2, strong("Other")),
# column(2, numericInput("Other", NULL,
# 1, min = -1000, max = 1000, step = 1,
# width = NULL)),
# column(2, numericInput("EstUsagePerAccount_other", NULL,
# 10, min = 0, max = 1000, step = NA,
# width = NULL))
# )
)
))