<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>visophyte: shiny? shiny. &#187; PyXPCOM</title>
	<atom:link href="http://www.visophyte.org/blog/tag/pyxpcom/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.visophyte.org/blog</link>
	<description>Andrew Sutherland writes things but (almost) always includes pictures to look at.</description>
	<lastBuildDate>Thu, 29 Sep 2011 02:22:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>An actual thunderbird email visualization, at last!</title>
		<link>http://www.visophyte.org/blog/2007/04/09/an-actual-thunderbird-email-visualization-at-last/</link>
		<comments>http://www.visophyte.org/blog/2007/04/09/an-actual-thunderbird-email-visualization-at-last/#comments</comments>
		<pubDate>Mon, 09 Apr 2007 07:30:35 +0000</pubDate>
		<dc:creator>Andrew Sutherland</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Thunderbird]]></category>
		<category><![CDATA[Visualizing]]></category>
		<category><![CDATA[PyXPCOM]]></category>
		<category><![CDATA[visophyte]]></category>

		<guid isPermaLink="false">http://www.visophyte.org/blog/?p=3</guid>
		<description><![CDATA[I have long had the goal of doing some form of e-mail visualization. After many false starts (for both Thunderbird and Outlook), I finally have something to show: Now, of course, there are all kinds of caveats. This is all done in Python using PyXPCOM and PyDOM (hooray Mark Hammond!) The bad news is that [...]]]></description>
			<content:encoded><![CDATA[<p>I have long had the goal of doing some form of e-mail visualization.  After many false starts (for both Thunderbird and Outlook), I finally have something to show:</p>
<p><img src="http://www.visophyte.org/blog/wp-content/uploads/2007/04/graphito-1.png" /></p>
<p><img src="http://www.visophyte.org/blog/wp-content/uploads/2007/04/graphito-2.png" alt="Graphito vis example 2" /></p>
<p>Now, of course, there are all kinds of caveats.  This is all done in Python using <a href="http://developer.mozilla.org/en/docs/PyXPCOM">PyXPCOM</a> and PyDOM (hooray <a href="http://www.python.net/crew/mhammond/">Mark Hammond</a>!)  The bad news is that the Python code is still unable to interact with the JavaScript pieces of Thunderbird.  The good news is Mark Hammond already has a solution to allow Python and JavaScript to interact somewhat transparently (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=327689">on bug 327689</a>).  Unfortunately, the patch does not work out of box for me, although it may be due to some underlying PyXPCOM problem that I still need to look into; I can&#8217;t even instantiate the error number service via PyXPCOM.</p>
<p>Since I haven&#8217;t implemented the labelling required to make the screenshot remotely intuitive, here&#8217;s an explanation of the visualization accompanied by a simpler picture generated by a test program using static data and the aggdraw renderer (no Thunderbird involved for this one):</p>
<p><img src="/blog/wp-content/uploads/2007/04/simple-graphito.png" title="Visualization using aggdraw to render from test data." alt="Visualization using aggdraw to render from test data." height="100" width="640" /></p>
<ul>
<li>Time flows from left-to-right, old-to-new.</li>
<li>The background represents the days of the week and standard 9-5 business hours.  Dark grey for the weekends, lighter grey for the week days, and then bands of even lighter gray for the 9-5 business hours on week days.  The background should simplify when dealing with larger time-scales, but that&#8217;s down the line.</li>
<li>Nodes are placed vertically so that each horizontal strip corresponds to a single e-mail address.  All nodes are colored based on their author.
<ul>
<li>Opaque squares represent an e-mail from that person  (the one who owns/is the strip) to me, the user of the program.</li>
<li>Alpha-blended squares represent that person receiving a copy of the e-mail (&#8216;to:&#8217; only currently).</li>
<li>Circles represent me, the user of the program, having sent an e-mail to that person.  If I sent it to many people, they each were on the &#8216;to:&#8217; line.</li>
</ul>
</li>
<li>Lines connect an e-mail with the message it is in reply to.  Alpha-blended lines accompany alpha-blended nodes.</li>
</ul>
<p>The first two visualizations are from a somewhat recent trunk build of Thunderbird with python and svg turned on.  I have omitted the rest of the Thunderbird window because I&#8217;d just have to blur most of it out anyways.  The data-sets come from two different folders that I copied interesting sets of messages to (including the messages from the thread in my &#8216;sent&#8217; folder).  Because of the aforementioned lack of javascript interaction, clicking on a node does nothing.  However, I do print out info on the message when you hover over it or click on it.  This is actually specified via the visualization infrastructure, it&#8217;s the &#8216;control&#8217; object which just prints it out in a debug fashion.</p>
<p style="text-align: center"><img src="http://www.visophyte.org/blog/wp-content/uploads/2007/04/filler-line-chart.png" title="Filler visualization, also by visophyte, rather silly though." alt="Filler visualization, also by visophyte, rather silly though." height="360" width="480" />[1]</p>
<p>The visualizations are powered by the python &#8216;visophyte&#8217; library which I have been developing.  Visophyte is the successor to the <a href="http://www.onlythewind.org/mt/s/docs/koalarainbow/examples.html">koalaRainbow</a> Movable Type plugin I wrote for the Movable Type 3.1 plugin contest.  koalaRainbow (for MT) was more of a simple procedural drawing markup mechanism fronting a query-language than a visualization engine.  Its visualization definitions were incomprehensible due to a lack of any real abstraction.  With any luck, visophyte will suffer the excesses of too much abstraction.  koalaRainbow (for MT) died because #1 I wrote it in order to learn Perl so that I could legitimately dislike Perl, and #2 I favor Python for all my scripting.  Visophyte will enjoy continual development because I love visualization and I use python all over the place.</p>
<p>One important note from the outset is that although I am a fan of PyXPCOM, I doubt visophyte as it exists would be appropriate for an email visualization plugin for thunderbird that would enjoy wide usage.  Developing a JavaScript visualization engine would be much less reusable for my purposes, so I&#8217;m not doing that.  One possibility might be to compile the visualizations to javascript, optimizing them as we go, a la <a href="http://pyjamas.pyworks.org/">pyjamas</a>.</p>
<p>1: This visualization is just here to break up the text.  It is also a visophyte simple test, but rather silly.  It is unlikely anyone would really want a line chart with pie charts at each point.  The line itself shows total sales by month, whereas the pie-chart shows a sales breakdown among products for that specific month.  A stacked area chart would be the &#8216;sane&#8217; alternative to this graph, though we could have multiple lines/pies here, I&#8217;m just too lazy to make up the data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.visophyte.org/blog/2007/04/09/an-actual-thunderbird-email-visualization-at-last/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

