Ready
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user