pdstools.utils.report_utils

Functions

quarto_print(text)

quarto_callout_info(info)

quarto_callout_important(info)

quarto_plot_exception(plot_name, e)

quarto_callout_no_prediction_data_warning([extra])

quarto_callout_no_predictor_data_warning([extra])

polars_col_exists(df, col)

polars_subset_to_existing_cols(all_columns, cols)

rag_background_styler([rag])

rag_background_styler_dense([rag])

rag_textcolor_styler([rag])

table_standard_formatting(source_table[, title, ...])

table_style_predictor_count(gt, flds[, ...])

n_unique_values(dm, all_dm_cols, fld)

max_by_hierarchy(dm, all_dm_cols, fld, grouping)

avg_by_hierarchy(dm, all_dm_cols, fld, grouping)

sample_values(dm, all_dm_cols, fld[, n])

show_credits(quarto_source)

Module Contents

quarto_print(text)
quarto_callout_info(info)
quarto_callout_important(info)
quarto_plot_exception(plot_name: str, e: Exception)
Parameters:
quarto_callout_no_prediction_data_warning(extra='')
quarto_callout_no_predictor_data_warning(extra='')
polars_col_exists(df, col)
polars_subset_to_existing_cols(all_columns, cols)
rag_background_styler(rag: Literal['Red', 'Amber', 'Yellow', 'Green'] | None = None)
Parameters:

rag (Optional[Literal['Red', 'Amber', 'Yellow', 'Green']])

rag_background_styler_dense(rag: Literal['Red', 'Amber', 'Yellow', 'Green'] | None = None)
Parameters:

rag (Optional[Literal['Red', 'Amber', 'Yellow', 'Green']])

rag_textcolor_styler(rag: Literal['Red', 'Amber', 'Yellow', 'Green'] | None = None)
Parameters:

rag (Optional[Literal['Red', 'Amber', 'Yellow', 'Green']])

table_standard_formatting(source_table, title=None, subtitle=None, rowname_col=None, groupname_col=None, cdh_guidelines=CDHGuidelines(), highlight_limits: Dict[str, str | List[str]] = {}, highlight_lists: Dict[str, List[str]] = {}, highlight_configurations: List[str] = [], rag_styler: callable = rag_background_styler)
Parameters:
  • highlight_limits (Dict[str, Union[str, List[str]]])

  • highlight_lists (Dict[str, List[str]])

  • highlight_configurations (List[str])

  • rag_styler (callable)

table_style_predictor_count(gt: great_tables.GT, flds, cdh_guidelines=CDHGuidelines(), rag_styler=rag_textcolor_styler)
Parameters:

gt (great_tables.GT)

n_unique_values(dm, all_dm_cols, fld)
max_by_hierarchy(dm, all_dm_cols, fld, grouping)
avg_by_hierarchy(dm, all_dm_cols, fld, grouping)
sample_values(dm, all_dm_cols, fld, n=6)
show_credits(quarto_source: str)
Parameters:

quarto_source (str)