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
Maps and slopegraphs? (Read 4752 times)
Greg Korgeski
Full Member
*
Offline



Posts: 89
Vermont
Maps and slopegraphs?
Jul 12th, 2011, 8:01pm
 
Interesting article http://charliepark.org/slopegraphs/ on Edward Tufte's "Slopegraphs," with a discussion of the various approaches to making them.  Just wondering if anyone has seen/tried any kind of Tinderbox mapping approach to such a graph?  (One could just do it "by hand" of course, but would there be a way to have attributes be the basis for map location?  Is this a too basic question (like, "duh, everyone knows how to do that?") or something never before contemplated in the annals of Tinderboxery?

Thanks!

Greg
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Maps and slopegraphs?
Reply #1 - Jul 13th, 2011, 9:35am
 
I saw that too. Something like this perhaps:



OK, TB isn't a pure graphing tool so there are a few accommodations. We can't suppress arrowheads nor choose a link's point of attachment to an icon**.  Still, I got pretty close.  The Y axis is to scale except where icons overlap; there I manually moved lower ones down so titles didn't overlap.

** We could make invisible very small 0.1 x 0.1 notes at points and link those though that would be very fiddly.

[Later] There is a typo above, just fixed in the TBX (upload at time of this 'last edit') where both France and Belgium on the left link to Belgium on the right.

[Even later.  Another fix. Corrected screen grab and updated file - right-hand France/Belgium were in wrong order]
Back to top
 
« Last Edit: Jul 13th, 2011, 6:19pm 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: Maps and slopegraphs?
Reply #2 - Jul 13th, 2011, 10:13am
 
How was it done? Not necessarily the best way - I was just doing it as quick as I could. So first I added a 'slopegraph' link type that is straight and unlabelled. Next I added number attributes $StartGDP and EndGDP; number-type as I wanted to calculate icon position based on this data. I aslo added a string $OrigName. Next I added a container /Content and set the $OnAdd:

$Prototype = "Data"

The prototype "Data" initially showed the two new attributes above , plus $Xpos, $Ypos, $Width, $Height, $NameAlignment, $NameColor and $Opacity as I know we'll need these. In outline view , I turned on columns for StartGDP/EndGDP/Name/Xpos/Ypos. $NameAlignment set to 'right', $NameColor to 'black', $Opacity 0 (zero). Also set $DisplayExpressionDisabled to true.

I now added my children to 'Content', working down the left side of the source data. I then selected the first child, opened Explorer view and went through adding start/end GDP data. IClosed that view. In Outline, linked each note to its 'copy' note via a 'slopegraph' type link.

Next select all children and duplicate and duplicate "Data". Used an agent to set all 'copy' notes to "Data copy" prototype and set $OrigName to $Nape.replace(" copy",""). For the latter prototype change name alignment to 'left'. Data gets the display expression:

$Name+"   "+$StartGDP.format(1)

whilst "Data copy" gets:

$EndGDP.format(1)+"   "+$OrigName

The .format(2) ensures numbers like 44.0 display their decimal place.

Now, we put "Sweden copy" at $Xpos/$Ypos {0,0}. An agent finds all "Data copy" using notes and sets:

$Xpos(original)=0;$Ypos(original)=$EndGDP("Sweden copy")-$EndGDP;$Width=4.5;

whilst "Data" using notes are then found and told:

$Xpos(original)=-10;$Ypos(original)=$EndGDP("Sweden copy")-$StartGDP;$Width=4.5;

For overlapping notes, I added 0.35 to $Ypos to remove overlap - i.e. budging down to avoid overlap.

Added two notes as column labels - proved easier than adornments as I originally planned.

Result: Slopegraph.tbx

Enjoy!

[Later: Update TBX.  Right column entries now in correct size order.  Reduced all data/Data copy notes to $Height of 0.75.]
Back to top
 
« Last Edit: Jul 13th, 2011, 6:20pm by Mark Anderson »  

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



Posts: 89
Vermont
Re: Maps and slopegraphs?
Reply #3 - Jul 15th, 2011, 6:00pm
 
Sweet!

Very nice result.  Thanks!
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print