# scenarioplanner.converters.mmm.MarketingData

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/google/meridian/blob/v2.2.2/scenarioplanner/converters/mmm.py#L597-L711) |

A wrapper for `MarketingData` proto with derived properties.

```python
scenarioplanner.converters.mmm.MarketingData(
    marketing_data_proto: marketing_data_pb.MarketingData
)
```

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `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 |

<br />

## Methods

### `all_channel_spends`

[View source](https://github.com/google/meridian/blob/v2.2.2/scenarioplanner/converters/mmm.py#L694-L711)

```python
all_channel_spends(
    date_interval: tc.DateInterval
) -> dict[str, float]
```

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.

<br />

<br />

<br />

| Args ||
|---|---|
| `date_interval` | the date interval to query for |

<br />

<br />

<br />

<br />

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

<br />

### `media_channel_spends`

[View source](https://github.com/google/meridian/blob/v2.2.2/scenarioplanner/converters/mmm.py#L636-L663)

```python
media_channel_spends(
    date_interval: tc.DateInterval
) -> dict[str, float]
```

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.

<br />

<br />

<br />

| Args ||
|---|---|
| `date_interval` | the date interval to query for |

<br />

<br />

<br />

<br />

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

<br />

### `rf_channel_spends`

[View source](https://github.com/google/meridian/blob/v2.2.2/scenarioplanner/converters/mmm.py#L665-L692)

```python
rf_channel_spends(
    date_interval: tc.DateInterval
) -> dict[str, float]
```

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.

<br />

<br />

<br />

| Args ||
|---|---|
| `date_interval` | the date interval to query for |

<br />

<br />

<br />

<br />

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

<br />

### `__eq__`

```python
__eq__(
    other
)
```

Return self==value.