Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mkearney/rreddit
𝐫⟋ Get Reddit data
https://github.com/mkearney/rreddit
mkearney-r-package pushshift r r-package reddit reddit-api rstats social-media web-scraping
Last synced: about 1 month ago
JSON representation
𝐫⟋ Get Reddit data
- Host: GitHub
- URL: https://github.com/mkearney/rreddit
- Owner: mkearney
- License: other
- Created: 2018-12-28T08:33:58.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-06T01:16:13.000Z (about 5 years ago)
- Last Synced: 2023-03-07T20:36:17.711Z (almost 2 years ago)
- Topics: mkearney-r-package, pushshift, r, r-package, reddit, reddit-api, rstats, social-media, web-scraping
- Language: R
- Homepage: https://github.com/mkearney/rreddit
- Size: 97.7 KB
- Stars: 51
- Watchers: 5
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r setup, include = FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse = TRUE, comment = "#>")
```
# rreddit[![Build status](https://travis-ci.org/mkearney/rreddit.svg?branch=master)](https://travis-ci.org/mkearney/rreddit)
[![CRAN status](https://www.r-pkg.org/badges/version/rreddit)](https://cran.r-project.org/package=rreddit)
[![Coverage Status](https://codecov.io/gh/mkearney/rreddit/branch/master/graph/badge.svg)](https://codecov.io/gh/mkearney/rreddit?branch=master)[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
> A package for getting lots of [Reddit](https://reddit.com) data.
## Installation
Install the development version from Github with:
``` r
## install remotes pkg if not already
if (!requireNamespace("remotes")) {
install.packages("remotes")
}## install from github
remotes::install_github("mkearney/rreddit")
```## Use
An example of posts collected from the [r/dataisbeautiful](https://reddit.com/r/dataisbeautiful) subreddit
```{r, eval = FALSE}
## 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"
)
```