Coder Social home page Coder Social logo

terrytangyuan / autoplotly Goto Github PK

View Code? Open in Web Editor NEW
86.0 13.0 10.0 3.58 MB

Automatic Generation of Interactive Visualizations for Statistical Results

R 81.46% TeX 18.54%
rstats ggplot2 plotlyjs interactive-visualizations statistics machine-learning plotly data-visualization

autoplotly's Introduction

Note: This package has been maintained by @terrytangyuan since 2017. Please consider sponsoring!

CRAN_Status_Badge DOI DOI

autoplotly

This R package provides functionalities to automatically generate interactive visualizations for many popular statistical results supported by ggfortify package with plotly.js and ggplot2 style. The generated visualizations can also be easily extended using ggplot2 syntax while staying interactive.

autoplotly-demo

You can play the examples interactively here.

Installation

To install the current version from CRAN, use:

install.packages("autoplotly")

To install from development version on Github, use:

devtools::install_github("terrytangyuan/autoplotly")

Example

# Automatically generate interactive plot for results produced by `stats::prcomp`
p <- autoplotly(prcomp(iris[c(1, 2, 3, 4)]), data = iris,
  colour = 'Species', label = TRUE, label.size = 3, frame = TRUE)

# You can apply additional ggplot2 elements to the generated interactive plot
p +
  ggplot2::ggtitle("Principal Components Analysis") +
  ggplot2::labs(y = "Second Principal Components", x = "First Principal Components")

# Or apply additional plotly elements to the generated interactive plot
p %>% plotly::layout(annotations = list(
  text = "Example Text",
  font = list(
    family = "Courier New, monospace",
    size = 18,
    color = "black"),
  x = 0,
  y = 0,
  showarrow = TRUE))

You can autoplotly many other statistical results automatically with the help of ggfortify. A complete list can be found here.

Reference/Citation

To cite autoplotly in publications, please use the following (available via citation("autoplotly")):

Yuan Tang (2018). autoplotly: An R package for automatic generation of interactive visualizations for statistical results. Journal of Open Source Software, 3(24), 657, https://doi.org/10.21105/joss.00657

Yuan Tang, Masaaki Horikoshi, and Wenxuan Li (2016). ggfortify: Unified Interface to Visualize Statistical Result of Popular R Packages. The R Journal, 8.2, 478-489.

autoplotly's People

Contributors

damirpolat avatar terrytangyuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autoplotly's Issues

error message after entering p in autoplotly example code

Hi Terry! -

Following your blog post code example,
I entered:

> p <- autoplotly(prcomp(iris[c(1, 2, 3, 4)]), data = iris,
colour = 'Species', frame = TRUE)

OK !..

> class(p)
[1] "plotly" "htmlwidget"

but... I get an error message when I next enter:

> p
Error in attr %in% names(Schema$traces[[x]]$attributes) :
cannot open file '~/R/i686-pc-linux-gnu-library/3.4/plotly/R/sysdata.rdb': No such file or directory
In addition: Warning message:
In attr %in% names(Schema$traces[[x]]$attributes) :
restarting interrupted promise evaluation

What's wrong?

SFdisqus
using latest Rstudio, R,
under Ubuntu LINUX 14.04 LTS 32-bits.

PKGS installed
and loaded in the Rstudio Workspace:
1 - autoplotly GIT dev version: v 0.1.1

2 - plotly v 4.7.1.9000,

3 - ggplot2 v 2.2.1.9000,

4 - ggfortify v 0.4.2

package vignette from blog post?

The blog post linked in the README provides a very helpful intro to the package and its intended usage. I suspect, especially since the package is on CRAN, that many R users would seek guidance from a vignette and miss the links to this resource (DESCRIPTION -> GitHub repo -> blog post). Could the blog post be repurposed into a package vignette?

Part of this JOSS review.

Tooltip parameter improvement

Hi Terry,

In my autoplotly visualizations (pca in my case) I would like to add information to show in the tooltip from columns of the dataframe used.

The only column that can be added in the 'tooltip' parameter is the column used in the 'colour' parameter.

There is a way to add other information in the 'tooltip' parameter than 'x', 'y', 'colour'?
If not, is this a feature that will be present in a future version?

community guidelines

The DESCRIPTION contains a link to the issues page on the GitHub repo, but i did not see any other guidance on contributing to the package or seeking support.

The package consists of one core function whose job is to pass objects to autoplot() for which ggfortify provides methods. So users interested in contributing methods should presumably be pointed to the ggfortify repo. (Presumably only experienced R users would want to contribute directly to the autoplotly source code.) But that repo also has no contributing guidelines. If contributing to ggfortify would be as straightforward as it seems to me (a fortify_*.R file containing methods for fortify() and autoplot()), then the guide could be short; but there might be other important considerations i'm missing!

Part of this JOSS review.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.