Coder Social home page Coder Social logo

natanaelsl / bs4dash Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rinterface/bs4dash

0.0 0.0 0.0 49.26 MB

Bootstrap 4 shinydashboard using AdminLTE3

Home Page: https://rinterface.github.io/bs4Dash/

License: Other

R 70.12% JavaScript 25.01% CSS 4.86%

bs4dash's Introduction

bs4Dash

R build status version lifecycle cranlogs total Codecov test coverage

Bootstrap 4 shinydashboard using AdminLTE3



New users moving to bs4Dash v2.0.0

Taking the simple {shinydashboard} example:

library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(plotOutput("plot1", height = 250)),

      box(
        title = "Controls",
        sliderInput("slider", "Number of observations:", 1, 100, 50)
      )
    )
  )
)

server <- function(input, output) {
  set.seed(122)
  histdata <- rnorm(500)

  output$plot1 <- renderPlot({
    data <- histdata[seq_len(input$slider)]
    hist(data)
  })
}

shinyApp(ui, server)

Starting from v2.0.0, moving to {bs4Dash} is rather simple:

library(bs4Dash)
ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(plotOutput("plot1", height = 250)),

      box(
        title = "Controls",
        sliderInput("slider", "Number of observations:", 1, 100, 50)
      )
    )
  )
)

server <- function(input, output) {
  set.seed(122)
  histdata <- rnorm(500)

  output$plot1 <- renderPlot({
    data <- histdata[seq_len(input$slider)]
    hist(data)
  })
}

shinyApp(ui, server)

Upgrading bs4Dash to 2.0.0

  • {bs4Dash} is undergoing major rework to make it easier to come from {shinydashboard}. The current development version 2.0.0 provides a 1:1 supports, in other word moving from {shinydashboard} to {bs4Dash} is accomplished by changing library(shinydashboard) to library(bs4Dash).

  • {bs4Dash} v2.0.0 also provides 1:1 with {shinydashboardPlus} to ease compatibility.

  • Apps built with {bs4Dash} version <= 0.5.0 are definitely not compatible with v2.0.0 due to substantial breaking changes in the API. We advise users to keep the old version for old apps and move to to the new version for newer apps.

Disclaimer: as of now, {bs4Dash} 2.0.0 needs:

shiny (>= 1.6.0)
htmltools (>= 0.5.1.1)
bslib (>= 0.2.4)
thematic (>= 0.1.2)

Installation

bs4Dash >= v2.0.0

# latest devel version
devtools::install_github("RinteRface/bs4Dash")

bs4Dash <= v0.5.0

This package is on CRAN:

# from CRAN
install.packages("bs4Dash")

Demo

bs4Dash >= v2.0.0

See a working example on shinyapps.io here. You may also run:

library(bs4Dash)
bs4DashGallery()

bs4Dash <= v0.5.0

See a preview of the package here and here or run

An applied example can be found here (the original dashboard was made by Philippine Rheins from dreamRs).

Issues

Issues are listed here.

Acknowledgement

I warmly thank Glyphicons creator for providing them for free with Bootstrap.

Code of Conduct

Please note that the bs4Dash project is released with a Contributor Code of Conduct. By contributing to this project, you agree toabide by its terms.

bs4dash's People

Contributors

divadnojnarg avatar statnmap avatar statup-github avatar johncoene avatar ari-nz avatar davidbarke avatar stefaneng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.