multi_brand_timeline: Multi-Brand Timeline File

View source: R/timeline.R

multi_brand_timelineR Documentation

Multi-Brand Timeline File

Description

This endpoint is similar to simple timeline files, but instead of representing the data for one brand only it can contaim more than one brand per file.

Usage

multi_brand_timeline(brand, start_date, end_date, scoring, moving_average = 1,
  period_type = "day", period_size = 1,
  endpoint = "timeline/multi-brand-file.csv")

Arguments

brand

A string of the format region:sector_id:brand_id[:demo_filters][:metric_filters]. Can be provided multiple times - if so, multiple brands will be listed in the response data and will look like the following ("us:1023:1000575&brand=us:1023:1000564").

start_date

A string in the format YYYY-MM-DD.

end_date

A string in the format YYYY-MM-DD.

scoring

A string containing the scoring option to use (default: "total", "aware", "opinion").

moving_average

A number of the moving_average, in days, to be applied.

period_type

A string for the type of period, if rollling up the datapoints (default: "day", "week", "month", "year").

period_size

A number for the size of the period (default: 1). 2 for rolling up "every 2 weeks".

endpoint

A string containing the appropriate endpoint.

Details

It's also possible to roll up the data in periods - for this, see period_type and period_size parameters. In this case, when periodizing for more than "every 1 day" (which is the default, i.e., no roll-up done), the first date of each period is used in the resulting data.

Value

A tibble of multiple brand datapoints.


beigebrucewayne/brandindexr documentation built on July 19, 2023, 11:23 p.m.