Tabler Server A minimal framework to create web dashboards in R
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
All of this is a very early work.
I have been using Shiny Server for around 8 years and R for almost 11 years.
At some point I created the tabler R package, whose current CRAN version is a layer between Shiny and Tabler to offer a refreshed look for dashboards.
The experimental tabler version on GitHub completely drops Shiny usage on its codebase and it is also compatible with widgets created for Shiny such as d3po.
Besides local apps, I have been working on Tabler Server to manage tabler apps on a Linux machine.
Nothing of this is particularly novel. Most of this was done standing on the shoulders of giants to combine R and Linux tools efficiently.
Here is a simple example:
pak::pkg_install("pachadotdev/tabler")
library(tabler)
ui <- page(
title = "Example 1",
layout = "boxed",
navbar = list(
top = topbar(title = "Example 1")
),
body = body(
h2("Example 1"),
p("Type your name and it is echoed back below."),
textInput("name", "Your name", value = "world"),
textOutput("greeting")
)
)
server <- function(input, output, session) {
output$greeting <- renderText({
paste0("Hello, ", input$name, "!")
})
syncUrl(session) # syncUrl(session, exclude = c("exclude", "this"))
}
tablerApp(ui, server)
A highlight for this project is that it that it simplifies URLs. Moving the sliders, dropdowns or text inputs updates the URL and changing the URL also modified the state app. For example, http://127.0.0.1:3000/?name=John can be changed to http://127.0.0.1:3000/?name=George, and then the text entry can be changed to “Paul” to print “Hello, Paul!” to then set it to “Ringo” or another value. Unlike Shiny, the URL does not use quotes and allows for cleaner inputs like ?year=2000&country=gbr&lang=en instead of ?year=2000&country=%22gbr%22&lang=%22en%22.
Both tabler and tabler server are released under the Apache License 2.0, a permissive license for commercial and non-commercial projects.
I hope you like this. Please feel free to test tabler, open issues or contribute to the codebase. If you find this useful, please consider donating on Buy Me A Coffee.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.