block by timelyportfolio 4c5718a7efe5c0abd363

parcoords + d3scatter linked by crosstalk

Full Screen

Built with blockbuilder.org

The next phase in htmlwidgets will be the ability to communicate with or without Shiny. Joe Cheng from RStudio has demonstrated this with d3scatter using crosstalk. This example extends Joe’s example and experiments with d3scatter + parcoords. Currently, the experimental crosstalk-version of parcoords is only wired to send its brushed selection and not receive.

For another example, see Carson Sievert’s plotly experiments.

Code to Replicate

# devtools::install_github("jcheng5/crosstalk")
# devtools::install_github("jcheng5/d3scatter")
# devtools::install_github("timelyportfolio/parcoords@feature/crosstalk")


# almost all of this code is copy/pasted from
#   https://github.com/jcheng5/d3scatter/blob/master/README.md
# Joe Cheng from RStudio deserves all the credit

library(parcoords)
library(d3scatter)
library(htmltools)

browsable(tagList(
  d3scatter(mtcars, ~wt, ~mpg, ~cyl, group = "A", height = 200, width = 400),
  parcoords(mtcars, brushMode = "1d", crosstalk_group = "A", height = 300, width = 500)
))