-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.Rmd
90 lines (62 loc) · 2.14 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# gouvdown
<!-- badges: start -->
[![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)
<!-- badges: end -->
**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: <https://www.gouvernement.fr/charte/charte-graphique-les-fondamentaux/introduction>
+ Example: <https://github.com/DISIC/design.numerique.gouv.fr/tree/master/src/assets>