dscigametrics.daily_plot
Module Contents
Functions
|
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:
New to return rate
Conversion rate
Total transaction revenue
Average transaction revenue
- Return type:
altair.vegalite.v4.api.Chart
Examples
>>> daily_plot(df, 452349492, 20220401, 20220430)