Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreamRs/tuichartr
:bar_chart: R htmlwidget for tui-chart
https://github.com/dreamRs/tuichartr
data-visualization htmlwidgets r
Last synced: 2 months ago
JSON representation
:bar_chart: R htmlwidget for tui-chart
- Host: GitHub
- URL: https://github.com/dreamRs/tuichartr
- Owner: dreamRs
- License: other
- Archived: true
- Created: 2019-05-13T15:00:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-07T11:03:24.000Z (over 4 years ago)
- Last Synced: 2024-01-28T23:09:16.420Z (12 months ago)
- Topics: data-visualization, htmlwidgets, r
- Language: R
- Homepage: https://dreamrs.github.io/tuichartr/
- Size: 758 KB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-shiny-extensions - tuichartr - HTML widget for tui-chart. (Visualization / General-Purpose)
README
# tuichartr
> Htmlwidget to create interactive visualisations with JavaScript library [tui-chart](https://github.com/nhn/tui.chart)
[![Travis build status](https://travis-ci.org/dreamRs/tuichartr.svg?branch=master)](https://travis-ci.org/dreamRs/tuichartr)
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)## Installation
You can install from GitHub with:
``` r
remotes::install_github("dreamRs/tuichartr")
```## Charts
You can create various type of chart : bar, column, line, area, boxplot, scatter, heatmap, treemap, radar, pie.
``` r
library(gapminder)
library(tuichartr)# Datas
n_countries <- gapminder %>%
filter(year == 2007) %>%
count(continent, sort = TRUE)# Chart
tuichart("bar") %>%
add_data(n_countries, aes(x = continent, y = n)) %>%
tui_chart(title = "Countries by continent in 2007") %>%
tui_xAxis(title = "Number of countries") %>%
tui_legend(visible = FALSE) %>%
tui_series(showLabel = TRUE)
```![](man/figures/tuichart-example.png)
## Maps
You can also make maps :
```r
# Retrieve Italy polygons
uk <- ne_states("united kingdom", returnclass = "sf")
# add a random numeric variable
uk$random <- sample(1:100, nrow(uk), TRUE)# draw map
tuimap() %>%
add_map_data(uk, aes(code = adm1_code, label = name, value = random)) %>%
tui_chart(title = "UK map")
```![](man/figures/tuimap-example.png)