get_rawcounts: get_rawcounts using estimates from Comscore

View source: R/arima-spikes-onegeo.R

get_rawcountsR Documentation

get_rawcounts using estimates from Comscore

Description

get_rawcounts using estimates from Comscore

Usage

get_rawcounts(
  df,
  month = 2,
  pct_desktop = 0.35,
  geo = "US",
  interrupt = "2020-03-01",
  qf_denominator = 1e+07,
  endperiod = T,
  numobspermonth = NA
)

Arguments

df

The dataframe as outputted by run_arima.

month

1 or 2, 1 is the earlier month and 2 is the later. Default 2

pct_desktop

Assumption of the percentage of searches that are executed on Desktops. Default 0.35

geo

Location

interrupt

The date of the interruption (should be the same as run_arima)

qf_denominator

Denominator for fractions given in gtrendspy. Default 10M.

endperiod

Compute raw counts from the interrupt to an enddate

Examples

get_rawcounts <- function(
  df,
  month = 2,
  pct_desktop = 0.35,
  geo = "US",
  interrupt = "2020-03-01",
  qf_denominator = 10000000,
  endperiod = T
  )

tlcaputi/gtrendR documentation built on Nov. 3, 2022, 10:46 p.m.