-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
98 lines (94 loc) · 4.17 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
library(shiny)
shinyUI(fluidPage(
titlePanel("GTFF Savings Calculator"),
sidebarLayout(
sidebarPanel(
helpText("This app calculates savings for full-share and fair-share members based on the GE's monthly salary."),
h4("Salary"),
numericInput("monthly_salary",
label = h6("Monthly salary (in $)"),
value = 1720),
h4("Dues"),
numericInput("dues_full",
label = h6("Full Share Member Dues (in % monthly income)"),
value = 2.1),
numericInput("dues_fair",
label = h6("Fair Share Member Dues (in % monthly income)"),
value = 1.79),
h4("Health Insurance"),
numericInput("insurance_GTFF",
label = h6("GTFF (in $)"),
value = 286.04),
numericInput("insurance_ACA",
label = h6("ACA (in $)"),
value = 462),
numericInput("insurance_UO",
label = h6("UO Plan (in $)"),
value = 2972),
h4("Fees"),
numericInput("fees_paid",
label = h6("Fees paid by the GTFF (in $)"),
value = 189),
numericInput("fees_asked",
label = h6("Fees requested by University (in $)"),
value = 2076),
br(),
br(),
actionButton("action_Calc", label = "Calculate")
),
mainPanel(
tabsetPanel(
tabPanel("Output",
p(h3("Your entered values:")),
textOutput("text_salary"),
p(h4("Dues:")),
textOutput("text_dues_full"),
textOutput("text_dues_fair"),
p(h4("Health Insurance:")),
textOutput("text_insurance_GTFF"),
textOutput("text_insurance_ACA"),
textOutput("text_insurance_UO"),
p(h4("Fees:")),
textOutput("text_fees_paid"),
textOutput("text_fees_asked"),
br(),
p(h3("Calculated values:")),
p(h4("Dues:")),
textOutput("text_dues_full_dollars"),
textOutput("text_dues_fair_dollars"),
p(h4("Total Cost:")),
textOutput("text_cost_full"),
textOutput("text_cost_fair"),
textOutput("text_cost_noACA"),
textOutput("text_cost_noGTFF"),
p(h4("Savings:")),
p(h5("Full Member")),
textOutput("text_savings_ACA_full"),
textOutput("text_savings_UO_full"),
p(h5("Fair-Share Member")),
textOutput("text_savings_ACA_fair"),
textOutput("text_savings_UO_fair")
),
tabPanel("Documentation",
p(h4("GTFF Savings Calculator:")),
br(),
helpText("This application calculates savings for full and fair share members based on their monthly salary."),
HTML("<u><b>Equations for calculation: </b></u>
<br> </br>
<br> D = M * P </br>
<br> C = D + H </br>
<br> S = C - D <br>
<br> </br>
<b>key: </b><br>
D = Dues paid per year (in dollars) <br>
M = Monthly salary <br>
P = Membership dues paid (% of salary; full or fair) <br>
C = Total cost to member per year (with or without union) <br>
H = Health insurance (GTFF, ACA, or UO) <br>
S = Savings
")
)
)
)
)
))