# Analysis package: Podlover

**URL:** <https://community.podlove.org/t/analysis-package-podlover/2013>\
**Category:** Analytics\
**Created:** [January 7, 2020, 5:12pm UTC](https://community.podlove.org/t/analysis-package-podlover/2013 "2020-01-07T17:12:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lordampersand](https://community.podlove.org/user_avatar/community.podlove.org/lordampersand/32/679_2.png) [@lordampersand](https://community.podlove.org/u/lordampersand)\
**Post date:** [January 7, 2020, 5:12pm UTC](https://community.podlove.org/t/analysis-package-podlover/2013/1 "2020-01-07T17:12:26Z")

</div>

Over the holidays, I’ve taken my initial code to analyze Podlove downloads in R and have written a real R package for it.

Here it is it’s called **podlover** :

> **[lordyo/podlover](https://github.com/lordyo/podlover)**
>
> Get and analyze download stats from the Wordpress podcasting add-on "Podlove Publisher" - lordyo/podlover

The package can do many more things than the functions before:

- Fetch necessary tables from the Wordpress MySQL
- Connect and clean tables for download analysis (either directly from the database or via local CSV files)
- Plot download curves by episode title, episode number, source, context, client\_name, client\_type, os\_name or any other user-generated variable (plots are available with cumulated or non-cumulated data, with relative or absolute release dates, and with all kinds of graphical output options)
- Generate average performance tables per episode for total and average downloads as well as average downloads for specific periods (e.g. the first three days after launch)
- Analyze performance of launch against post-launch in a four-box grid
- Create regression models of downloads against episodes or episode launch dates at a specific point in time (similar to @rahra 's approach), both as statistical models with coefficients and graphically
- Create example podcast data to play around with the package

All functions are documented in help files. The README.md on GitHub (=package vignette) shows many examples and details. Test, feedbacks and contributions are welcome!

---

<div class="post-metadata">

**Author:** ![yoursql719](https://community.podlove.org/user_avatar/community.podlove.org/yoursql719/32/299_2.png) [@yoursql719](https://community.podlove.org/u/yoursql719)\
**Post date:** [January 9, 2020, 2:23pm UTC](https://community.podlove.org/t/analysis-package-podlover/2013/2 "2020-01-09T14:23:19Z")

</div>

Looks great - can your add-on work with show module podcasts?

---

<div class="post-metadata">

**Author:** ![lordampersand](https://community.podlove.org/user_avatar/community.podlove.org/lordampersand/32/679_2.png) [@lordampersand](https://community.podlove.org/u/lordampersand)\
**Post date:** [January 9, 2020, 2:42pm UTC](https://community.podlove.org/t/analysis-package-podlover/2013/3 "2020-01-09T14:42:39Z")

</div>

Without knowing how shows are represented in the data, my guess is “not yet”. What I would need to know to estimate the effort is:

- Is there a fundamental difference in the data structure as opposed to single podcasts?
- Does use of the show module create new tables or change table definitions?
- What fields in which table define what show an episode belongs to?

---

<div class="post-metadata">

**Author:** ![yoursql719](https://community.podlove.org/user_avatar/community.podlove.org/yoursql719/32/299_2.png) [@yoursql719](https://community.podlove.org/u/yoursql719)\
**Post date:** [January 14, 2020, 9:04am UTC](https://community.podlove.org/t/analysis-package-podlover/2013/4 "2020-01-14T09:04:58Z")

</div>

The data structure is not different - I think there is just one more filter needed, where the podlove post id needs to be sorted a long the show module.

Shows module adds tables to term\_taxonomy and terms and termmeta.

objectid in term\_relationships references to the id of an episode in podlove\_episode

---

<div class="post-metadata">

**Author:** ![lordampersand](https://community.podlove.org/user_avatar/community.podlove.org/lordampersand/32/679_2.png) [@lordampersand](https://community.podlove.org/u/lordampersand)\
**Post date:** [January 14, 2020, 11:23am UTC](https://community.podlove.org/t/analysis-package-podlover/2013/5 "2020-01-14T11:23:55Z")

</div>

So if I understand correctly, shows are related to posts in wp\_posts. Is there a show identifier in wp\_posts itself or does the post\_id relate to another table containing the show label?

It’s a little more work than just the filter - I assume I will have to fetch an additional table to identify the show in a userfriendly way.

---

<div class="post-metadata">

**Author:** ![yoursql719](https://community.podlove.org/user_avatar/community.podlove.org/yoursql719/32/299_2.png) [@yoursql719](https://community.podlove.org/u/yoursql719)\
**Post date:** [January 14, 2020, 11:42am UTC](https://community.podlove.org/t/analysis-package-podlover/2013/6 "2020-01-14T11:42:51Z")

</div>

no objectid of terms\_relationships references to the episode table of podlove of postid.

---

<div class="post-metadata">

**Author:** ![lordampersand](https://community.podlove.org/user_avatar/community.podlove.org/lordampersand/32/679_2.png) [@lordampersand](https://community.podlove.org/u/lordampersand)\
**Post date:** [February 15, 2020, 5:21pm UTC](https://community.podlove.org/t/analysis-package-podlover/2013/7 "2020-02-15T17:21:59Z")

</div>

I’ve published V.1.3.0 of `podlover`, which includes:

- Add summary function option to `podlove_plot_curves()`: This allows you to add an optional curve (e.g. median, mean, max…) to a multi-curve plot, giving a reference to the curves. This is especially useful in cominbation with the `last_n` option, as the summary curve will remain based on the whole set of downloads, not just the ones plotted.
- Add a `limit` function to `podlove_plot_curves()`: In combination with the `last_n` and summary curve option, this allows you to see the either the full picture or just the ones of the last plotted curves.
- Add a `legend` option to `podlove_plot_curves()`. This more classical way to show which curve is which can be used instead of labels inside the plot. Thanks to @PechGehabt for the idea!
- Updates to unit tests, vignette and readme
- Add new time scaling options to `podlove_plot_curves()`: You can now use hourly, daily, weekly, monthly and yearly aggregations.
- Add new options for performance labelling: Allow choice of performance plot labelling variable and introduce a add legend option (displays a reference table)

**Bugfixes**

- Enlarge plotting area in curve plots to ensure labels aren’t cut off
- Reduction of unnecessary messages within functions

The new version can be installed as usual via devtools/GitHub:

```auto
# install devtools if you don't have it already
install.packages("devtools")

# install podlover from GitHub
devtools::install_github("lordyo/podlover")

```

**Examples:**  
Multicurve with legend and aggregation function:  
 ![plotcurves](https://community.podlove.org/uploads/podlove/original/2X/4/4660feb3ebd65379661d2a2834b80ff4739c7c64.png)

Performance Plot with new labels and legend:  
 ![podlover_performance](https://community.podlove.org/uploads/podlove/original/2X/3/3f232bc7451d44258dd303f088b4703bb76b4728.png)

---

<div class="post-metadata">

**Author:** ![yoursql719](https://community.podlove.org/user_avatar/community.podlove.org/yoursql719/32/299_2.png) [@yoursql719](https://community.podlove.org/u/yoursql719)\
**Post date:** [March 2, 2020, 1:02pm UTC](https://community.podlove.org/t/analysis-package-podlover/2013/8 "2020-03-02T13:02:36Z")

</div>

Looks great - have you had the time to have a look at the show module?

---

<div class="post-metadata">

**Author:** ![lordampersand](https://community.podlove.org/user_avatar/community.podlove.org/lordampersand/32/679_2.png) [@lordampersand](https://community.podlove.org/u/lordampersand)\
**Post date:** [March 7, 2020, 8:08am UTC](https://community.podlove.org/t/analysis-package-podlover/2013/9 "2020-03-07T08:08:27Z")

</div>

I have received some sample data from a multi show podcast. I hope I can put that to good use.
