multi_sector_timeline: Multi Sector Timeline

View source: R/timeline.R

multi_sector_timelineR Documentation

Multi Sector Timeline

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_sector_timeline(sector, custom_sector = NULL, start_date, end_date,
  scoring, moving_average = 1, period_type = "day", period_size = 1,
  endpoint = "timeline/multi-brand-file.csv")

Arguments

sector

A string of the format region:sector_id[:demo_filters][:metric_filters][:metrics]. Can be provided multiple times - if so, multiple sectors will be listed.

custom_sector

A string of the format region:custom_sector_id[:demo_filters][:metric_filters][:metrics]. Mutliple can be listed.

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

You must provide one of sector or custom_sector, but not both.

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 for multiple sector timeline datapoins.


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