Description Usage Arguments Value See Also Examples
View source: R/podlove_graph_download_curves.R
Based on a prepared dataset, this function creates a line curve diagram
of downloads over time. It takes an optional grouping variable (e.g.
title) as well as options for cumulative display, labeling and
print output. For more finetuning options, use the podlove_baseplot()
function and add geoms to your liking.
1 2 3 4 5 6 7 8 9 10 11 |
df_tidy_data |
A tidy data frame with download data, as constructed
by |
gvar |
Optional grouping parameter (e.g. episode title), handed over
to |
cumulative |
Boolean switch to show either cumulative data (TRUE, default), or non-comulative data (FALSE) |
plot_type |
Sets the plot type to either line plot ( |
labelmethod |
Defines where should the labels be attached
(at the beinning of the curves: |
limit |
Boolean switch to fix axis limtis (relevant when adding smoothers) |
legend |
Boolean switch to add a legend' |
printout |
Switcher to automatically print out the plot (default TRUE) |
... |
additional formating parameters for |
A ggplot object
podlove_prepare_stats_for_graph()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
# relative, daily plot by episode title, cumulative
data("podcast_example_data")
gdata <- podlove_prepare_stats_for_graph(podcast_example_data, gvar = title)
podlove_graph_download_curves(gdata, gvar = title, cumulative = TRUE)
# relative, hourly plot by episode number, cumulative
gdata <- podlove_prepare_stats_for_graph(podcast_example_data,
gvar = ep_number, hourly = TRUE)
podlove_graph_download_curves(gdata, gvar = ep_number, cumulative = TRUE)
# absolute, daily plot by episode title, noncumulative, with labels at the beginning
gdata <- podlove_prepare_stats_for_graph(podcast_example_data,
gvar = title, relative = FALSE)
podlove_graph_download_curves(gdata, gvar = title, cumulative = FALSE,
labelmethod = "first.points")
# abolute, hourly plot by podcast client name, cumulative
gdata <- podlove_prepare_stats_for_graph(podcast_example_data,
gvar = client_name, relative = FALSE)
podlove_graph_download_curves(gdata, gvar = client_name, cumulative = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.