Skip to content

Interactive graphics for the tourr package using python

uschiLaa edited this page Mar 13, 2024 · 7 revisions

Background

Tour algorithms allow the visualization of multivariate (pD) data with animated computer graphics. A typical tour display shows data points in a scatterplot where linear projections are used to reduce the dimension from pD to 2D. A grand tour will alternate between randomly picking new projections (the target plane) and interpolating between the current view (the starting plane) to the target. In this way the change in view is shown as a smooth rotation in the pD space, and the viewer can extrapolate high-dimensional features from the 2D views.

Tour methods are in particular useful if they are embedded in an interactive graphics system, as was available in XGobi and GGobi. The R package tourr implements algorithms for the selection of planes, their interpolation and also offers different display functions. However, these displays are not interactive and while implementation of an interactive system from R is possible using for example shiny and plotly, these do not offer the desired level of interactivity.

On the other hand python graphics (in particular via matplotlib) offers better interactive graphics options, but there is no full implementation of tour functionalities available.

This project will integrate the best of these two worlds, using the already implemented functionality in the tourr package and connecting it to python for an interactive interface that in particular also allows the manual control of the projection.

Related work

An attempt at an interactive interface using shiny and plotly was made in the archived package galahr, this was showing pre-recorded tour paths in a plotly display, but was found to be too slow at re-drawing the display for each interpolation step.

Other interfaces use tools like ... detourr, liminal

Manual controls with the Mathematica package and with the python prototype

None of these have active communication between the tourr package to generate new targets and interpolated paths on the fly, and to be able to receive updates from the graphical interface to change how the tour runs (e.g. from manually selected view launch local tour, or brush points in the display as input to a guided tour)

Details of your coding project

What exactly do you want your contributor to code in the 10 week coding period? What functions? What do they do? Docs? Tests? Vignettes?

Expected impact

Mentors, please explain how this project will produce a useful package for the R community.

Mentors

Contributors, please contact mentors below after completing at least one of the tests below.

  • EVALUATING MENTOR: Ursula Laa [email protected] has contributed to the tourr package and has worked on interactive interfaces.
  • Dianne Cook [email protected] is an expert in visualisation and author and maintainer of the tourr package. Di has co-mentored more than 10 successful GSoC projects.

Tests

Contributors, please do one or more of the following tests before contacting the mentors above.

MENTORS: write several tests that potential contributors can do to demonstrate their capabilities for this particular project. Ask some hard questions that will give you insight about how the contributors write code to solve problems. You'll see that the harder the questions that you ask, the easier it will be for you to choose between the contributors that apply for your project! Please modify the suggestions below to make them specific for your project.

  • Easy: something that any useR should be able to do, e.g. download some existing package listed in the Related Work, and run it on some example data.
  • Medium: something a bit more complicated. You can encourage contributors to write a script or some functions that show their R coding abilities.
  • Hard: Can the contributor write a package with Rd files, tests, and vignettes? If your package interfaces with non-R code, can the contributor write in that other language?

Solutions of tests

Contributors, please post a link to your test results here.

  • EXAMPLE CONTRIBUTOR 1 NAME, LINK TO GITHUB PROFILE, LINK TO TEST RESULTS.
Clone this wiki locally