Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/spyrales/gouvdown

French government design system for R Markdown
https://github.com/spyrales/gouvdown

dsfr ggplot2-theme programme10pourcent r rmarkdown

Last synced: 3 months ago
JSON representation

French government design system for R Markdown

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

# gouvdown

[![R build status](https://github.com/spyrales/gouvdown/workflows/R-CMD-check/badge.svg)](https://github.com/spyrales/gouvdown/actions)
[![Codecov test coverage](https://codecov.io/gh/spyrales/gouvdown/branch/master/graph/badge.svg)](https://codecov.io/gh/spyrales/gouvdown?branch=master)

**gouvdown** let you write R Markdown documents which comply with the French
government design system.

## Installation

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

``` r
# install.packages("remotes")
remotes::install_github("spyrales/gouvdown")
```

## Palettes

**gouvdown** provides the official colors and a set of palettes.

```{r palettes, echo=FALSE}
pal <- gouvdown::gouv_palettes
labels <- names(pal)

do.call(
pals::pal.bands,
c(pal, list(labels = labels, gap = 0.2, main = "gouvdown palettes"))
)
```

## Theme

**gouvdown** provides themes for `{ggplot2}` graphics and maps.

```{r theme, echo = FALSE, warning = FALSE, message = FALSE}
library(ggplot2)
library(gouvdown)
ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width)) +
geom_point(aes(color = Species, shape = Species)) +
labs(
x = "Sepal Length", y = "Sepal Width", title = "Sepal Length-Width",
subtitle = "with theme_gouv()"
) +
theme_gouv() +
scale_color_gouv_discrete(palette = "pal_gouv_qual1")
```

## Rmarkdown

### html_document

**gouvdown** provides a html template for `{Rmarkdown}`

![](man/figures/html_gouv.png)

### bookdown

**gouvdown** provides a bookdown project template for `{bookdown}`

![](man/figures/gouvbook.png)

### Word output format

**gouvdown** provides a word template for `{Rmarkdown}` for writing an official letter.

## References

+ Design system:
+ Example: