{"id":3,"date":"2007-04-09T02:30:35","date_gmt":"2007-04-09T07:30:35","guid":{"rendered":"http:\/\/www.visophyte.org\/blog\/?p=3"},"modified":"2009-04-01T08:16:36","modified_gmt":"2009-04-01T13:16:36","slug":"an-actual-thunderbird-email-visualization-at-last","status":"publish","type":"post","link":"https:\/\/www.visophyte.org\/blog\/2007\/04\/09\/an-actual-thunderbird-email-visualization-at-last\/","title":{"rendered":"An actual thunderbird email visualization, at last!"},"content":{"rendered":"<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>\n<p><img decoding=\"async\" src=\"http:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2007\/04\/graphito-1.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.visophyte.org\/blog\/wp-content\/uploads\/2007\/04\/graphito-2.png\" alt=\"Graphito vis example 2\" \/><\/p>\n<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>\n<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>\n<p><img loading=\"lazy\" decoding=\"async\" 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>\n<ul>\n<li>Time flows from left-to-right, old-to-new.<\/li>\n<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>\n<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.\n<ul>\n<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>\n<li>Alpha-blended squares represent that person receiving a copy of the e-mail (&#8216;to:&#8217; only currently).<\/li>\n<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>\n<\/ul>\n<\/li>\n<li>Lines connect an e-mail with the message it is in reply to.  Alpha-blended lines accompany alpha-blended nodes.<\/li>\n<\/ul>\n<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>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" 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>\n<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>\n<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>\n<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>\n","protected":false},"excerpt":{"rendered":"<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: Now, of course, there are all kinds of caveats. This is all &hellip; <a href=\"https:\/\/www.visophyte.org\/blog\/2007\/04\/09\/an-actual-thunderbird-email-visualization-at-last\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[5,6,4],"tags":[40,126,39],"class_list":["post-3","post","type-post","status-publish","format-standard","hentry","category-email","category-thunderbird","category-visualizing","tag-pyxpcom","tag-thunderbird","tag-visophyte"],"_links":{"self":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/3","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/comments?post=3"}],"version-history":[{"count":1,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/3\/revisions"}],"predecessor-version":[{"id":231,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/posts\/3\/revisions\/231"}],"wp:attachment":[{"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/media?parent=3"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/categories?post=3"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.visophyte.org\/blog\/wp-json\/wp\/v2\/tags?post=3"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}