podlove_create_example_dl_ep: Create Random Podcast Download Data for One Episode

Description Usage Arguments Value Examples

View source: R/podlove_create_example_dl_ep.R

Description

This function generates a tibble with ficticious download data for one podcast episode. It is the core helper function for podlove_create_example_downloads. The function generates three kinds of data: a lognormal (long-tail) curve, a uniform (noise) curve, and several normal distributed peaks. All three distributions are mixed to provide approximate download simulation data.

Usage

1
2
3
4
5
6
7
podlove_create_example_dl_ep(
  n_dls,
  dl_startdate,
  dl_enddate,
  media_file_id,
  seed = NULL
)

Arguments

n_dls

number of downloads (rows) to generate

dl_startdate

start date+time of downloads (episode release), formated as a ymd string (e.g. "2019-01-31 12:31")

dl_enddate

last download date+time

media_file_id

id of the related media file

seed

parameter to fix randomization via set.seed()

Value

a tibble with n_dl download times in seconds after release

Examples

1
2
3
4
podlove_create_example_dl_ep(n_dls = 1000,
                             dl_startdate = "2019-01-01",
                             dl_enddate = "2019-12-31",
                             media_file_id = 105)

lordyo/podlover documentation built on Feb. 20, 2020, 5:58 p.m.