podlove_baseplot_multi: Construct a basic podcast download ridgeline plot

Description Usage Arguments Value Examples

View source: R/podlove_baseplot_multi.R

Description

Creates the basic ridge line plot to display Podlove download data over time, using ggplot2(). Includes an optional grouping variable and a switcher between cumulative/non-cumulative data.

Usage

1
podlove_baseplot_multi(df_tidy_data, gvar = "Total", cumulative = TRUE, ...)

Arguments

df_tidy_data

A tidy data frame with download data, as constructed by podlove_prepare_stats_for_graph()

gvar

Optional grouping parameter string (e.g. "title"), handed over to ggplot2::aes_string(color). Must correspond to the data structure in df_tidy_data.

cumulative

Boolean switch to show either cumulative data (TRUE, default), or non-comulative data (FALSE)

...

Additional parameters to be handed over to ggplot2::geom_density_ridge()

Value

A ggplot2 plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
#prepare data
gdata <- podlove_prepare_stats_for_graph(podcast_example_data, gvar = title)

# line graph with cumulative data (grouped by title)
podlove_baseplot(plot_data, gvar = "title", cumulative = TRUE)

# line graph with non-cumulative data
podlove_baseplot(plot_data, gvar = "title", cumulative = FALSE)

# line graph with non-cumulative data and additional formating paramters
gdata <- podlove_prepare_stats_for_graph(podcast_example_data)
podlove_baseplot(plot_data, cumulative = TRUE,
                 color = "white", fill = "#6699CC", scale = 2)

## End(Not run)

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