podlove_prepare_stats_for_graph: Prepare Podlove data for graphical rendering

Description Usage Arguments Examples

View source: R/podlove_prepare_stats_for_graph.R

Description

Takes clean Podlove data and prepares it to be rendered with ggplot2. The function accepts one or more grouping variables (e.g. episode title) and accepts parameters for the time axis of downloads.

Usage

1
2
3
4
5
6
7
8
podlove_prepare_stats_for_graph(
  df_stats,
  gvar,
  time_unit = "days",
  relative = TRUE,
  last_n = 0,
  ...
)

Arguments

df_stats

A data frame of clean Podlove data, as rendered by podlove_get_and_clean() or podlove_clean_stats.

gvar

Optional grouping variable(s), unquoted.

time_unit

quoted time unit to group by: "hours", "days", "weeks", "months", "years"

relative

Boolean switching parameter to define if the data is rendered relative to the respective episode release date (TRUE) or in absolute dates (TRUE). Defaults to TRUE.

last_n

Number of most recent episodes to filter for. Defaults to 0 (no filtering), use negative numbers to filter for first n episodes.

...

Depreciated arguments

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# relative, daily plot by episode title
podlove_prepare_stats_for_graph(podcast_example_data, gvar = title) 

# relative, hourly plot by episode number
podlove_prepare_stats_for_graph(podcast_example_data, gvar = ep_number, hourly = TRUE) 

# absolute, daily plot by episode title
podlove_prepare_stats_for_graph(podcast_example_data, gvar = title, relative = FALSE) 

# abolute, hourly plot by podcast client name
podlove_prepare_stats_for_graph(podcast_example_data, gvar = client_name, relative = FALSE) 

## End(Not run)

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