My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 7: TreeMap doesn't handle non-unique identifiers
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Aug 2011


 
Reported by tomhi...@gmail.com, Aug 5, 2011
What steps will reproduce the problem?
tm1 <- data.frame(id=c('Global', 'Region 1', 'Region 2', 'Place 1', 'Place 2', 'Place 1', 'Place 2'),
	parent=c(NA, 'Global', 'Global', 'Region 1', 'Region 1', 'Region 2', 'Region 2'),
	size=c(1:7), color=c(7:1))

tm2 <- gvisTreeMap(tm1, 'id', 'parent', 'size', 'color')

plot(tm2)

What is the expected output? What do you see instead?
expect to see place 1 and place 2 in their appropriate regions. Instead, all four appear in the first region.

What version of the product are you using? On what operating system?
googleVis_0.2.8 RJSONIO_0.8-2 
R version 2.13.1 (2011-07-08)
Platform: i386-pc-mingw32/i386 (32-bit)

Please provide any additional information below.

Perhaps this bug is on google's side, if so, a word of warning in the help file would be nice.
Aug 9, 2011
Project Member #1 markus.g...@googlemail.com
This behaviour is as expected. Tree maps display a tree like structure where every child has to have a unique parent, see the details section in the helpfile to gvisTreeMap.

In your example Place 1 has two different parents with Regions 1 & 2. The same is true for Place 2. Arguably there could be a warning message.  
Status: Accepted
Aug 9, 2011
#2 tomhi...@gmail.com
In my example, which perhaps was too ambiguous, place 1 under region 1 is different from place 1 under Region 2. Perhaps a better example would be US states broken up by urban and rural. The urban and rural parts of each state are distinct from each other, but named the same. In my opinion, the tree map should be able to display "Urban" and "Rural" under "New York" without having to rename the entities "New York Urban" and "New York Rural", which is currently the case. Thus, the combination of child and parent are indeed unique even though the child list on its own is not.

Again, if this is a limitation of google, then a warning is probably best.
Aug 9, 2011
Project Member #3 markus.g...@googlemail.com
Indeed, I believe this is a limitation of the Google API. I will include a warning section in the help file.
Thanks for your comments!
Aug 28, 2011
Project Member #4 markus.g...@googlemail.com
The warning section of the help file has been updated to highlight this potential issue.
Status: Done

Powered by Google Project Hosting