Glue Documentation#
Glue is a Python library to explore relationships within and among related datasets. Its main features include:
Linked Statistical Graphics. With Glue, users can create scatter plots, histograms and images (2D and 3D) of their data. Glue is focused on the brushing and linking paradigm, where selections in any graph propagate to all others.
Flexible linking across data. Glue uses the logical links that exist between different data sets to overlay visualizations of different data, and to propagate selections across data sets. These links are specified by the user, and are arbitrarily flexible.
Full scripting capability. Glue is written in Python, and built on top of its standard scientific libraries (i.e., Numpy, Matplotlib, Scipy). Users can easily integrate their own python code for data input, cleaning, and analysis.
For more demos, check out the videos page. You can also follow us on Twitter for previews of upcoming functionality!
Getting started#
Glue is designed with “data-hacking” workflows in mind, and can be used in different ways. For instance, you can simply make use of the graphical Glue application as is, and never type a line of code. However, you can also interact with Glue via Python in different ways:
Using the IPython terminal built-in to the Glue application
Sending data in the form of NumPy arrays or Pandas DataFrames to Glue for exploration from a Python or IPython session.
Customizing/hacking your Glue setup using
config.py
files, including automatically loading and clean data before starting Glue, writing custom functions to parse files in your favorite file format, writing custom functions to link datasets, or creating your own data viewers.
Glue thus blurs the boundary between GUI-centric and code-centric data exploration. In addition, it is also possible to develop your own plugin packages for Glue that you can distribute to users separately, and you can also make use of the Glue framework in your own application to provide data linking capabilities.
To see how glue compares with other open-source and commercial data visualization solutions, you can view this comparison table.
In the following sections, we cover the different ways of using Glue from the Glue application to the more advanced ways of interacting with Glue from Python.
Note
For any questions or help with using glue, you can always join the user support mailing list or ask questions on Slack (note that you will need to sign up for an account here).
Using the Glue application#
Interacting with data from Python#
Domain-specific guides#
Customizing/Hacking Glue#
- Introduction to customizing/extending glue
- List of available plugins
- Configuring Glue via a startup file
- Customizing your Glue environment
- Distributing your own plugin package
- Customizing the coordinate system of a data object
- Programmatically configuring viewers
- Writing a simple custom data viewer
- Watching data for changes
- Custom fitting plugins
- Unit conversion in glue
Advanced customization#
Getting help#
The Glue architecture#
The pages below take you through the main infrastructure in Glue, and in particular how selections, linking, and communications are handled internally. You don’t need to understand all of this in order to get started with contributing, but in order to tackle some of the more in-depth issues, this will become important. This is not meant to be a completely exhaustive guide, but if there are areas that you feel could be explained better, or are missing and would be useful, please let us know!
Information on the Data framework is available in Working with Data objects and is not repeated here.
Developing Glue#
Acknowledging glue#
If you use glue for research presented in a publication, please consider citing the following two references:
Beaumont et al. (2015), Hackable User Interfaces In Astronomy with Glue
Robitaille et al (2017) glueviz v0.13.1: multidimensional data exploration
The first is a conference proceedings describing glue, while the second is the software itself.