knitr::opts_chunk$set(echo = TRUE, collapse = TRUE, comment = "#>")
A package for getting lots of Reddit data.
Install the development version from Github with:
## install remotes pkg if not already if (!requireNamespace("remotes")) { install.packages("remotes") } ## install from github remotes::install_github("mkearney/rreddit")
An example of posts collected from the r/dataisbeautiful subreddit
## get up to 100,000 of the most recent posts made to /r/dataisbeautiful d <- get_r_reddit("dataisbeautiful", n = 100000) ## aggregate by month and plot the time series rtweet::ts_plot(dplyr::select(d, created_at = created_utc), "months", trim = 1) + tfse::theme_mwk(base_size = 12) + ggplot2::ylim(0, NA) + ggplot2::labs( x = NULL, y = NULL, title = "Activity on `r/dataisbeautiful` subreddit", subtitle = "Monthly number of submissions on r/dataisbeautiful" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.