-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Hierarchical Data Format
Cameron Yick edited this page May 2, 2019
·
2 revisions
Several of the graph types are hierarchy
. You may be wondering about how to structure your data, since a generic data table is not necessarily compatible. Additionally, the D3 code samples for hierarchy visualizations may take a nested data structure, and RAWGraphs expects a table.
- For each
layer
in your hierarchy, define a column. - For each
leaf
in your hierarchy, define its path through all the layers (columns) you've defined. Every row will end up creating a new leaf. - If you're using a weighted visualization, add any additional numerical columns you need to size/color your leaves appropriately.
Here is snapshot example from the sample orchestra dataset, which can be used for weighted or unweighted visualizations. The first row is for column headers, the second row is where the data actually starts.
Orchestra type,Group,Instrument,Number
Modern orchestra,Brass,Baritone horn,1
Early Romantic orchestra,Woodwinds,Bass Clarinet,1
Late Romantic orchestra,Woodwinds,Bass Clarinet,1
Early Romantic orchestra,Percussion,Bass Drum,1
View the full data here.
These visualizations are for showing relationships among the nodes in your hierarchy, and all the nodes are treated equally.
- Cluster Dendrogram
- Circular Dendrogram
These visualizations let you size and/or color the nodes based on numeric columns.
- Sunburst
- Circle Packing
- Treemap