-
Notifications
You must be signed in to change notification settings - Fork 230
/
README.Rmd
113 lines (82 loc) · 3.37 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
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%"
)
```
# esquisse <img src="man/figures/logo.png" width=200 align="right" />
**Try online : https://dreamrs.shinyapps.io/esquisse/**
<!-- badges: start -->
[![version](http://www.r-pkg.org/badges/version/esquisse)](https://CRAN.R-project.org/package=esquisse)
[![cranlogs](http://cranlogs.r-pkg.org/badges/esquisse)](https://CRAN.R-project.org/package=esquisse)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![R-CMD-check](https://github.com/dreamRs/esquisse/workflows/R-CMD-check/badge.svg)](https://github.com/dreamRs/esquisse/actions)
<!-- badges: end -->
This addin allows you to interactively explore your data by visualizing it with the [ggplot2](https://github.com/tidyverse/ggplot2) package. It allows you to draw bar plots, curves, scatter plots, histograms, boxplot and [sf](https://github.com/r-spatial/sf) objects, then export the graph or retrieve the code to reproduce the graph.
See online documentation : https://dreamrs.github.io/esquisse/index.html
Use esquisse online : https://dreamrs.shinyapps.io/esquisse/
If you find bugs, please open an [issue](https://github.com/dreamRs/esquisse/issues)
## Installation
Install from [CRAN](https://CRAN.R-project.org/package=esquisse) with :
```r
install.packages("esquisse")
```
Or install development version from [GitHub](https://github.com/dreamRs/esquisse) :
```r
remotes::install_github("dreamRs/esquisse")
```
Then launch the addin via the RStudio menu or with `esquisse::esquisser()`.
## esquisse addin
```r
esquisse::esquisser()
# or with your data:
esquisse::esquisser(palmerpenguins::penguins)
```
![](man/figures/esquisse.gif)
Above gif was made with :heart: by [@mfanny](https://github.com/mfanny) and cannot be removed, but in the meantime {esquisse} has evolved, the latest version now looks like:
![](man/figures/esquisse.png)
### Internationalization
```{r, include=FALSE}
i18n_flag <- function(code, language) {
code <- strsplit(code, split = "|", fixed = TRUE)[[1]]
flag <- sprintf("<img src=\"man/figures/i18n/%s.svg\" height=\"16\" style=\"height:16px\"/>", code)
paste(paste(flag, collapse = ""), language)
}
i18n_flags <- function(languages) {
mapply(
FUN = i18n_flag,
code = names(languages),
language = unlist(languages, use.names = FALSE),
USE.NAMES = FALSE
)
}
languages <- list(
gb = "english (default)",
fr = "french",
mk = "macedonian",
"br|pt" = "brazilian portuguese",
al = "albanian",
cn = "chinese",
es = "spanish",
# de = "german",
tr = "turkish",
kr = "korean",
pl = "polish",
ja = "japanese",
de = "german"
)
```
Currently you can use {esquisse} in the following language: `r i18n_flags(languages)`.
```r
library(esquisse)
set_i18n("fr")
esquisser()
```
If you want another language to be supported, you can submit a Pull Request to add a CSV file like the one used for french (file is located in `inst/i18n` folder in the package, you can see it [here on GitHub](https://github.com/dreamRs/esquisse/blob/master/inst/i18n/fr.csv)).
See [{datamods} vignette](https://dreamrs.github.io/datamods/articles/i18n.html) for more on this topic.