Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mcguinlu/nightvale

Get a random Welcome to Night Vale proverb in R
https://github.com/mcguinlu/nightvale

git-scraping nightvale proverb r r-package rstats

Last synced: about 1 month ago
JSON representation

Get a random Welcome to Night Vale proverb in R

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# nightvale

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![GitHub Actions](https://github.com/mcguinlu/nightvale/actions/workflows/scrape_data.yml/badge.svg)](https://github.com/mcguinlu/nightvale/actions)


## Background

[Welcome to Night Vale](http://www.welcometonightvale.com/) is a twice-monthly podcast in the style of community updates for the small desert town of Night Vale, with heavy themes of surreal humor and horror. A key and recurring part of the show is "Today's Proverb". This package provides the metadata and proverb for each episode as a dataset, in addition to a function to return a nicely formatted proverb to the console.

## Installation

This package is a GitHub only package, and can be installed using:

``` {r, eval = FALSE}
# install.packages("devtools")
devtools::install_github("mcguinlu/nightvale")
```

## Usage

### Access the data

```{r eval=TRUE}
library(nightvale)

head(proverb_data)
```

### Get a random proverb

```{r eval=TRUE}
proverb()
```

### Get a specific proverb

```{r eval=TRUE}
proverb(22)
```

## Git Scraping

The Welcome to Night Vale podcast continues to release a new show every two weeks. In order to capture the proverbs from these new episodes, this project also contains a GitHub Action that automatically re-scrapes the [community-maintained table of proverbs](https://nightvale.fandom.com/wiki/List_of_Proverbs) every week. When new proverbs are identified, the proverb dataset included as part of this package is updated.

To get the most up-to-date version of the proverb dataset, simply re-install the package using:

``` {r, eval = FALSE}
devtools::install_github("mcguinlu/nightvale")
```