Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/rjake/headliner


https://github.com/rjake/headliner

hacktoberfest

Last synced: 8 days ago
JSON representation

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
comment = "#>"
)
```

# headliner

[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/headliner)](https://cran.r-project.org/package=headliner/)
[![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/headliner)](https://cran.r-project.org/package=headliner)
[![codecov](https://codecov.io/gh/rjake/headliner/branch/main/graph/badge.svg)](https://app.codecov.io/gh/rjake/headliner/)
[![R-CMD-check](https://github.com/rjake/headliner/workflows/R-CMD-check/badge.svg)](https://github.com/rjake/headliner/actions/)

The goal of `headliner` is to translate facts into insights. Given two values, `headliner` generates building blocks for creating dynamic text. These talking points can be combined using using `glue` syntax to add informative titles to plots, section headers or other text in a report.

## Installation

You can install the dev version of `headliner` from [github](https://github.com/rjake/headliner) with:

``` r
devtools::install_github("rjake/headliner")
```

Let's look at some of the talking points for the difference between 5 and 7:
```{r}
library(headliner)

compare_values(5, 7) |> # returns a list
view_list() # show as a data frame
```

We can string the talking points together like this:

```{r}
headline(
x = 5,
y = 7,
headline = "There was {article_delta_p}% {trend} ({orig_values})"
)
```

See [here](https://rjake.github.io/headliner/articles/intro.html) for a longer introduction.