Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/dataobservatory-eu/reprextemplates


https://github.com/dataobservatory-eu/reprextemplates

Last synced: 27 days ago
JSON representation

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%"
)
```

# reprextemplates

[![dataobservatory](https://img.shields.io/badge/ecosystem-dataobservatory.eu-3EA135.svg)](https://dataobservatory.eu/)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/dataobservatory-eu/reprextemplates?branch=main&svg=true)](https://ci.appveyor.com/project/dataobservatory-eu/reprextemplates)

[![Codecov test coverage](https://codecov.io/gh/dataobservatory-eu/reprextemplates/branch/main/graph/badge.svg)](https://app.codecov.io/gh/dataobservatory-eu/reprextemplates?branch=main)

The goal of reprextemplates is to provide reproducible visual assets for Reprex BV and its collaboration partners.

## Installation

You can install the development version of reprextemplates from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("dataobservatory-eu/reprextemplates")
```

## Example

Create a Reprex color palette and add three levels of grey:

```{r example}
library(reprextemplates)
add_greys( pal = reprex_palette(), c(40,60,80))
```

```{r templateexample, message=FALSE}
library(dplyr)
library(ggplot2)
library(reprextemplates)

data.frame (
Color = names(reprex_palette()),
HEX = as.character(reprex_palette()),
values = rep(1,12)
) %>%
ggplot( aes (x = Color,
y = values,
fill = Color)) +
geom_col() +
scale_fill_manual( values = reprex_palette()) +
theme_minimal() +
labs ( y = NULL, x = NULL, title = "Reprex & Observatory Color Palette") +
theme(axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank(),
panel.grid.major = element_blank())

```

## Code of Conduct

Please note that the reprextemplates project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.