Event Planner

class components.event_planner.EventPlanner

The EventPlanner object contains functions used for Event Planner tab

Methods

email_results(output_df, email_dict, event)

Function to send email to participants

get_criteria_list(other_cols_values, n)

Create list of criteria selection for every criteria column

process_result(df, event, n_groups, …)

Processing for event planner, shuffling and splitting participants

static email_results(output_df, email_dict, event)

Function to send email to participants

Parameters
  • output_df (pd.DataFrame) – output DataFrame from process_result

  • email_dict (dict) – dictionary mapping participants to email address

  • event (str) – name of event, for result heading and email

Returns

indicator if email is sent

Return type

(bool)

static get_criteria_list(other_cols_values, n)

Create list of criteria selection for every criteria column

Parameters
  • other_cols_values (list) – list of criteria columns

  • n (int) – number of criterias to generate

Returns

list of criteria selection that is randomly selected

Return type

(list)

static process_result(df, event, n_groups, pair_flag, criteria_level, email_flag, hide_flag, style)

Processing for event planner, shuffling and splitting participants

Parameters
  • df (pd.DataFrame) – input DataFrame

  • event (str) – name of event, for result heading and email

  • n_groups (int) – number of groups

  • pair_flag (str) – option whether to pair participants up

  • criteria_level (str) – whether criteria is on individual or group level

  • email_flag (str) – option whether to email results to recipients

  • hide_flag (str) – option whether to display output results

  • style (dict) – current style of results div

Returns

3-element tuple

  • (list): div result of result div

  • (list): div result of output div

  • (dict): updated style of output div