-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
69 lines (49 loc) · 2.21 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
---
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%"
)
```
# tidycharts
<!-- badges: start -->
[![R-CMD-check](https://github.com/MI2DataLab/tidycharts/workflows/R-CMD-check/badge.svg)](https://github.com/MI2DataLab/tidycharts/actions)
[![CRAN monthly downloads](https://cranlogs.r-pkg.org/badges/tidycharts)](https://cran.r-project.org/package=tidycharts)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/tidycharts)](https://cran.r-project.org/package=tidycharts)
[![Codecov test coverage](https://codecov.io/gh/SawickiBartosz/tidycharts/branch/main/graph/badge.svg)](https://app.codecov.io/gh/SawickiBartosz/tidycharts?branch=main)
<!-- badges: end -->
The goal of tidycharts is to enable R users to create charts inspired by [International Business Communication Standards (IBCS)](https://www.ibcs.com/). The plots are generated in SVG format, so embedding them in HTML documents is straight forward.
## Installation
You can install the released version of tidycharts from [CRAN](https://CRAN.R-project.org) with:
``` {r setup, message=FALSE, warning = FALSE}
install.packages("tidycharts")
```
Development version from [GitHub](https://github.com/) can be installed with:
``` {r setup-github, message=FALSE, warning=FALSE, cache=TRUE}
devtools::install_github("MI2DataLab/tidycharts")
```
## Example
How to create IBCS inspired charts using tidycharts?
```{r, eval=F}
library(tidycharts) # load the package
# create some data to visualize
df <- data.frame(months = month.abb[1:6],
values = round(5 + sin(1:6), 2))
# create chart in a form of character vector containing SVG content
column_chart(df, x = 'months', series = 'values')
```
```{r column-chart, echo=FALSE, out.width = '50%'}
knitr::include_graphics("man/figures/readme-column.png")
```
You can easily create other type of plots, ie. lineplots:
```{r eval=F}
line_chart_markers(df, x = df$months, series = 'values', series_labels = 'values')
```
```{r line-chart, echo=FALSE, out.width = '50%'}
knitr::include_graphics("man/figures/readme-lines.png")
```