fetch_rb_events_intranet_by_filter: Download data on events for all pages in the research...

Description Usage Arguments Details Value

View source: R/briefings-events.R

Description

fetch_rb_events_intranet_by_filter downloads data on event metrics for all research briefings on the Parliamentary intranet during the given dates, with the given filters, and returns the data as a tibble.

Usage

1
2
3
4
5
6
7
8
9
fetch_rb_events_intranet_by_filter(
  start_date,
  end_date,
  by_date = FALSE,
  by_page = FALSE,
  dim_filters = NULL,
  anti_sample = FALSE,
  use_resource_quotas = FALSE
)

Arguments

start_date

The start date as an ISO 8601 string.

end_date

The end date as an ISO 8601 string.

by_date

A boolean indicating whether to return the results broken down by date. The default is FALSE.

by_page

A boolean indicating whether to return the results broken down by page. The default is FALSE.

dim_filters

A set of dimension filters to constrain the results. The default is NULL.

anti_sample

A boolean indicating whether to use googleAnalyticsR's anti-sample feature, which chunks API calls to keep the number of records requested under the API limits that trigger sampling. This makes the download process slower but ensures that all records are returned. Only use this feature if you see that an API request triggers sampling without it. The default is FALSE.

use_resource_quotas

A boolean indicating whether to use the resource quotas in Parliament's Google Analytics account to prevent sampling. This is a faster and more effective way to disable sampling than using anti_sample, but using resource quotas consumes tokens from a limited daily quota. Use this when anti_sample still fails to prevent sampling or is taking too long. Note that using resource quotas takes precendence over anti-samping: if use_resource_quotas is TRUE anti_sample is automatically set to FALSE. The default is FALSE.

Details

Note that this is not all research briefing events, as it does not include events on the research briefings pages on the main Parliament website. Use fetch_rb_events_public_by_filter to retrieve equivalent data for the main Parliament website.

Value

A tibble of document download metrics.


olihawkins/clga documentation built on Sept. 17, 2020, 7:19 a.m.