MyNixOS website logo
Description

Visualise OMOP Results using 'shiny' Applications.

Visualise results obtained from analysing data mapped to the Observational Medical Outcomes Partnership (OMOP) common data model using 'shiny' applications.

OmopViewer

R-CMD-check CRANstatus Lifecycle:experimental Codecov testcoverage

The goal of OmopViewer is to allow the user to easily create Shiny Apps to visualise study results in <summarised_result> format.

Installation

Install it from cran:

install.packages("OmopViewer")

Or you can install the development version of OmopViewer from GitHub with:

install.packages("pak")
pak::pkg_install("OHDSI/OmopViewer")

Main functionalities

library(OmopViewer)

The package has two functionalities:

  • Static app
  • Dynamic app

Static shiny app

The static shiny app functionality creates a static shiny from a list of summarised_result objects. This shiny is specific to the set of results and can be modified later locally.

# lets generate some results
library(CohortCharacteristics)
#> Registered S3 method overwritten by 'visOmopResults':
#>   method                 from        
#>   tidy.summarised_result omopgenerics
cdm <- mockCohortCharacteristics()
#> Note: method with signature 'DBIConnection#Id' chosen for function 'dbExistsTable',
#>  target signature 'duckdb_connection#Id'.
#>  "duckdb_connection#ANY" would also be valid
result <- summariseCharacteristics(cdm$cohort1) |>
  bind(summariseCohortAttrition(cdm$cohort1))
#> ℹ adding demographics columns
#> ℹ summarising data
#> ✔ summariseCharacteristics finished!
#> `cohort_definition_id` casted to character.

exportStaticApp(result = result, directory = tempdir())
#> ℹ Processing data
#> ✔ Data processed: 2 panels idenfied: `summarise_characteristics` and
#>   `summarise_cohort_attrition`.
#> ℹ Creating shiny from provided data
#> `cohort_definition_id` eliminated from settings as all elements are NA.
#> ✔ Shiny created in:
#>   /var/folders/pl/k11lm9710hlgl02nvzx4z9wr0000gp/T//RtmpYP9P88/shiny

This function allow some customisation of the shiny with the arguments:

  • theme (to choose a pre-built theme or a bslib one).
  • logo (you can point to one of the pre-builr logos or to a local image).
  • title
  • background whether to allow for an .md file for customisation of a background panel.
  • summary whether to include or not a summary panel.
  • panelStructure allows you to structure the different panels in dropdown menus.
  • panelDetails allows you to create panels at result_id level and assign which are the outputs that we want to include in each panel.

The shiny generated will have the following structure:

  • global.R loads the data.
  • ui.R with all the ui code. You can edit there the buttons and its default values.
  • server.R server logic, you can edit that file to change some of the displays.
  • functions.R some utility functions that are used in the shiny app.
  • data/result.csv the original summarised_result provided.
  • data/ShinyData.RData the .RData file that contains the data used in the shiny.
  • data/preprocess.R the file to generate ShinyData.RData from results.csv

Dynamic shiny app

The dynamic shiny app can be easily launched with launchDynamicApp() function. This function creates a shinyApp where you can upload multiple results sets and visualise them.

launchDynamicApp()

By default the shiny generated will have no data, you have to upload data from a csv or zip file that you have it locally. The summarised_results will be processed and you will be allowed to choose which results to visualise.

Metadata

Version

0.2.0

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows