15 Introduction

Linking of multiple data views offers a powerful approach to visualization as well as communication of structure in high-dimensional data. In particular, linking of multiple 1-2 dimensional statistical graphics can often lead to insight that a single view could not possibly reveal. For decades, statisticians and computer scientists have been using and authoring systems for multiple linked views, many of which can be found in the ASA’s video library. Some noteworthy videos include focusing and linking, missing values, and exploring Tour De France data (Swayne, Cook, and Buja 1998; Theus and Urbanek 2008).

These early systems were incredibly sophisticated, but the interactive graphics they produce are not easily shared, replicated, or incorporated in a larger document. Web technologies offer the infrastructure to address these issues, which is a big reason why many modern interactive graphics systems are now web based. When talking about interactive web-based graphics, it’s important to recognize the difference between a web application and a purely client-side webpage, especially when it comes to saving, sharing, and hosting the result.

A web application relies on a client-server relationship where the client’s (i.e., end user) web browser requests content from a remote server. This model is necessary whenever the webpage needs to execute computer code that is not natively supported by the client’s web browser. As Section 17 details, the flexibility that a web application framework, like shiny, offers is an incredibly productive and powerful way to link multiple data views; but when it comes to distributing a web application, it introduces a lot of complexity and computational infrastructure that may or may not be necessary.

Figure 15.1 is a basic illustration of the difference between a web application and a purely client-side web page. Thanks to JavaScript and HTML5, purely client-side web pages can still be dynamic without any software dependencies besides a modern web browser. In fact, Section 16.1 outlines plotly’s graphical querying framework for linking multiple plots entirely client-side, which makes the result very easy to distribute (see Section 10). There are, of course, many useful examples of linked and dynamic views that can not be easily expressed as a database query, but a surprising amount actually can, and the remainder can likely be quickly implemented as a shiny web application.

A diagram of the graphical querying framework underlying Figure 16.6.

FIGURE 15.1: A diagram of the graphical querying framework underlying Figure 16.6.

The graphical querying framework implemented by plotly is inspired by Buja et al. (1991), where direct manipulation of graphical elements in multiple linked plots is used to perform data base queries and visually reveal high-dimensional structure in real-time. D. Cook, Buja, and Swayne (2007) goes on to argue this framework is preferable to posing data base queries dynamically via a menus, as described by Ahlberg, Williamson, and Shneiderman (1991), and goes on to state that “Multiple linked views are the optimal framework for posing queries about data”. The next section shows you how to implement similar graphical queries in a standalone webpage using R code.

References

Ahlberg, Christopher, Christopher Williamson, and Ben Shneiderman. 1991. “Dynamic Queries for Information Exploration: An Implementation and Evaluation.” In ACM Chi ’92 Conference Proceedings, 21:619–26.

Buja, Andreas, John Alan McDonald, John Michalak, and Werner Stuetzle. 1991. “Interactive data visualization using focusing and linking.” IEEE Proceedings of Visualization, February, 1–8.

Cook, Dianne, Andreas Buja, and Deborah F Swayne. 2007. “Interactive High-Dimensional Data Visualization.” Journal of Computational and Graphical Statistics, December, 1–23.

Swayne, Deborah F, Dianne Cook, and Andreas Buja. 1998. “XGobi: Interactive Dynamic Data Visualization in the X Window System.” Journal of Computational and Graphical Statistics 7 (1): 113–30.

Theus, Martin, and Simon Urbanek. 2008. Interactive Graphics for Data Analysis: Principles and Examples. Chapman; Hall / CRC.