io: Retrieve and read MixPanel CSV files

Description Usage Arguments Details Value

Description

Retrieve and read MixPanel CSV files

Usage

1
2
3
retrieve(destination = R_user_dir("mixpanel", "cache"))

read(tbl, ..., is_retention_report = FALSE)

Arguments

destination

character(1) location of the local cache. The default is the standard operating system location for R packages.

tbl

A tibble returned by retrieve(), typically filtered to select a title of interest.

...

Additional arguments passed to read_csv().

is_retention_report

logical(1). When FALSE (default) process files returned by read_csv() without further modification. When TRUE, remove the $average 'Date' present in some files.

Details

retrieve() visits the Google bucket where AnVIL MixPanel data are stored, and retrieves all *.csv files to a local cache. Files already present in the cache are not re-localized. You will be prompted to authenticate with an account for which shared access to the MixPanel 2021 Google Drive folder.

read() reads several csv files into tibbles, and then binds rows into a single tibble. Column headers with a hyphen -, typically separating date ranges spanning the month, are replaced with DateRangeCount.

Value

retrieve() returns a tibble with columns year, month, title, and path to the localized file. The year, month, and title are parsed from the file name.

read() returns a single tibble.


mtmorgan/mixpanel documentation built on Dec. 21, 2021, 11 p.m.