Skip to contents

This function generates a Shiny application with modular piePlot components. The app features a Data Import section for uploading data, a Data Table for filtering the active dataset, and a Plot area for configuring and displaying an interactive pie plot.

Usage

piePlotApp(data_list = NULL)

Arguments

data_list

An optional named list of summary data frames (one row per slice). If NULL (the default), aggregated example data is used. Each data frame should already contain a label column and an aggregated numeric value column.

Value

A Shiny app object.

Details

When data_list is not provided (or NULL), the app launches with an aggregated example_sales dataset (revenue by product line). Uploaded data files are added to the available datasets and can be selected for plotting. If an uploaded file shares a name with an existing dataset, the existing one is overwritten with a warning.

This is a convenience wrapper around createModuleApp().

Author

Jacob Martin, Jared Andrews

Examples

library(VizModules)
# Launch with default example data:
app <- piePlotApp()
if (interactive()) runApp(app)

# Launch with custom data:
sales_summary <- aggregate(revenue ~ product_line, example_sales, sum)
app2 <- piePlotApp(list("sales" = sales_summary))
if (interactive()) runApp(app2)