pdstools.decision_analyzer.plots._offer_quality

Offer-quality pie charts and trend chart (free functions, not Plot methods).

Functions

offer_quality_piecharts(df, propensity_th, ...[, ...])

offer_quality_single_pie(df, stage, propensity_th[, level])

Create a single pie chart showing offer quality for a specific stage.

getTrendChart(df[, stage, return_df, level])

Module Contents

offer_quality_piecharts(df: polars.LazyFrame, propensity_th, AvailableNBADStages, return_df=False, level='Stage Group')
Parameters:

df (polars.LazyFrame)

offer_quality_single_pie(df: polars.LazyFrame, stage: str, propensity_th, level='Stage Group')

Create a single pie chart showing offer quality for a specific stage.

Parameters:
  • df (pl.LazyFrame) – Offer quality data from get_offer_quality()

  • stage (str) – Stage name to display (e.g., “Arbitration”, “Output”)

  • propensity_th (float) – Propensity threshold used for relevance categorization

  • level (str, default "Stage Group") – Grouping level (Stage or Stage Group)

Returns:

Single pie chart figure

Return type:

plotly.graph_objects.Figure

getTrendChart(df: polars.LazyFrame, stage: str = 'Output', return_df=False, level='Stage Group')
Parameters:
  • df (polars.LazyFrame)

  • stage (str)