aephidayatuloh
commited on
Commit
·
ced4569
1
Parent(s):
9314c17
change layout
Browse files
app.R
CHANGED
|
@@ -16,42 +16,65 @@ library(echarts4r)
|
|
| 16 |
|
| 17 |
model <- readRDS("MoE-model.rds")
|
| 18 |
|
| 19 |
-
ui <-
|
| 20 |
-
theme = bs_theme(bootswatch = "minty"),
|
| 21 |
title = "Simulation of Study Success",
|
| 22 |
-
sidebar = sidebar(width = "20%",
|
| 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 |
# tableOutput("tblout")
|
| 54 |
-
echarts4rOutput("gpa_plot")
|
| 55 |
)
|
| 56 |
|
| 57 |
server <- function(input, output, session) {
|
|
@@ -88,7 +111,7 @@ server <- function(input, output, session) {
|
|
| 88 |
e_bar(predict_GPA, label = list(show = TRUE)) |>
|
| 89 |
e_flip_coords() |>
|
| 90 |
e_y_axis(inverse = TRUE) |>
|
| 91 |
-
e_grid(left = "
|
| 92 |
}
|
| 93 |
)
|
| 94 |
}
|
|
|
|
| 16 |
|
| 17 |
model <- readRDS("MoE-model.rds")
|
| 18 |
|
| 19 |
+
ui <- fluidPage(
|
| 20 |
+
# theme = bs_theme(bootswatch = "minty"),
|
| 21 |
title = "Simulation of Study Success",
|
| 22 |
+
# sidebar = sidebar(width = "20%",
|
| 23 |
+
# ,
|
| 24 |
+
# hr()
|
| 25 |
+
# ),
|
| 26 |
+
column(6,
|
| 27 |
+
h1("Input"),
|
| 28 |
+
wellPanel(
|
| 29 |
+
style = "background-color: transparent;",
|
| 30 |
+
fluidRow(
|
| 31 |
+
style = "display: flex;",
|
| 32 |
+
prettySwitch("sex", "Male?", fill = TRUE, status = "primary"),
|
| 33 |
+
prettySwitch("playgroup", "Playgroup", fill = TRUE, status = "primary"),
|
| 34 |
+
prettySwitch("preelementary_school", "Pre-Elementary School", fill = TRUE, status = "primary"),
|
| 35 |
+
prettySwitch("gov_scholarship_holder", "Gov. Scholarship Holder", fill = TRUE, status = "primary"),
|
| 36 |
+
prettySwitch("parents_spc_need", "Parent have special needs?", fill = TRUE, status = "primary")
|
| 37 |
+
),
|
| 38 |
+
fluidRow(
|
| 39 |
+
style = "display: flex;",
|
| 40 |
+
selectInput("parents_occupation_category", "Parents Occupation Category",
|
| 41 |
+
choices = c("Civil Servants", "Labor Workers", "Private Employee"),
|
| 42 |
+
width = "33.333%"),
|
| 43 |
+
numericInput("household_income", "Household Income", 4000000, min = 0, max = 19949598,
|
| 44 |
+
width = "33.333%"),
|
| 45 |
+
selectInput("parents_education_level_cat", "Parent Education Level",
|
| 46 |
+
choices = c("Bachelor", "Diploma", "Master/Doctorate", "Senior Highschool", "Junior Highschool", "Elementary School", "Unschooled"),
|
| 47 |
+
width = "33.333%")
|
| 48 |
+
),
|
| 49 |
+
fluidRow(
|
| 50 |
+
style = "display: flex;",
|
| 51 |
+
selectInput("school_location", "School Location", choices = c("Rural", "Urban"), width = "50%"),
|
| 52 |
+
numericInput("home_sch_dist", "School Distance (km)", value = 3, min = 0, width = "50%")
|
| 53 |
+
),
|
| 54 |
+
fluidRow(
|
| 55 |
+
selectInput("highsch_major", "Highschool Major", width = "60%",
|
| 56 |
+
choices = c("Natural Science", "Social Sciences", "Language Studies")),
|
| 57 |
+
),
|
| 58 |
+
fluidRow(
|
| 59 |
+
style = "display: flex;",
|
| 60 |
+
numericInput("math_score", "Math Score", 50, min = 0, max = 100, width = "20%"),
|
| 61 |
+
numericInput("science_score", "Science Score", 50, min = 0, max = 100, width = "20%"),
|
| 62 |
+
numericInput("english_score", "English Score", 50, min = 0, max = 100, width = "20%"),
|
| 63 |
+
numericInput("indonesian_score", "Bahasa Indonesia Score", 50, min = 0, max = 100, width = "20%"),
|
| 64 |
+
numericInput("social_score", "Social Score", 50, min = 0, max = 100, width = "20%")
|
| 65 |
+
),
|
| 66 |
+
fluidRow(selectInput("university", "University", choices = c("Private", "Public")))
|
| 67 |
+
|
| 68 |
+
),
|
| 69 |
+
),
|
| 70 |
+
column(6,
|
| 71 |
+
h1("Output"),
|
| 72 |
+
wellPanel(
|
| 73 |
+
echarts4rOutput("gpa_plot"),
|
| 74 |
+
style = "background-color: transparent;"
|
| 75 |
+
)
|
| 76 |
+
)
|
| 77 |
# tableOutput("tblout")
|
|
|
|
| 78 |
)
|
| 79 |
|
| 80 |
server <- function(input, output, session) {
|
|
|
|
| 111 |
e_bar(predict_GPA, label = list(show = TRUE)) |>
|
| 112 |
e_flip_coords() |>
|
| 113 |
e_y_axis(inverse = TRUE) |>
|
| 114 |
+
e_grid(left = "20%", right = "5%")
|
| 115 |
}
|
| 116 |
)
|
| 117 |
}
|