| Issue 7: | TreeMap doesn't handle non-unique identifiers | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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
Status:
Accepted
Aug 9, 2011
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
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
The warning section of the help file has been updated to highlight this potential issue.
Status:
Done
|