• Stars
    star
    129
  • Rank 279,262 (Top 6 %)
  • Language
    R
  • License
    GNU General Publi...
  • Created over 8 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

To insert interactive charts from ECharts into R Shiny applications (在R Shiny app中插入ECharts可交互图形)

ECharts2Shiny

CRAN Status Badge

Drawing

Drawing

As an R package, ECharts2Shiny can help embed the interactive charts plotted by Apache ECharts (incubating) library into our Shiny application. Currently, we can support

  • Pie charts
  • Line charts
  • Bar charts
  • Scatter plots
  • Radar chart
  • Gauge
  • Word Cloud
  • Tree Map
  • Heat Map

Contents

How to Install

From CRAN,

install.packages("ECharts2Shiny")

For the latest development version, please install from GitHub

library(devtools)
install_github("XD-DENG/ECharts2Shiny")

Examples

library(shiny)
library(ECharts2Shiny)

# Prepare sample data for plotting --------------------------
dat <- data.frame(c(1, 2, 3),
                  c(2, 4, 6))
names(dat) <- c("Type-A", "Type-B")
row.names(dat) <- c("Time-1", "Time-2", "Time-3")

# Server function -------------------------------------------
server <- function(input, output) {
  # Call functions from ECharts2Shiny to render charts
  renderBarChart(div_id = "test", grid_left = '1%', direction = "vertical",
                 data = dat)
}

# UI layout -------------------------------------------------
ui <- fluidPage(
  # We MUST load the ECharts javascript library in advance
  loadEChartsLibrary(),
  
  tags$div(id="test", style="width:50%;height:400px;"),
  deliverChart(div_id = "test")
)

# Run the application --------------------------------------
shinyApp(ui = ui, server = server)

Drawing

(For more examples, please refer to the /examples folder)

List of Examples

License

ECharts2Shiny package itself is under GPL-2.

The ECharts JS library is under BSD license (ECharts).

ECharts2Shiny包

CRAN Status Badge

Drawing

Drawing

ECharts2Shiny作为一个R包,可以帮助在Shiny应用程序中插入由ECharts库绘出的交互图形。当前支持的图形包括

  • 饼图 (pie chart)
  • 折线图 (line chart)
  • 柱形图 (bar chart)
  • 散点图 (scatter chart)
  • 雷达图 (radar chart)
  • 仪表盘 (gauge)
  • 词云 (word cloud)
  • 矩形树图 (Tree Map)
  • 热力图 (heat map)

目录

安装

CRAN版本

install.packages("ECharts2Shiny")

由GitHub安装最新开发版本

library(devtools)
install_github("XD-DENG/ECharts2Shiny")

例子

library(shiny)
library(ECharts2Shiny)

# Prepare sample data for plotting --------------------------
dat <- data.frame(c(1, 2, 3),
                  c(2, 4, 6))
names(dat) <- c("Type-A", "Type-B")
row.names(dat) <- c("Time-1", "Time-2", "Time-3")

# Server function -------------------------------------------
server <- function(input, output) {
  # Call functions from ECharts2Shiny to render charts
  renderBarChart(div_id = "test", grid_left = '1%', direction = "vertical",
                 data = dat)
}

# UI layout -------------------------------------------------
ui <- fluidPage(
  # We MUST load the ECharts javascript library in advance
  loadEChartsLibrary(),
  
  tags$div(id="test", style="width:50%;height:400px;"),
  deliverChart(div_id = "test")
)

# Run the application --------------------------------------
shinyApp(ui = ui, server = server)

Drawing

(请参考/examples 文件夹以获得更多实例信息)

实例列表

许可证

ECharts2Shiny 包使用GLP-2许可证。

The ECharts JS库使用BSD许可证(ECharts)。

More Repositories

1

SQL-exercise

Practice with "Real" SQL Problems
1,285
star
2

Spark-practice

Apache Spark (PySpark) Practice on Real Data
Jupyter Notebook
270
star
3

flask-example

A minimal web app developed with Flask
Python
103
star
4

handytools-go-webassembly

Handy Tools: Written in Golang + WebAssembly + Vue.js
Go
62
star
5

flask-app-for-mxnet-img-classifier

A Flask (Python) Web Interface for MXNet Image Classifier
Python
53
star
6

Spark-ML-Intro

PySpark Machine Learning Examples
44
star
7

rediseen

Create REST-like API service for Redis DB or expose Redis metrics in Prometheus-compatible format, easily.
Go
39
star
8

leetcode-scala

My solutions in Scala to some Leetcode problems, for familiarizing myself with Scala.
Scala
35
star
9

minimalcluster-py

A Minimal Cluster Computing Framework in plain Python
Python
16
star
10

DIY-A-Cluster

How to Do-It-Yourself A Cluster for Spark & Hadoop
10
star
11

shiny-authentication

Minimal example implementing authentication in R Shiny applications.
R
7
star
12

Nginx-Log-Analytics-with-Spark

Using Apache Spark (PySpark) to Analyze the Access Logfiles of Nginx
Python
7
star
13

Faster-with-R

How to achieve faster R coding.
6
star
14

Rtts

R package "Rtts" - Text to Speech
R
5
star
15

solution-asia-actuarial-analytics-challenge-2017

3rd ranking (out of 93 teams) solution for Asia Actuarial Analytics Challenge 2017 hosted by Singapore Actuarial Society (https://www.kaggle.com/c/asia-actuarial-analytics-challenge-2017)
Jupyter Notebook
5
star
16

containerized-airflow

Dockerfile
4
star
17

sqrt-matrix

How to compute the square root of a matrix with R and Python.
R
4
star
18

StockChina

This is a R package helping grab the real-time stock information in China market
R
4
star
19

example-redis-as-task-queue

Simple example using Redis as task queue
Python
3
star
20

Reactively-Play-Audio-Shiny

Reactively play audio files in Shiny application
R
3
star
21

Common-Questions-in-Python

A collection of common questions about Python I encountered, and corresponding solutions
3
star
22

spark-practice-scala

This repo is a Scala version "mirror" of my another repo [Spark-practice](https://github.com/XD-DENG/Spark-practice) (which focused on PySpark)
2
star
23

Microcontroller-MSP430

Some example codes for TI MSP430
Arduino
1
star
24

RSQLite-Overcome-Concurrency

How can we overcome concurrency in RSQLite (R's interfact to SQLite)
R
1
star
25

homebrew-rediseen

Homebrew Formula for Rediseen
Ruby
1
star
26

Shiny-File_Downloading

How to set links for file downloading in Shiny application
R
1
star
27

R-Package-Downloads-Analysis

Help analyze the downloads of R packages
R
1
star
28

SG.Zipcode.Mapping

The Mapping between the Zip Code and District in Singapore
R
1
star
29

AES_Encryption_with_R

Use R language to encrypt strings
R
1
star
30

web-service-monitor

A shiny app
R
1
star
31

Data-Training-Program-Exercise

Exercise for "Data Science for Analytics" Program
Jupyter Notebook
1
star