dscigametrics.daily_plot

Module Contents

Functions

daily_plot(data, campaign_id, start_date, end_date[, ...])

Creating time-series chart

dscigametrics.daily_plot.daily_plot(data, campaign_id, start_date, end_date, width=600, height=1000)[source]

Creating time-series chart

Returns a time-series chart that visualises daily performance of a campaign in a period.

Parameters:
  • data (dataframe) – Dataframe containing information from google analytics

  • campaign_id (int) –

    The unique id of the campaign. start_date : int

    The campaign start date.

  • end_date (int) – The campaign end date.

  • width (int, optional) – The width of the chart. Default is 400.

  • height (int, optional) – The height of the chart. Default is 400.

Returns:

An Altair Chart object representing the time-series plot.
Four metrics:
  1. New to return rate

  2. Conversion rate

  3. Total transaction revenue

  4. Average transaction revenue

Return type:

altair.vegalite.v4.api.Chart

Examples

>>> daily_plot(df, 452349492, 20220401, 20220430)