Package 'qiverse.qimisc'

Title: Multiple Indicator Sigma Chart
Description: Defines functions needed to generate the Multiple Indicator Sigma Chart in Plotly.
Authors: Healthcare Quality Intelligence Unit (Western Australia Health) [aut, cre]
Maintainer: Healthcare Quality Intelligence Unit (Western Australia Health) <[email protected]>
License: GPL (>= 3) + file LICENSE
Version: 0.0.1.3
Built: 2026-05-28 02:41:25 UTC
Source: https://github.com/AUS-DOH-Safety-and-Quality/qiverse

Help Index


Generate a Multi-Indicator Sigma Chart in Plotly for a Chosen Group

Description

This function generates a Multi-Indicator Sigma Chart in Plotly for a chosen group. The function requires the funnel data and indicator metadata to be provided as data.frames/data.tables. The function will then prepare the data for the MISC chart and plot the chart in Plotly.

Usage

misc(
  funnel_data,
  indicator_data,
  chosen_group,
  hover_colour = "#00667B",
  control_colour = "#00667B",
  worse_colour = "#E46C0A",
  neutral_colour = "#A6A6A6",
  better_colour = "#00B0F0",
  y_dp = 2
)

Arguments

funnel_data

A data.frame/data.table of the funnel data with the columns indicator, group, numerator and denominator. See ?example_funnel_data for an example and more information on the fields required.

indicator_data

A data.frame/data.table of the indicator metadata with the columns indicator_theme, indicator, multiplier, data_type and betteris. See ?example_indicator_data for an example and more information on the fields required.

chosen_group

A string of the group to be displayed on the chart.

hover_colour

The background colour for the hoverinfo (default = "#00667B")

control_colour

The colour of the 95% and 99% control limits for the plot (default = "#00667B")

worse_colour

The colour of the bar in the unfavourable direction (default = "#E46C0A")

neutral_colour

The colour of the bar in the favourable direction (default = "#A6A6A6")

better_colour

The colour of the bar in the favourable direction (default = "#00B0F0")

y_dp

The number of decimal places displayed on the chart (default = 2)

Value

A data.table with the required fields for the MISC plotly chart.

Examples

## Not run: 
  library(qiverse.qimisc)
  library(qiverse.data)
  misc_data <- misc(
    funnel_data = example_funnel_data,
    indicator_data = example_indicator_data,
    chosen_group = "A"
  )

## End(Not run)

Chart the Multiple Indicator Sigma Chart in Plotly

Description

Chart the Multiple Indicator Sigma Chart in Plotly

Usage

misc_plotly(
  data,
  hover_colour = "#00667B",
  control_colour = "#00667B",
  worse_colour = "#E46C0A",
  neutral_colour = "#A6A6A6",
  better_colour = "#00B0F0",
  y_dp = 2
)

Arguments

data

A data.frame/data.table of the funnel data with the columns indicator, group, numerator and denominator. See ?example_funnel_data for an example and more information on the fields required.

hover_colour

The background colour for the hoverinfo (default = "#00667B")

control_colour

The colour of the 95% and 99% control limits for the plot (default = "#00667B")

worse_colour

The colour of the bar in the unfavourable direction (default = "#E46C0A")

neutral_colour

The colour of the bar in the favourable direction (default = "#A6A6A6")

better_colour

The colour of the bar in the favourable direction (default = "#00B0F0")

y_dp

The number of decimal places displayed on the chart (default = 2)

Value

A MISC plotly output.

Examples

## Not run: 
  library(qiverse.qimisc)
  library(qiverse.data)
  misc_data <- misc_prep_data(example_funnel_data, example_indicator_data)
  misc_plotly(misc_data[group == "A"])

## End(Not run)

Prepare data for the Multiple Indicator Sigma Chart

Description

Prepare data for the Multiple Indicator Sigma Chart

Usage

misc_prep_data(funnel_data, indicator_data)

Arguments

funnel_data

A data.frame/data.table of the funnel data with the columns indicator, group, numerator and denominator. See ?example_funnel_data for an example and more information on the fields required.

indicator_data

A data.frame/data.table of the indicator metadata with the columns indicator_theme, indicator, multiplier, data_type and betteris. See ?example_indicator_data for an example and more information on the fields required.

Value

A data.table with the required fields for the MISC plotly chart.

Examples

## Not run: 
  library(qiverse.qimisc)
  library(qiverse.data)
  misc_data <- misc_prep_data(example_funnel_data, example_indicator_data)

## End(Not run)