Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


linea (version 0.1.1)

gt_f: apply_normalisation

Description

Normalise data based on pool mean

Usage

gt_f(
  data,
  kw,
  date_col = "date",
  date_type = "weekly starting",
  geo = "all",
  append = TRUE
)

Value

data.frame of the original data with the added google trend column

Arguments

data

data.frame containing data for analysis

kw

a string of the search keyword

date_col

a string specifying the date column name

date_type

The date column type as either of the following strings:'weekly starting','weekly ending','daily'

geo

a string specifying the country code of the search found in countrycode::codelist

append

a boolean specifying whether to return the original data.frame as well as the added column

Details

Normalise data by dividing all values in each pool by that pool's mean

Examples

Run this code
data = read_xcsv("https://raw.githubusercontent.com/paladinic/data/main/ecomm_data.csv") %>% 
  gt_f(kw = 'covid') %>% 
  gt_f(kw = 'bitcoin')

Run the code above in your browser using DataLab