scenarioplanner.converters.mmm.MarketingData

A wrapper for MarketingData proto with derived properties.

date_intervals Returns all date intervals in the marketing data.
media_channels Returns unique (non-R&F) media channel names in the marketing data.
rf_channels Returns unique R&F channel names in the marketing data.
marketing_data_proto Dataclass field

Methods

all_channel_spends

View source

Returns all channel names mapped to their total spend values, for the given date interval.

All channel spends in time coordinates between [start, end) of the given date interval are summed up.

Args
date_interval the date interval to query for

Returns
A dict of channel names mapped to their total spend values, for the given date interval.

media_channel_spends

View source

Returns non-RF media channel names mapped to their total spend values, for the given date interval.

All channel spends in time coordinates between [start, end) of the given date interval are summed up.

Args
date_interval the date interval to query for

Returns
A dict of channel names mapped to their total spend values, for the given date interval.

rf_channel_spends

View source

Returns Reach and Frequency channel names mapped to their total spend values, for the given date interval.

All channel spends in time coordinates between [start, end) of the given date interval are summed up.

Args
date_interval the date interval to query for

Returns
A dict of channel names mapped to their total spend values, for the given date interval.

__eq__

Return self==value.