This commit is contained in:
2022-08-22 15:10:36 +02:00
parent 00b045ee8e
commit 55a713de03
8 changed files with 240 additions and 236 deletions

View File

@@ -6,9 +6,7 @@ basicstatUI <- function(id) {
fluidRow(
h3("No of Assets"),
br(),
p(
"This section shows some basic information about the portfolio."
),
p("This section shows some basic information about the portfolio."),
plotOutput(ns("statplot")),
verbatimTextOutput(ns("balancetext"))
)
@@ -90,18 +88,16 @@ basicstatServer <- function(id, dt) {
group_by(customer_type, loan_status) %>%
summarise(no_of_loans = n()) %>%
ungroup() %>%
ggplot(
aes(
x = customer_type,
y = no_of_loans,
label = no_of_loans,
fill = factor(
loan_status,
levels = c("0", "1"),
labels = c("Good", "Bad")
)
ggplot(aes(
x = customer_type,
y = no_of_loans,
label = no_of_loans,
fill = factor(
loan_status,
levels = c("0", "1"),
labels = c("Good", "Bad")
)
) +
)) +
geom_col(position = "dodge") +
geom_text(aes(y = no_of_loans + 20), position = position_dodge(width = 1)) +
labs(title = "No. of assets by customer type",