Motivation

Lucy McGowan looked into the growth of ‘Drunk’ Podcasts in her recent blog post. She found a huge growth in that “genre” (if you will). Moreover, she expresses that:

While it is certainly true that the number of podcasts in general has absolutely increased over this time period, I would be surprised if the increase is as dramatic as the increase in the number of “drunk” podcasts.

I was skeptical about this claim and wanted to look into trends in other general categories. Also, I wanted an excuse to use emojis in plots. :)

Code time!

Load libraries:

library(dplyr);library(ggplot2);library(ggrepel); library(extrafont); library(ggthemes);library(reshape);library(grid);
library(scales);library(RColorBrewer);library(gridExtra); library(emoGG)

Define my plot theme (for graphics that will come later) as usual:

#Define theme for my visuals
my_theme <- function() {
  # Define colors for the chart
  palette <- brewer.pal("Greys", n=9)
  color.background = palette[2]
  color.grid.major = palette[4]
  color.panel = palette[3]
  color.axis.text = palette[9]
  color.axis.title = palette[9]
  color.title = palette[9]
  # Create basic construction of chart
  theme_bw(base_size=9, base_family="Palatino") + 
  # Set the entire chart region to a light gray color
  theme(panel.background=element_rect(fill=color.panel, color=color.background)) +
  theme(plot.background=element_rect(fill=color.background, color=color.background)) +
  theme(panel.border=element_rect(color=color.background)) +
  # Format grid
  theme(panel.grid.major=element_line(color=color.grid.major,size=.25)) +
  theme(panel.grid.minor=element_blank()) +
  theme(axis.ticks=element_blank()) +
  # Format legend
  theme(legend.position="right") +
  theme(legend.background = element_rect(fill=color.background)) +
  theme(legend.text = element_text(size=7,color=color.axis.title)) + 
  theme(legend.title = element_text(size=0,face="bold", color=color.axis.title)) + 
  
  #Format facet labels
  theme(strip.text.x = element_text(size = 8, face="bold"))+
  # Format title and axes labels these and tick marks
  theme(plot.title=element_text(color=color.title, size=18, face="bold")) +
  theme(axis.text.x=element_text(size=6,color=color.axis.text)) +
  theme(axis.text.y=element_text(size=6,color=color.axis.text)) +
  theme(axis.title.x=element_text(size=0,color=color.axis.title, vjust=-1, face="bold")) +
  theme(axis.title.y=element_text(size=0,color=color.axis.title, vjust=1.8, face="bold")) +
  #Format title and facet_wrap title
  theme(strip.text = element_text(size=8), plot.title = element_text(size = 10, face = "bold", colour = "black", vjust = 1, hjust=0.5))+
    
  # Plot margins
  theme(plot.margin = unit(c(.2, .2, .2, .2), "cm"))
}

Many of the next chunks are directly adapted straight from Lucy’s shared code–thanks Lucy! I search for different terms and finesse my plots differently but Lucy should be given credit for the base code.

For plots, I scrolled through emojis and procured their unicode codes here. I could have also used emoji_search in the emoGG package if I knew the names of the emojis I wanted.

‘Comedy’ Podcasts

Pull data:

req <- httr::GET(url = "https://itunes.apple.com/search",
          query = list(
            term = "comedy",
            media = "podcast",
            limit = 200
          ))
itunes <- jsonlite::fromJSON(httr::content(req))$results

Plot:

comedy<-itunes %>%
  mutate(date = as.Date(releaseDate),monyear = zoo::as.yearmon(date)) %>%
  group_by(monyear) %>%
  summarise(n = n()) %>%
  mutate(date = zoo::as.Date(monyear)) %>%
  ggplot(aes(x = date,y=n)) +
    scale_x_date(date_breaks = "1 year", date_labels = "%Y") +
    scale_y_continuous(limits=c(0, 150), breaks=seq(0,150,25))+
    emoGG::geom_emoji(emoji="1f602") + 
    labs(title="'Comedy' podcast releases") +
    my_theme()

‘Politics’ Podcasts

Pull data:

req <- httr::GET(url = "https://itunes.apple.com/search",
          query = list(
            term = "politics",
            media = "podcast",
            limit = 200
          ))
itunes <- jsonlite::fromJSON(httr::content(req))$results

Plot:

politics<-itunes %>%
  mutate(date = as.Date(releaseDate),monyear = zoo::as.yearmon(date)) %>%
  group_by(monyear) %>%
  summarise(n = n()) %>%
  mutate(date = zoo::as.Date(monyear)) %>%
  ggplot(aes(x = date,y=n)) +
    scale_x_date(date_breaks = "1 year", date_labels = "%Y") +
    scale_y_continuous(limits=c(0, 150), breaks=seq(0,150,25))+
    emoGG::geom_emoji(emoji="270a") + 
    labs( title="'Politics' podcast releases") +
    my_theme()

‘Sports’ Podcasts

Pull data:

req <- httr::GET(url = "https://itunes.apple.com/search",
          query = list(
            term = "sports",
            media = "podcast",
            limit = 200
          ))
itunes <- jsonlite::fromJSON(httr::content(req))$results

Plot:

sports<-itunes %>%
  mutate(date = as.Date(releaseDate),monyear = zoo::as.yearmon(date)) %>%
  group_by(monyear) %>%
  summarise(n = n()) %>%
  mutate(date = zoo::as.Date(monyear)) %>%
  ggplot(aes(x = date,y=n)) +
    scale_x_date(date_breaks = "1 year", date_labels = "%Y") +
    emoGG::geom_emoji(emoji="26bd") + 
    scale_y_continuous(limits=c(0, 150), breaks=seq(0,150,25))+
    labs(title="'Sports' podcast releases") +
    my_theme()

‘Science’ Podcasts

Pull data:

req <- httr::GET(url = "https://itunes.apple.com/search",
          query = list(
            term = "science",
            media = "podcast",
            limit = 200
          ))
itunes <- jsonlite::fromJSON(httr::content(req))$results

Plot:

science<-itunes %>%
  mutate(date = as.Date(releaseDate),monyear = zoo::as.yearmon(date)) %>%
  group_by(monyear) %>%
  summarise(n = n()) %>%
  mutate(date = zoo::as.Date(monyear)) %>%
  ggplot(aes(x = date,y=n)) +
    scale_x_date(date_breaks = "1 year", date_labels = "%Y") +
    scale_y_continuous(limits=c(0, 150), breaks=seq(0,150,25))+
    emoGG::geom_emoji(emoji="1f52c") + 
    labs(title="'Science' podcast releases") +
    my_theme()

The final product!

Now, I can combine all four plots into one aggregated piece of evidence that, wow, yeah, lots of podcasts have seen dramatic increases in 2017!

grid.arrange(comedy, sports, politics, science, ncol=2, nrow=2, top=textGrob("A rising tide lifts all podcasts", gp=gpar(fontsize=20, fontfamily="Palatino")), bottom=textGrob("Alex Albright | thelittledataset.com", hjust=-.45, gp=gpar(fontsize=10, font=3, fontfamily="Palatino")))

Yay for geom_emoji in the emoGG package! Does anyone know how to alter the skin tone for the “fist” emoji? While I know the emoji itself supports skin tone modifiers, I could not figure out how to incorporate modifiers in the context of geom_emoji.

Now, let’s save this as a pdf.

#save to pdf
pdf("pods.pdf", width = 7, height = 7) # Open a new pdf file
grid.arrange(comedy, sports, politics, science, ncol=2, nrow=2, top=textGrob("A rising tide lifts all podcasts", gp=gpar(fontsize=20, fontfamily="Palatino")), bottom=textGrob("Alex Albright | thelittledataset.com", hjust=-.45, gp=gpar(fontsize=10, font=3, fontfamily="Palatino"))) # Write the grid.arrange to a pdf file
dev.off()
null device 
          1 

The end!

LS0tCnRpdGxlOiAiQSByaXNpbmcgdGlkZSBsaWZ0cyBhbGwgcG9kY2FzdHMiCmF1dGhvcjogQWxleCBBbGJyaWdodApkYXRlOiA3LTI2LTE3Cm91dHB1dDogaHRtbF9ub3RlYm9vawotLS0KI01vdGl2YXRpb24KCkx1Y3kgTWNHb3dhbiBsb29rZWQgaW50byB0aGUgZ3Jvd3RoIG9mICdEcnVuaycgUG9kY2FzdHMgaW4gaGVyIHJlY2VudCBbYmxvZyBwb3N0Ll0oaHR0cDovL2xpdmVmcmVlb3JkaWNob3RvbWl6ZS5jb20vMjAxNy8wMi8wOS90aGUtcHJldmFsZW5jZS1vZi1kcnVuay1wb2RjYXN0cy8pIFNoZSBmb3VuZCBhIGh1Z2UgZ3Jvd3RoIGluIHRoYXQgImdlbnJlIiAoaWYgeW91IHdpbGwpLiBNb3Jlb3Zlciwgc2hlIGV4cHJlc3NlcyB0aGF0OgoKPiBXaGlsZSBpdCBpcyBjZXJ0YWlubHkgdHJ1ZSB0aGF0IHRoZSBudW1iZXIgb2YgcG9kY2FzdHMgaW4gZ2VuZXJhbCBoYXMgYWJzb2x1dGVseSBpbmNyZWFzZWQgb3ZlciB0aGlzIHRpbWUgcGVyaW9kLCBJIHdvdWxkIGJlIHN1cnByaXNlZCBpZiB0aGUgaW5jcmVhc2UgaXMgYXMgZHJhbWF0aWMgYXMgdGhlIGluY3JlYXNlIGluIHRoZSBudW1iZXIgb2Yg4oCcZHJ1bmvigJ0gcG9kY2FzdHMuCgpJIHdhcyBza2VwdGljYWwgYWJvdXQgdGhpcyBjbGFpbSBhbmQgd2FudGVkIHRvIGxvb2sgaW50byB0cmVuZHMgaW4gb3RoZXIgZ2VuZXJhbCBjYXRlZ29yaWVzLiBBbHNvLCBJIHdhbnRlZCBhbiBleGN1c2UgdG8gdXNlIGVtb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