Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rjake/headliner
https://github.com/rjake/headliner
hacktoberfest
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rjake/headliner
- Owner: rjake
- License: other
- Created: 2020-09-05T00:26:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-23T03:36:20.000Z (almost 2 years ago)
- Last Synced: 2024-08-13T07:11:27.071Z (4 months ago)
- Topics: hacktoberfest
- Language: R
- Homepage: https://rjake.github.io/headliner
- Size: 4.5 MB
- Stars: 44
- Watchers: 3
- Forks: 1
- Open Issues: 15
-
Metadata Files:
- Readme: README.Rmd
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - rjake/headliner - (R)
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.