Developing Custom Software to Improve Your Decision-Making Process

DecisionVis Blog

Data Comparison Table

Last time, we learned how to mark and annotate data points in different ways.  However, what if you are interested in seeing more of the data associated with a data point.  For this, we can use the data comparison table feature within DiscoveryDV.

Using the Data Comparison Table

The easiest way to add data to a comparison table is to right-click a data point in the ND scatter plot and select “Show in Table”.  When there are no tables currently open, this will be the only option available.  However, once a data comparison table has been created, you will have the option to send a data point to an existing table or to send it to a new table.   Recall the 3 marked data points from our last post?

These 3 data points have been added to a data comparison table as shown in the figure below:

The data comparison table shows all of the data associated with each point added to the table.  Data columns, including columns created by DiscoveryDV like “marking” and “brushing” are shown as rows in the table, while each point added to the table is shown as columns in the table.  The top header row shows the marking color and marking group assignment of each point.  If the point it not marked, the default glyph color is shown along with the text “un-marked”.  The header row and header column for the table are locked, allowing you to easily scroll through the table to examine data.

Data in the table can be sorted forward or backward along any of the data columns by either double-clicking the row header within the table or by right-clicking a row header and selecting “Sort Forward” or “Sort Backward”.

Data points can be removed from the table by right-clicking the column header of the table and selecting “Remove”.

Data in the table can be copied in a variety of ways.  Table rows can be copied by right-clicking the row’s header, and entire data points can be copied by right-clicking the column’s header.  A range of cells can be selected in the table and copied as well by right-clicking following selection.  In all cases, the corresponding data column names are included with all data copied from the table.

Data comparison tables appear under the “Tables” header in the storyboard and are treated similarly to plot windows. New data comparison tables can be created from the storyboard, they can be renamed, and their visibility toggled on/off.   This also means that data comparison tables, as well as their size, visibility, and the data points they display, are saved and reloaded across application sessions.

Summary:

  • Add data points to a data comparison table by right-clicking the point and selecting “Show in Table”.
  • Sort data in the table by double-clicking a row’s header, or right-clicking and selecting from one of the sort options.
  • Remove data from the table by right-clicking the column header in the table.
  • Copy rows, columns, or table selections by right-clicking.
  • Data comparison tables are saved and reloaded across application sessions.

Marking and Captions

The marking capabilities of DiscoveryDV have been updated substantially over the last several months.  This post focuses on the recent changes that have occurred with marking, as well as how marking can be combined with the labeling axis.

Marking Refresher

Marking within DiscoveryDV can be accomplished by double-clicking a data point in the NDPlot (the N-dimensional scatter plot).  When a data point is double-clicked, it will be marked.  Recall that everything you do in DiscoveryDV becomes data that is plottable.  So, what is really happening when you double-click on that point is that the “marking” data column is being modified and it is being plotted on the “M” axis.  You can see this behavior in the figure below:

Notice in the storyboard how the auto-plot for Marking is set to “yes”.  When auto-plotting is enabled, if you double-click a point to mark it and the “marking” data column isn’t plotted anywhere, it will automatically be plotted on an appropriate axis.  If you would like to stop this from happening, simply toggle the auto-plot rule for Marking to “no”.

Captions and Assigning to Groups

Notice also in the figure above that the marked data points are annotated with captions.  This is because the “marking” data column is also plotted on the L (Labeling) axis as shown.  The data stored by the marking data column is string based data indicating the name of the marking group to which the data point belongs.  Whenever you double-click a data point, a default marking group will be created.  If you’d like to add a point to an existing marking group, simply select the name of the marking group in the storyboard, and double-click another data point in the plot.  The new marked point will be assigned to the selected group.

Another way to assign data points to marking groups is by right-clicking the data point from within the plot and selecting “Mark”, at which point you will be presented with a sub-menu to select from existing marking groups or to assign the point to a new group.  Marked data points can also be un-marked by right-clicking the point and selecting the appropriate item from the menu.

Note how additional data points have been marked and assigned to existing marking groups in the figure below:

Sticky Captions

Users familiar with DiscoveryDV will notice a new feature in this figure – a single marking caption is used to mark multiple points in the same group!  This is because labeling axis captions with similar content now “stick” to one another.  There are still multiple captions, and if you click and drag one of those captions in the plot above, you will see the other captions underneath.  However, when you release the caption after dragging it to a different location, all other captions with similar content will move to the new location.  This is very useful for annotating categorical data.

Naming groups

The other thing you will soon notice about marking is that you can no longer annotate individual marked points, but rather the name of the marking group is used instead to annotate groups of points.  The name of the marking group can be changed by double-clicking the group name in the storyboard and changing its value.   In the figure below, the marking group names have been changed to something a little more meaningful to the user.

 If you would like to mark and annotate a single point as before, simply create a marking group with only one point.

Finally, if you would like to un-mark data points, or even just delete an entire group of marked points, you can select the marking rule, or marking group in the storyboard and press the delete key to remove it.  As before, the color of marking groups can be changed from within the storyboard as well by simply double-clicking the color rule for the group and selecting a new color to use.  The positions of captions associated with the L axis are also saved and reloaded between application sessions, making adjustments to the captions in a plot simple, and reproducible.

Summary:

  • Mark data points by double-clicking them in the plot.
  • Mark data points by right-clicking and assigning the point to a marking group.
  • Select a marking group in the storyboard and double-click a point in the plot to assign the point to that group.
  • Double-click the name of a marking group in the storyboard to change its label.
  • Plot the “marking” data column on the M axis to show boxes around marked points in the plot.
  • Plot the “marking” data column on the L axis to show captions for marked points.
  • Captions with similar content will stick together when you move them around the plot.
  • The positions of captions will be saved and reloaded between application sessions.

Creation of Animated GIF Images

DiscoveryDV can compose an animated GIF from a sequence of snapshots. This feature integrates with data animation and automatic camera rotation.

What Animated GIF Images Look Like


This figure shows the frames from an animated GIF image produced by DiscoveryDV. Animated GIF images are self-contained moving image files.  They can be embedded in PowerPoint presentations and are understood by all web browsers.

How To Create Animated GIF Images

Camcorder Toolbar: Start, stop, save, and clear animated GIFs from the Camcorder Toolbar.

The three main controls for animated GIF creation are start/stop, clear, and save.  The ordinary procedure is:

1. Start: begin acquiring animation frames
2. Stop: stop acquiring animation frames
3. Save: compile animation frames into GIF
4. Clear: release animation frames

This will produce an animated GIF in the snapshots folder.  This GIF will be a recording of everything seen in the plot while recording is active.

Start / Stop

This button in the Camcorder toolbar is a toggle: pushing it will start or stop acquiring animation frames.  GIF animation frames are likeordinary screenshots, with three exceptions.

1.  GIF animation frames will not be scaled up regardless of the snapshot scale setting.
2.  GIF animation frames are grouped together in a subfolder of the snapshots directory.  The name of this folder follows the pattern `YYYY-MM-DD-HH-MM-SS`, corresponding to the time the set of frames (“framestack”) was started.
3.  GIF animation frames are acquired automatically at a fixed interval until a termination condition is met.  Toggling the Start / Stop button back to “Stop” is one termination condition.

If the recording is stopped but the framestack is not cleared, starting the recording again will add frames rather than starting over.  The location of the current framestack is a plot-level attribute saved in
the analysis document, so that a framestack in the process of being developed before saving will still be current after loading.

Save

This button turns the current framestack into a GIF animation with the same name as the framestack directory (`YYYY-MM-DD-HH-MM-SS.gif`).

DiscoveryDV invokes an external helper program, `magick.exe` (ImageMagick) to transform the sequence of frames into a single GIF file. ImageMagick is a very powerful tool for image manipulation, and users interested in more fine-grained control over GIF creation than DiscoveryDV exposes will find that the ImageMagick documentation is very thorough. While a stripped-down version of ImageMagick is bundled with DiscoveryDV, a full version may be acquired from the ImageMagick website.

To run `magick.exe`, DiscoveryDV generates a custom script file containing the ImageMagick commands necessary to produce a GIF.  This file is also saved in the snapshots directory and may be edited to customize its output.

Clear

This button releases the framestack.  While it will remain in the filesystem indefinitely, it will not be incorporated in the next animated GIF.

Other GIF Controls

All of the following GIF creation controls are plot-level attributes that are saved with the analysis document and restored when the document is loaded.

Framestack Location


The framestack location is a Storyboard indicator that shows where the GIF frames are saved.  It is not editable.

GIF Looping

One-time GIFs: Produce a non-looping GIF by clearing the repeat button in the Camcorder Toolbar.

By default, DiscoveryDV produces animated GIFs that loop indefinitely. This control, which can be toggled either from the Storyboard or the Camcorder toolbar under the plot, alternates between “repeat” (the default behavior) and “one-time” (stop on the last frame.)

Grab Data Animation Sequence


Immediately, if there is a recording in process, or the next time the Start button is pressed, this button resets data animation to the beginning, plays through the data animation sequence one time, adding all frames to the framestack, and then stops recording.  This is an alternative termination condition to pressing the Start / Stop button manually.  When recording stops, this setting is automatically reset to “no”.

Grab Camera Rotation Sequence


Immediately, if there is a recording in process, or the next time the Start button is pressed, this button resets camera rotation to 0 degrees, advances by dθ per frame until the camera rotation exceeds 360 degrees, adding all frames to the framestack, and then stops recording.  This is an alternative termination condition to pressing the Start / Stop button manually.  When recording stops, this setting is automatically reset to “no”.

Termination Condition Interaction

If Grab Data Animation Sequence and Grab Camera Rotation Sequence are both set to “yes”, whichever finishes first will pause on its last frame until the other is finished, at which point recording
will automatically terminate.  This makes it possible to produce GIF animations that run through a data cycle, pause on the last frame, and rotate around it.  Alternatively, the GIF might rotate around animated data, then stop rotating and allow the data animation to run to completion. Which happens first depends on the animation step and dθ.

Summary

  • Start / stop grabbing animation frames from the Camcorder Toolbar
  • Compile a GIF using the Save button on the Camcorder Toolbar
  • Clear GIF creation state with the Clear button
  • Grab a data animation sequence using the animation sequence button
  • Grab a rotation sequence using the autorotation sequence button

Automatic Camera Rotation

Automatic camera rotation moves the camera in a circle without requiring user interaction.

What Automatic Camera Rotation Looks Like

This figure contains a sequence of frames from an automatic camera rotation in DiscoveryDV.  Each frame is rotated 20 degrees from the previous one, while all other settings are unchanged.

How To Control Automatic Camera Rotation

To rotate a 3D view, click the auto rotation button in the animation toolbar.

On / Off

To turn on automatic camera rotation, toggle the “camera rotation” button in the “Animation” button group below the plot.  This button has an “on” state and an “off” state that correspond to the camera rotation state.


Alternatively, the Storyboard offers an “auto-rotate 3D view” attribute that does the same thing.

The camera rotation state is a plot-level attribute that is saved with the analysis document, so a plot that is rotating before it is saved will be rotating after it is loaded.

Automatic camera rotation is enabled only when all three spatial axes in the NDPlot are active.  1D and 2D views suppress camera rotation.

Speed and Direction

Control the rotation speed and direction by setting the number of degrees per step.

The number of degrees by which the camera moves each frame is determined by the dθ parameter in the Storyboard.  dθ may be any real number.  If dθ is positive, the plotting cube will rotate counter-clockwise.  If negative, the plotting cube will rotate clockwise. dθ defaults to 1.0 degrees.

dθ is a plot-level attribute, and is saved with the analysis document.  Auto-rotation speed and direction will be the same after loading as before saving.

Rotation Around the Center of the Plotting Cube

Center the plotting cube by putting Camera Focus at (0.5, 0.5, 0.5).

To cause the plotting cube to rotate about its exact center, set the camera focus to (0.5, 0.5, 0.5).  This will work as long as the limits for the X, Y, and Z axes have not been modified.  If they have been modified asymmetrically, some trial and error will be necessary to identify a new focal point.  Note that the focal point may have a negative coordinate value.

Summary

  • Activate by toggling the button on the Animation toolbar, or from the Storyboard
  • Modify direction and speed from the Storyboard, under Camera settings

Animating Data in DiscoveryDV

Introduction

This next series of posts will concentrate on animation features in DiscoveryDV, including data animation, automatic camera rotation, and the creation of GIF animations.  This post focuses specifically on animating data using the animation axis in DiscoveryDV

Data Animation

Data animation automatically cycles the visibility of glyphs in the NDPlot based on the values in a data column.

What Data Animation Looks Like

This figure illustrates data animation in a DiscoveryDV session. It shows four consecutive snapshots obtained during a data animation sequence.

In a static presentation like this one, the difference between animation and brushing is not clear — the difference is that data animation changes the visibility of glyphs automatically, without requiring the adjustment of brushing limits.

How To Turn On Data Animation

Data Animation happens automatically when a column is bound to the “A” axis.

Here the ‘row’ (row number) column is bound to the animation axis.

How To Control Data Animation

Besides the column bound to the “A” axis, the following attributes of the data animation can be controlled by the user.

  • Direction: May be “forward” or “reverse”. If “forward”, the animation proceeds from low values to high values, disregarding other column reversal settings. Otherwise, animation proceeds from high values to low. Default: “forward”. This attribute applies to columns and is saved with the analysis document.
  • Window Mode: May be “cumulative” or “moving”. If “cumulative”, the set of visible glyphs grows from none to the full set of rows (subject to the constraints of brushing.) Default: “moving”. This attribute applies to columns and is saved with the analysis document.
  • Window Size: May be any positive number. If Window Mode is “moving”, this setting determines the size of the data interval (“window”) used to determine which rows are visible. A larger window allows more data to be shown at once. This setting has no effect when Window Mode is “cumulative”. Default: 2.0. This attribute applies to columns and is saved with the analysis document.
  • Step Size: May be any positive number. This determines how quickly the animation runs through the data column. This number is how far the data interval moves for each new frame of the animation. If this number is larger than the window size, some data rows will be stepped over without being shown. Default: 1.0. This attribute applies to columns and is saved with the analysis document.
  • Current Animation Step: The location of the data interval being made visible by animation. This attribute is transient and applies only to the currently displayed data animation. To capture a subset of data more permanently, use brushing, marking, or set definition.
  • Pause State: Whether the current data animation is playing or paused. Default: playing. This attribute is transient and applies only to the currently displayed data animation.

Data Animation Control From The ND Scatter Plot

A toolbar below the plot provides some animation controls.

 

 

Reset to Beginning: Move the Current Animation Step to the smallest data value.

Seek Backward: Move the Current Animation Step lower by one Step Size increment.

Slow Down Animation: Decrease Window Size and Step Size by half.

Reverse Animation: Set the Direction to “reverse” and unpause the animation.

Pause Animation: Pause the animation.

Play Animation Forward: Set the Direction to “forward” and unpause the animation.

Speed Up Animation: Double Window Size and Step Size.

Seek Forward: Move the Current Animation Step higher by one Step Size increment.

Move to End: Move the Current Animation Step to the largest data value.

Δ 1:

Reset Step and Window Sizes: Return Window Size and Step Size to their default values (2.0 and 1.0).

Toggle Window Mode: Toggle between “cumulative” and “moving” data animation windows.

Status Indicator

Next to the animation controls, a status indicator shows the data animation limits and the position of the current frame. In the screenshot above, this reads 1.5/1.1e3/2.5e3, which means that the column is animated between 1.5 and 2500, and the current step is at 1100.

Data Animation Control From The Storyboard

Under the Data Columns header, the storyboard provides access to the following attributes:

  • Direction: [forward or reverse] A double-click toggles this attribute between “forward” and “reverse”.
  • Window Mode: [moving or cumulative] A double-click toggles this attribute between “moving” and “cumulative”.
  • Step Size: [floating point value] This attribute can be edited to any positive number.
  • Window Size: [floating point value] This attribute can be edited to any positive number, but setting it smaller than Step Size will cause the animation to skip over data.

Summary

  • Activate by plotting a column on the A axis
  • Coarse control from the Animation Toolbar
  • Detailed controls in the Storyboard under Data Columns

Exploration Using Evolutionary Algorithms

If you are interested in learning more about ExplorerDV or Evolutionary Algorithms in general, here are a couple of great resources to help you get started.

The first is a presentation given by Dr. Holger Maier of the University of Adelaide sponsored by the International Environmental Modelling & Software Society (iEMSs) and Modelling and Simulation Society of Australia and New Zealand (MSSANZ).  During his presentation, Dr. Maier does a very nice job of describing the challenges associated with exploring and optimizing complex problems containing many decisions and objectives.

In addition to Dr. Maier’s presentation, there is also an accompanying position paper that can be found here.

If you are interested in learning a bit more about ExplorerDV specifically, the lead developer, Dr. David Hadka, recently authored a whitepaper entitled Maximizing the potential of Your Designs: On using ExplorerDV to explore and optimize your engineering systems.  Dr. Hadka’s paper provides a high level introduction to many objective exploration and its associated challenges.  He also touches on algorithm selection considerations and scaling to high-performance computing clusters.

InSightDV

Introduction

In today’s post we will cover one of the newest features available in DiscoveryDV. The new feature is named InSightDV because it provides a way for you to share an interactive view of your DiscoveryDV analyses with anyone using a modern web browser.

Learning Objectives:

  • What is InSightDV?
  • Creating InSightDV files
  • Interacting with InSightDV

What is InSightDV?

InSightDV is a new tool that gives you the ability to share the results of your analyses using an all-inclusive html file that can be opened in any modern web browser. InSightDV allows the end user to interact with the your data in the same way as DiscoveryDV would allow you to.

Creating InSightDV files

When you are ready, you can create two different types of InSightDV files by going to the File menu and selecting “Export to InSightDV”, or by pressing Ctr+Shift+I.

export

There are two types of InSightDV file: (1) the all-in-one html file format or (2) the human readable .idv file format.  The all-in-one html file is as easy as it sounds. Simply email the resulting html file to anyone with a modern web browser, with instructions to drag and drop this html file into their browser.  The following figures show snapshots of a DiscoveryDV plot and an InSightDV html file displayed in a browser window side by side.  Not much difference, is there?

ddv

idv

The .idv file format is another way to share and edit plot data. The .idv file needs to be coupled with the InSightDv.html file located in the insightdv folder of your DiscoveryDV installation directory.  Open the InSightDv.html file in your browser, and drag your .idv file into the window to open your .idv file. The InSightDV page also gives you the option to locate the file you wish to open inside the browser. Very soon, we will be posting InSightDV to www.insightdv.com which will allow you to simply navigate to that web address and drag your data file into the browser window to view it.

Interacting with InSightDV

InSightDV allows the user to interact with the data in similar ways to DiscoveryDV. There are two major ways to interact with InSightDV, the web browser portion and the .idv file. Inside the web browser you can interact with the plot, glyphs, and the data table. Clicking a glyph or selecting a row in the data table highlights the glyph in the plot. Double-clicking a glyph will give you the option to create a caption. Right-clicking the colorbar, legend, or caption gives you the option to make the background transparent, this lets the items behind the labels show through.

The other option that is available to change the plot comes from access to the human-readable idv file and its associated InSightDV.html file. In this setup you can edit values in the idv file and refresh the html page to see the changes you made. This editing is very similar to editing the .ddv file used to represent the storyboard in DiscoveryDV.

idvFile

Not all data is included in the resulting InSightDV files that DiscoveryDV exports. The only data in included is the data that was plotted at some point in DiscoveryDV. This is done so that the resulting InSightDV file size is relatively small and easily shared via email, etc.

Excel Interface

Introduction

We will begin today by learning about the new Excel interface. This feature allows you to edit your data on-the-fly using all the data analysis tools that are built into Excel.

Learning Objectives:

Today’s learning objectives include:

  1. Creating an Excel Connection
  2. Editing Data
  3. Saving Changes

Accessing the Excel Interface Module

The Excel module can be started in several different ways. If you already have a plot created, right-clicking the plot background will create a drop-down menu with the option to “Analyze in Excel”. Applying the same right-click method to a page in the storyboard will also present a context menu with the “Analyze in Excel” option.

excelPageRightClickexcelPlotRightClick

The Tools menu at the top of DiscoveryDV provides an alternative way to open the Excel interface along with it’s keyboard shortcut (Ctrl + Shift + E).

excelToolsMenu

Using the the Tools menu or the keyboard shortcut will apply the Excel connection rule to the currently selected page.

Editing your Data

If you are following along with this post, you might have noticed that Excel opens as soon as a connection is established. This Excel worksheet shows all the data associated with your plot (or page). This has quite a few interesting implications. You can create data to be plotted by either adding to an existing column or by creating a new column. In order for a new data column to become available for plotting in DiscoveryDV, you need to have at least one letter in the header row of the worksheet (row 1).

excelNewColumn

You can also sort data columns, apply formulas to cells, rename a column (as long as you don’t introduce a duplicate name), mark data (by editing values in the “marking” data column), and pretty much anything else Excel or DiscoveryDV allows you to do. There are certain columns that DiscoveryDV reserves for analysis that cannot be removed from the worksheet.

These columns are:

  • brushing
  • sort
  • hiding
  • marking
  • file
  • row
  • name

You can change the data in these columns to perform analysis. However, If you try renaming one of these columns, you will notice a copy of the column appear so that DiscoveryDV can also refer to this column for certain types of analyses (like brushing, marking, etc). Duplicate names are also not allowed.  When you enter a duplicate name, the name of the column will automatically be changed so that it is unique.

Data added to the bottom of a column will not show up in a plot unless all the other columns plotted have a value in the new row. Any data you change or add must come in the form of a number in order to be plotted. Some formats, such as a dates, can be converted to a floating point numbers. If the value cannot be converted to a float when it is sent to DiscoveryDV, then the value becomes NaN or not-a-number.

Saving Data

None of the data changed via the Excel connection will impact your original data files. This means that the analysis you conduct in Excel isn’t saved anywhere until you save the spreadsheet from Excel or save the storyboard in DiscoveryDV. If you choose to save it via Excel, you can load that file again into DiscoveryDV as a data rule. If you decide to exit Excel, you will be prompted with a warning dialog describing how all your open Excel connections will be closed. Closing these connections will revert plot data back to what was originally loaded into the page – your original data rules!

Summary

Here is what you learned in today’s post.

Accessing the Excel Interface Module

  • Create an Excel connection from:
    • The Tools menu
    • Pressing Ctrl-Shift-E
    • The plot background’s right-click menu
    • A storyboard page’s right-click menu

Editing Data

  • Certain columns must always be present (see the list above)
  • Inserting new data columns requires that you specify a column name in row 1 of the sheet
  • Anything you do in the Excel spreadsheet is reflected as data changes in DiscoveryDV
  • Columns can be renamed
  • A new row of data can be plotted once the row has values for all columns plotted in DiscoveryDV

Saving Data

  • All changes made in excel must either be saved from Excel or by saving the Storyboard in DiscoveryDV
  • Saved Excel files can be loaded back into DiscoveryDV as data rules