Working with the VisualizerΒΆ

Use the Visualizer to visualize data, including exploratory visualization. The data charted by the Visualizer comes from fields within a set of documents. You navigate to the Visualizer from any of the collection viewers using the “light bulb” button. Note that when you open the Visualizer from such a collection viewer, the data that will be available to you will be the contents of that collection viewer. Thus, if your collection viewer contains 50 documents, you will be able to chart multiple data series but each such data series will have at most 50 data points. If you navigate from a collection viewer that is showing 500 documents then each data series plotted will have 500 data values. Use the collection viewer’s cursors and “Show” pull down to choose which documents you want to use for the charting and then navigate to the Visualizer.

If you are running Studio version 1.1 and up and up you also have a “plus” icon that allows you to acquire more documents. In the example above, if you started from a collection viewer that has 50 documents, you will start off with 50 data points. By clicking on the plus button you will increase your data points to 100. You can continue clicking on the plus button for as long as the cursor has more data and thus increase the data points plotted.

Tip: Remember that the Spreadsheet Bridge’s collection viewer is especially convenient in that it allows you to cursor and show documents based on arbitrary selection and projection and it is therefore useful to navigate from this collection viewer to the Visualizer.

The Visualizer has four panes as shown below:


Pane #1 is populated with the data elements from the documents you selected. It is a tree structured from the documents and you can expand/collapse sub-documents. Each field has up to four buttons - a text button, a numeric button, a date button and a discard button:

  • The text button indicates that this field has text values that can be used in chart dimensions that require a text - e.g. a bar chart label.
  • The numeric button indicates that this field has numeric values that can be used in chart dimensions that require a number - e.g. a line chart data series. Note - starting from version 1.3.2 you can use a numeric field where the graph expects to get a text field - the string representation of the number will be used. Please note that if your data set is such that the field has BOTH numerics and texts then ONLY the texts will be used for labels.
  • The date button indicates that this field has date values that can be used in chart dimensions in a line or scatter chart. Internally, dates are stored as milliseconds since epoch. All date fields are presented as both the date value (the number of milliseconds) and as a text value. Use either one depending on whether you want to plot the date as a label or as a value. When you click on the date icon the data on the right-hand-side will be presented as a numeric but when plotted will be displayed as a true date.
  • The discard button (with a minus sign) does not delete any data from the database but merely removes it from the tree view (the refresh button rebuilds the tree from scratch so if you remove a field by mistake, click the refresh button). Use this button when you have many fields and they clutter the Visualizer and you want to focus on only the important data. It is also useful for exploratory visualization since the selection/scoring algorithm picks from the data sets shown by the tree viewer and not from those that have been removed. The trash/minus button in the heading area of the tree viewer removes all fields that are named id since id fields are common but almost never useful for visualization.

Most fields will have the numeric or the text button but because documents can have different structures, you could have a field with both numeric and text values (note however that in this case the data series will be partial - i.e. may not have the same number of elements). All date fields will also have a text button – these will be the date strings and you can use them in charts that require text labels. You can click on each one of these buttons and the values for that field will be shown on Pane #4 on the two first tabs. The first tab shows all values (of the type) for that field. If it is a numeric field some statistical information such as the mean and the standard deviation are also shown. The second tab shows the distinct values for that field and how many times each occurs. In addition, you use the numeric/text buttons to select them as data series by dragging them into the input fields in Pane #2. For example, in the image above, drag the “balance” numeric button to the Y-axis to select the balance data values for the Y axis coordinates.

Select what and how to plot in Pane #2. First, select the chart type (if you change the chart type it clears the data series, so select the type first). Then select the data you want to plot either by dragging numeric/text buttons from Pane #1 to the input fields or typing the field names manually. The chart continuously updates itself as you are filling in these dimensions in Pane #3. Clear all selections by clicking on the “clear all” button.

The chart data itself is sent from the server to the browser in JSON format and you can view it or copy/paste it from the third tab on Pane #4.

Panes #1 and #4 maintain their size across sessions. When you resize these pane, it is persisted to the preferences collection so that the next time you use the Visualizer it has the same layout.

Pane #2 also has an “I feel lucky” button. Use this button to let the system help with exploratory analytics. You can use this button without selecting anything, or, select a chart type and click this button. In both cases the system iterates through permutations of data from the collections as potential data series and presents graphs that it believes may be of interest. If you do not select a chart type then all types are considered. Select a specific chart type if you only want that chart type to be considered. By default, the system creates 300 permutations, scores them and then selects up to 100 with the highest score. Each click of the button brings the next permutation scored. You can change these defaults as well as whether a random factor is used in the scoring using the Preferences.

Table Of Contents

Previous topic

Working with the Spreadsheet Bridge

Next topic

Working with the Schema Analyzer

Copyright © 2013-2016 jSonar, Inc
MongoDB is a registered trademark of MongoDB Inc. Excel is a trademark of Microsoft Inc. JSON Studio is a registered trademark of jSonar Inc. All trademarks and service marks are the property of their respective owners.