-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.R
59 lines (53 loc) · 1.53 KB
/
app.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
library(shiny)
library(shinydashboard)
library(bslib)
library(DT)
library(tidyverse)
library(ggupset)
library(ggprism)
ui <- page_fluid(
navbarPage(div("Data Lake", img(src="HBC_logo.png", width = "40%", height = "40%", align = "right"))),
includeCSS("www/style.css"),
navset_tab(
nav_panel("Data Overview",
fluidRow(
DTOutput("tbl_datasets")
)
),
nav_panel("Column Analysis",
h2("Column Analysis"),
selectInput("input_column","Choose Column", choices = colnames(Seatbelts)),
fluidRow(
column(12,
box(width=12,
status="info",
solidHeader = TRUE,
plotOutput("plot_example", height = 500),
)
)
)
)
)
)
server <- function(input, output, session) {
output$tbl_datasets = renderDT(
datatable(Seatbelts,
rownames= FALSE,
filter = 'top',
extensions = 'Buttons',
options = list(scrollX = TRUE
, pageLength = 5
, dom = 'Blfrtip'
,buttons = c('copy', 'csv', 'excel', 'pdf', 'print')
)),
server = FALSE
)
output$plot_example = renderPlot({
req(input$input_column)
Seatbelts %>%
ggplot(aes(x = get(input$input_column))) +
geom_density() +
theme_prism()
})
}
shinyApp(ui = ui, server = server)