shinydashboard ile Panolar Oluşturma
Png Kee Seng
Researcher
Londra'da bir tur acentesinde çalışıyoruz.
Turistlerin kalacak yere ihtiyacı var.
Onlara nasıl yardımcı olabiliriz?


header <- dashboardHeader(
title = "Ev kiralama ilanları")
sidebar <- dashboardSidebar()
body <- dashboardBody()
ui <- dashboardPage(header,
sidebar,
body)
server <- function(input, output) {}
shinyApp(ui, server)
body içinde:
fluidRow(
valueBoxOutput(outputId = "count"),
valueBoxOutput(outputId = "prop"),
valueBoxOutput(outputId = "avg"))
server içinde:
output$count <- renderValueBox({
valueBox(..., icon = ...)})
output$prop <- renderValueBox(...)
...
body içinde:
box(
side = "right", ...,
sliderInput(inputId = "range",
label = "Fiyat aralığı seçin:",
min = 0,
max = 25000,
value = c(0,25000))
))
serverı güncelleyin; input$range[1] ve input$range[2] kullanın

body içinde:
plotlyOutput("plots",
height = 500,
width = 600)
server içinde:
output$plots <- renderPlotly({
...
})

body içinde:
selectInput(inputId = "select",
label = "Grup seçin:",
choices = c("Neighbourhood",
"Room Type"))
server içinde:
output$plots <- renderPlotly({
if (input$select == ...){plot1}
else if(input$select == ...){plot2}
})
body içinde:
box(side = "right", ...,
title = "Londra'ya hoş geldiniz!",
"...")
body içinde güncelleyin:
tabBox(id = "tabset", ...,
tabPanel("Grafikler", ...),
tabPanel("Veri tablosu", ...)

shiny işlevlerini kullanabiliriz.
body içinde:
dataTableOutput("table")
server içinde:
output$table <-
renderDataTable(listings)

sidebar içinde:
sidebarMenu(
menuItem("Grafikler", ...),
menuItem("Harita", ...))
body içinde:
leafletOutput("map",...)
server içinde:
output$map <- renderLeaflet(map)
shinydashboard ile Panolar Oluşturma