TileDB Cloud supports dashboards written in python (ipywidgets, panel) or R (shiny) via voila in Jupyter notebooks. Dashboards are built by first creating a notebook, then marking the notebook as a dashboard.
Any TileDB Cloud Notebook can be enabled as a dashboard by toggling in the notebook settings:
R Shiny
TileDB provides a R library, shinybg, which faciliates running R shiny applications inside jupyter notebooks. This allows the shiny app to run as a background process and for the shiny app to be displayed for use as a dashboard.
Example Shiny App
Using a shiny app in TileDB works in a similar manner to a standalone shiny app. The main change is using the renderShinyApp function provided by shinybg to display it. Below is a reproduction of the old faithful 101 shiny app. This is also available as a dashboard and notebook in TileDB Cloud.
library(shiny)
library(shinybg)
ui <- fluidPage(
titlePanel("Old Faithful Geyser Data"),
sidebarLayout(
sidebarPanel(
sliderInput("bins", "Number of bins:", min = 1, max = 50, value = 30)
),
mainPanel(plotOutput("distPlot"))
)
)
server <- function(input, output) {
output$distPlot <- renderPlot({
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = input$bins + 1)
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
}
renderShinyApp(ui = ui, server = server)
Ipywidgets
Ipywidgets can be used directly in a jupyter notebook and rendered as a dashboard. Below is an example from the ipywidgets 2x2 tutorial. This can be used directly as a dashboard in TileDB Cloud. This is also available as a dashboard and notebook in TileDB Cloud.
Similar to ipywidget panel can be used directly in a jupyter notebook and a dashboard. Below is the example from "Build an app" in panel that can be used directly in TileDB Cloud as a dashboard. This is also available as a dashboard and notebook in TileDB Cloud.