Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
graphical representation of number of notes? (Read 13478 times)
beru
Full Member
*
Offline



Posts: 52
Bærum
graphical representation of number of notes?
Aug 28th, 2009, 5:05am
 
let´s assume that I have a tbx document with notes about apples and bananas.

Can I have a map with 2 round shapes, 1 for apples and 1 for bananas, where the diameter is dependent of the number of notes about apples and bananas, respectively, in this tbx document?

(not sure what to use to define a banana versus apple note, maybe using a custom field or by using number of occurences of the key words within the note...)
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: graphical representation of number of notes?
Reply #1 - Aug 28th, 2009, 7:17am
 
Yes, this got kicked around at London RB w/e.  I've lost the demo I did then but I've got a new one part done.  I've got to break now but I should have TBX and grab for everyone in an hour or so.
Back to top
 
« Last Edit: Aug 28th, 2009, 7:18am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: graphical representation of number of notes?
Reply #2 - Aug 28th, 2009, 8:36am
 
Ok, here is a demo TBX and a grab of the basics is here:



We use a custom number-type field "MyCount" to hold our source number - in a real setting we might be using some actual calculated value though likely we'll still need a user attribute to hold the current total. Set the shape to 'oval' - to get a circle simply ensure height and width of the map icon are the same. I've used Display expressions to show the count as well but that's icing.

The three map circles are sourced in the different ways. Apples assumes the original note has a different shape needed in a different map. So we make a new note of the same name, TB allows this, but in our rule we must be careful to ensure the height/width are drawn from the correct note - to do this use a full our partial path when addressing the 'original' - i.e. the note whose count data we're displaying. The point is to ensure TB isn't left to guess which of several same-names notes from which it should take data. Rule used by the (map) 'Apples':
  $Height=$MyCount(/Apples);$Width=$MyCount(/Apples);

In the case of Pears, we approach the shape problem differently by using a new differently-named note. As a result making the rule we don't have to worry about paths (assuming 'Pears' is otherwise unique). Rule used by 'Pear count':
  $Height=$MyCount(Pears);$Width=$MyCount(Pears);

Oranges doesn't need to a define shape in the original location so we can use an alias. However, whilst the alias is its own height/width (as separate from its parent's h x w) but shares the parent's rule. So actually, I don't think this method will work unless we size the alias manually via its Info View (which I've not done in the grab & TBX. I'm probably missing something and I'm sure I'll be corrected.  A puzzle for someone else!

One other consideration - relative size. Small changes in diameter (width or height) make for a large degree is visual difference and makes combining items with markedly different values a bit difficult.  Clearly, if our actual source count is in the 000s we would want to do some maths before setting height/width or the icons would be unfeasible large. Indeed as circles expand in all directions they're less space-efficient for fitting in a given window size. Also if used in a dashboard context, with data that changes, compared to - say - a rectangle - it is far more likely we will need to manually reposition map circles in order to avoid overlapping (TB won't auto-deconflict placement; it doesn't pretend to, FWIW).

So, yes you can do map icon sizes related to some other value but my take on this is there are numerous other visualisations (take your pick - see aTbRef for more) that are easier to use and clearer in presentation terms.

Wow - sorry  - a much longer post than envisaged.  Don't forget link at top to the TBX I used for this demo.
Back to top
 
« Last Edit: Aug 28th, 2009, 5:20pm by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
beru
Full Member
*
Offline



Posts: 52
Bærum
Re: graphical representation of number of notes?
Reply #3 - Aug 28th, 2009, 9:14am
 
still trying to comprehend how it is done, but it is VERY nice. Thank you very much!
Back to top
 
« Last Edit: Aug 28th, 2009, 9:15am by beru »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: graphical representation of number of notes?
Reply #4 - Aug 28th, 2009, 9:21am
 
Thus the TBX! Use it and mangle it; a fresh copy can be got from the download. Basically, you've got explained two solutions to your basic concept and a third that I think probably does work but I've just not figured how! It all reinforces the fact that there's often more than one way to do things in TB.

For viualisalisation, the aTbRef page on the Map View might be a good starting point for exploration. Look at the notes on container plots, progress bars and the dashboard concept.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: graphical representation of number of notes?
Reply #5 - Aug 28th, 2009, 10:10am
 
Quibble: if you want the area of the note to reflect the number of pears, you probably want to set $Width and $Height to sqrt($Pears).

If you might have no pairs, it could be a good idea to add a small constant (0.5+sqrt($Pears)) so the notes with no fruit don't vanish entirely.
Back to top
 
 
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: graphical representation of number of notes?
Reply #6 - Aug 28th, 2009, 11:02am
 
I knew an expert would happen along soon and fill in the gaps! I like the trick of adding the constant to avoid the 'yes, we have no bananas' problem of disappearing fruit.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: graphical representation of number of notes?
Reply #7 - Aug 28th, 2009, 4:27pm
 
The demo TBX has been updated with a 'read me' note that includes, from the thread above, my explanation and Mark B's suggestions for more practical use of the technique. Use the link in the post above - it should pull the new file.
Back to top
 
« Last Edit: Aug 29th, 2009, 8:07am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
beru
Full Member
*
Offline



Posts: 52
Bærum
Re: graphical representation of number of notes?
Reply #8 - Aug 28th, 2009, 5:02pm
 
Thanks!!
Back to top
 
 
  IP Logged
Jean Goodwin
Full Member
*
Offline



Posts: 136
North Carolina
Re: graphical representation of number of notes?
Reply #9 - Aug 28th, 2009, 5:11pm
 
Hi, MarkA:  Thanks as always for the cool experiment!  Right now, the link is broken (or maybe just temporarily unavailable), but I look forward to reverse-engineering this example.

If you also set the MapTextSize of the "resized" note to some proportion of the $MyCount variable, not only the note's shape but its displayed text would inflate.  That could provide a primitive version of the "tag cloud" Scott was wishing after in a neighboring thread.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: graphical representation of number of notes?
Reply #10 - Aug 28th, 2009, 5:22pm
 
Oh, bother.  The curse of the typo. The original link is fixed but to save your time scrolling up, try here.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: graphical representation of number of notes?
Reply #11 - Aug 29th, 2009, 8:29am
 
Here's the map above with Mark B's srt(0.5+$MyCount)) principle applied:




The lack of difference is size isn't surprising a the original values are only 4 and 9. Overall the size are now perhaps a bit small. The later factor could easily be resolved by using a bigger constant - e.g. from 0.5 to 1.5.  The point to bear in mind that depending on the size of your source data (0s vs. 000s) you may wish to apply a different modifier to achieve suitable sizes for your map icons.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print