Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/spyrales/gouvdown
- Owner: spyrales
- License: eupl-1.2
- Created: 2020-04-23T15:03:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-20T14:03:42.000Z (about 1 year ago)
- Last Synced: 2024-08-03T17:12:25.761Z (6 months ago)
- Topics: dsfr, ggplot2-theme, programme10pourcent, r, rmarkdown
- Language: R
- Homepage: https://spyrales.github.io/gouvdown/
- Size: 15.4 MB
- Stars: 49
- Watchers: 8
- Forks: 4
- Open Issues: 26
-
Metadata Files:
- Readme: README.Rmd
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- frrrenchies - gouvdown
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: