Home‎ > ‎Announcements‎ > ‎

Better Rhizosphere treemaps in Google Spreadsheets

posted 21 Mar 2011, 07:19 by Riccardo Govoni
Rhizosphere v0.7 has just been released and includes important improvements in the area of Google Spreadsheets and Google Visualization integration.

Since the earliest releases of Rhizosphere, you have always been able to visualize data from your Google Spreadsheets or any custom Google Visualization API datasource. However, up until today, you only had access to a subset of Rhizosphere features when loading data from those sources. The main issue was related to the fact that both Spreadsheets and Google Visualization API model the datasets they handle as a bi-dimensional tabular data. This limits the type of relationships you can define: there is no explicit way in Google Spreadsheets to specify that a given row (for example representing an employee record) is linked to any other row (for example representing the employee manager). As a consequence, Rhizosphere was not able to offer advanced visualizations (like trees and treemaps) when visualizing data loaded directly from Google Spreadsheets.

Rhizosphere v0.7 introduces several conventions you can use to represent hierarchical data in Google Spreadsheets (and any other Google Visualization API datasource). You have now access to Rhizosphere tree and nested treemap representations of your Google Spreadsheets data. This builds on top of existing Rhizosphere features, which means you can slice'n'dice Spreadsheet-based treemaps using Rhizosphere dynamic filters and navigate them back and forward using Rhizosphere HTML5 History support.

Rhizosphere feature set surpasses equivalent visualizations that have been available so far (Google Visualization orchart, Google Visualization treemap):
  • You can define as many hierarchies as you want on your data. You are not limited to one.
  • Any hierarchy can have more than one root. You are not limited to representing a single tree of information.
  • Rhizosphere trees and treemaps react in real-time to the visualization filters you apply. You can dive to any depth of your treemaps, change the coloring or area rules on the fly (Google Visualization treemap is statically bound to a single area and/or color dimension at creation time), and then navigate back and forward over your analysis using the browser back/forward buttons.

Get started

Get started by having a look at the documentation for Google Spreadsheet users and Google Visualization API users.

How to represent hierarchical data in Google Spreadsheets

If you want Rhizosphere to infer a hierarchical structure from your Google Spreadsheet data, use any of the following conventions.

Describe parent-child relationships

Define two adjacent columns, the first containing an identifier of the datapoint the row represents (such as the name of the employee, in the organizational chart scenario), the second containing an identifier of the parent datapoint (such as the employee manager). If a record has no parent, leave the value of the second column empty.

Make sure the label of the column containing the parent data follows this naming rule: Parent + label of the preceding column. For example, in the organizational chart case, the first column might have the "Employee" label, and the second column will have the "ParentEmployee" label.

Rhizosphere will automatically pick up the relationship between the two columns and will let you display the data using either trees or treemaps.

Describe tree branches using multiple columns

Alternatively, you can define hierarchical data by fully describing the branch of the tree each spreadsheet row belongs to. Define as many adjacent columns as the depth of the tree you want to represent. Make sure all the colums have the same label. Then, for every row, fill the columns with node values running from the tree root down to the element the row itself represents (or belongs to).

Again, Rhizosphere will automatically rebuild the tree structure for you.

Describe tree branches using a single comma-separated column

Finally, you can also put all your hierarchical information in a single column. Fill the columns with node values running from the tree root down to the element the row itself represents (or belongs to), separating them with commas. If you do so, add the CATHIE word tag to the column label. Rhizosphere will notice the column label and try to rebuild the tree from the column values.

Multiple hierarchies

You are not limited to having a single hierarchy in your data. Rhizosphere can handle as many as you want. Here you can find a slightly more complex example that list employees of a fictional store arranging them both according to their organizational chart and according to the department they work in.

The two included Rhizosphere visualizations display the organizational chart and a treemap of sales data arranged by department. You can find the original spreadsheet here.


Comments