The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Get Started

library(shinydataviewer)
library(shiny)
library(bslib)

shinydataviewer provides a reusable Shiny module for viewing data with:

The module supports data frames with numeric, integer, character, factor, logical, Date, and POSIXct/POSIXt columns. Non-finite numeric values such as Inf, -Inf, and NaN are excluded from numeric summary statistics and histogram bins.

Interface preview

The data viewer combines per-variable summary cards with a searchable table.

The data viewer combines per-variable summary cards with a searchable table.

Minimal module

Use data_viewer_ui() when the viewer should manage its own table card.

ui <- page_fillable(
  theme = bs_theme(version = 5),
  data_viewer_ui("viewer")
)

server <- function(input, output, session) {
  data_viewer_server(
    "viewer",
    data = reactive(iris)
  )
}

shinyApp(ui, server)

Embedded card

Use data_viewer_card_ui() when the viewer belongs inside another layout.

ui <- page_fillable(
  theme = bs_theme(version = 5),
  layout_columns(
    col_widths = c(4, 8),
    card(
      card_header("Context"),
      card_body("Supporting content")
    ),
    data_viewer_card_ui(
      "viewer",
      title = "Dataset",
      full_screen = FALSE
    )
  )
)

server <- function(input, output, session) {
  data_viewer_server(
    "viewer",
    data = reactive(mtcars)
  )
}

shinyApp(ui, server)

Summary helper

The variable sidebar is backed by summarize_columns().

summary_df <- summarize_columns(head(iris), top_n = 4)

summary_df[c("var_name", "type", "n_missing", "n_unique")]
#>                  var_name    type n_missing n_unique
#> Sepal.Length Sepal.Length numeric         0        6
#> Sepal.Width   Sepal.Width numeric         0        6
#> Petal.Length Petal.Length numeric         0        4
#> Petal.Width   Petal.Width numeric         0        2
#> Species           Species  factor         0        1

summarize_columns() returns one row per input column. Its summary_stats and distribution_data list-columns contain the precomputed payloads used by the viewer cards, including detail statistics, categorical top-level counts, and compact histogram metadata.

Example app

A runnable embedded example is included at inst/examples/embedded-card-example.R.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.