Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Data Applied:Tree Maps


Published on

Data Applied:Tree Maps

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Data Applied:Tree Maps

  1. 1. 5<br /> Tree Maps<br />
  2. 2. What are Treemaps?<br />Treemaps display hierarchical (tree-structured) data as a set of nested rectangles<br />Each branch of the tree is given a rectangle, which is then tiled with smaller rectangles representing sub-branches<br /> A leaf node's rectangle has an area proportional to a specified dimension on the data<br />The leaf nodes are colored to show a separate dimension of the data<br />
  3. 3. Standard Treemaps<br />The standard Treemaps algorithm just did the transition from hierarchical data to its representation in the rectangular form<br />An example:<br />
  4. 4. Standard Treemaps pseudo code<br />The tree-map algorithm assumes a tree structure in which each node contains a record with its directory or file name (name), the number of children (num_children), and an array of pointers to the next level (child [1..num_children]). The arguments to the tree-map algorithm are:<br />root : a pointer to the root of the tree or subtree<br />P, Q : arrays of length 2 with (x,y) coordinate pairs of opposite corners of the current rectangle (assume that Q contains the higher coordinates and P the lower coordinates, but this does not affect the correctness of the algorithm, only the order in which rectangles are drawn)<br />axis : varies between 0 and 1 to indicate cuts to be made vertically and horizontally<br />color: indicates the color to be used for the current rectangle.<br />
  5. 5. Standard Treemaps pseudo code<br />In addition we need:<br />Paint_rectangle : a procedure that paints within the rectangle using a given color, and resets the color variable.<br />Size : a function that returns the number of bytes in the node pointed to by the argument. Alternatively, the size could be pre-computed and stored in each node.<br />The initial call is:<br />Treemap(root, P, Q, 0, color)<br /> Where P and Q are the upper right and lower left corners of the display. By setting the axis argument to zero the initial partitions are made vertically. It is assumed that arguments P and Q are passed by value (since P, Q are modified within<br />
  6. 6. Standard Treemaps pseudo code<br />Treemap(root, P[0..1], Q[0..1], axis, color)<br />Paint_rectangle(P, Q, color) -- paint full area<br />width := Q[axis] - P[axis] -- compute location of next slice<br /> for i := 1 to num_children do<br /> Q[axis] := P[axis] + (Size(child[i])/Size(root))*width<br />Treemap(child[i], P, Q, 1 - axis, color) -- recur on each slice, flipping axes<br /> P[axis] := Q[axis];<br />endfor <br />
  7. 7. Problem with standard Treemaps<br />Treemaps often fall short to visualize the structure of the tree<br />Thin, elongated rectangles emerge as a result of the srtaight forward subdivision technique of standard treemaps<br /> The second problem can be solved by using a modified version of standard treemaps algorithm called: “SquarifiedTreemaps”<br />
  8. 8. SquarifiedTreemaps<br /> Instead of rectangles, in this algorithm we try do reduce the aspect ratio as much as possible and hence squarifytreemaps. Reason being:<br />Display space is used more efficiently. The number of pixels to be used for the border is proportional to its circumference. For rectangles this number is minimal if a square is used<br />Square items are easier to detect and point at<br />Comparison of the size of rectangles is easier when their aspect ratios are similar <br />
  9. 9. Squarification in practice<br />We initially start with a 6x4 rectangle and add areas 6,6,4,3,2,2,1 to it. At each addition we make sure we have the maximum aspect ratio<br />By standard treemaps algorithm:<br />
  10. 10. Squarification in practice<br />With squarification:<br />
  11. 11. Final layer to treemaps<br />The squares can be colored to represent an extra dimensions<br />The area/size can be represented using any parameter as per the requirement<br />
  12. 12. Using the DA-API to execute treemaps<br />
  13. 13. Using the DA-API to execute treemaps<br />Again to use the API we just need to figure out the correct entity and the message type<br />Looking at the specification the entity is RootTreeMapTaskInfo<br />The task will be completed in a sequence of multiple messages, as specified on the website<br />As the task is used for data visualization so it does not produce any type of result<br />
  14. 14. Message sequence<br />The steps are:<br />
  15. 15. Treemaps using Data Applied’s web interface<br />
  16. 16. Step1: Selection of data<br />
  17. 17. Step2: Selecting Tree Maps<br />
  18. 18. Step3: Result<br />
  19. 19. Visit more self help tutorials<br /><ul><li>Pick a tutorial of your choice and browse through it at your own pace.
  20. 20. The tutorials section is free, self-guiding and will not involve any additional support.
  21. 21. Visit us at</li>