Description Public fields Methods
app_master is the master class used across all modules of the the shiny app. It Stores all datasets needed in the applications as tibbles. All datasets meta information is also stored in this object
params
initialization parameters
reactive_vals
reactiveValues instance that stores all reactive values needed in app
master_data
static values, non-reactive static datasets needed in the application. Note you can pre-load these
ds_config
configuration extracted from master config
dq_master
Stores Data Quality Information for each dataset
new()
Standard R6 Initialize function
app_master$new(params)
params
the config yml driven params for initialization
a new app_master
object
get_dq_summary()
Gets SmartEDA::ExpData(type = 1) dataframe in lazy maner
app_master$get_dq_summary(ds_name, max_rows = Inf)
ds_name
the ds_name
max_rows
if max_rows > nrow of ds than a random max_rows are selected else nrow is used. default is Inf for all rows
a new app_master
object
get_dq_detail()
Gets SmartEDA::ExpData(type = 2) dataframe in lazy manner
app_master$get_dq_detail(ds_name, max_rows = Inf)
ds_name
the ds_name
max_rows
if max_rows > nrow of ds than a random max_rows are selected else nrow is used. default is Inf for all rows
a new app_master
object
Add a row to app_master '
add_master_data_row()
app_master$add_master_data_row(row)
row
new row object created with create_row removes the indexed row from app_master ' Note: the indexes are reindexed from 1 to nrow(master_data) after removal
remove_dataset()
app_master$remove_dataset(index)
index
the rowindex replaces dataset with new row at the same index
replace_dataset_by_name()
app_master$replace_dataset_by_name(dataset_name, replace_with)
dataset_name
the ds_name
replace_with
the row created with create_row load dataset config in a consumable fashion
load_ds_config()
app_master$load_ds_config(params)
params
the params Preload app_master with csv files provided in config '
Note this creates new mdata overiding rvals
preload_master_with_config()
app_master$preload_master_with_config()
self object access dataset names as list
dataset_names()
app_master$dataset_names()
the names of datasets search for a tibble based on dataset_name
dataset_by_name()
app_master$dataset_by_name(dataset_name, max_rows = Inf)
dataset_name
the name of the dataset to lookup
max_rows
(optional) if max_rows is set then sample max_rows from dataset.
the mapped dataset in tibble format search for a tibble based on index in mdata
data_by_index()
app_master$data_by_index(index)
index
the row index of the dataset
the mapped dataset in tibble format get colnames for a dataset
colnames_for_dataset()
app_master$colnames_for_dataset(dataset_name)
dataset_name
the name of the dataset to lookup
characted list of colnames Validate Datasets based on rules and prep conduct basic data prep Typically this method is called from _targets or at Design time when building the app Not ideal to call this method from shiny app. Note: validtion is done only if the dataset has the following set in config file ds_info_type and ds_info_url supported ds_info_type : google , excel and csv
ds_validate_and_prep()
app_master$ds_validate_and_prep()
logical FALSE if data validation Warnings or Errors elase TRUE get pretty colnames for a dataset
prettynames_for_dataset()
app_master$prettynames_for_dataset(dataset_name)
dataset_name
the name of the dataset to lookup
characted list of colnames
clone()
The objects of this class are cloneable with this method.
app_master$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.