<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/assets/rss.xsl" type="text/xsl"?><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>Sacha Chua - category - visualization</title>
	<atom:link href="https://sachachua.com/blog/category/visualization/feed/index.xml" rel="self" type="application/rss+xml" />
	<atom:link href="https://sachachua.com/blog/category/visualization" rel="alternate" type="text/html" />
	<link>https://sachachua.com/blog/category/visualization/feed/index.xml</link>
	<description>Emacs, sketches, and life</description>
	<lastBuildDate>Fri, 17 Apr 2026 04:27:43 GMT</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>daily</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>11ty</generator>
  <item>
		<title>Considering these monthly emoji summaries</title>
		<link>https://sachachua.com/blog/2025/09/considering-these-monthly-emoji-summaries/</link>
		<dc:creator><![CDATA[Sacha Chua]]></dc:creator>
		<pubDate>Fri, 05 Sep 2025 15:17:41 GMT</pubDate>
    <category>writing</category>
<category>visualization</category>
		<guid isPermaLink="false">https://sachachua.com/blog/2025/09/considering-these-monthly-emoji-summaries/</guid>
		<description><![CDATA[<p>
In February, I started adding emojis to my monthly summaries. I added emojis to the lines for the text versions of my monthly sketches, then used a little bit of Emacs Lisp to convert that into HTML code with the text as a tooltip. I wondered what it might be like to represent a lot of days very densely. Would the constrained vocabulary of emojis be enough to give me a sense of the time, combined with the ability to hover over the emojis to see the keywords I wrote for that day?
</p>

<span class="emoji-summary"><a href="https://sachachua.com/blog/2025/03/monthly-review-february-2025/">Feb:</a> <span title="looking ahead - 1">👀</span><span title="dance - 2">💃</span><span title="curriculum checklist - 3">✅</span><a href="https://sachachua.com/blog/2025/02/looking-at-landscapes-art-and-iteration/" title="Art Gallery of Ontariqo - 4">🖼️</a><span title="MakeyMakey - 5">🤖</span><a href="https://sachachua.com/blog/2025/02/sketching-practice-beaver-goose-squirrel-sparrow-flower-sheepdog-and-sheep/" title="sheepdog - 6">🐕</a><span title="iPad experiments - 7">📱</span><a href="https://sachachua.com/blog/2025/02/two-weeks-with-the-ipad-air-supernote-a5x-and-lenovo-p52/" title="my own iPad - 8">📱</a><span title="sledding - 9">🛷</span><span title="sorting through photos - 10">📸</span><span title="drew a review of A+'s 8th year - 11">🎨</span><a href="https://sachachua.com/blog/2025/02/ago-field-trip-2-moments-in-modernism-landscapes/" title="Moments in Modernism - 12">🏢</a><span title="sledding snow day - 13">🛷</span><span title="piano and voice - 14">🎤</span><span title="even more snow - 15">☃️</span><span title="quinzhee - 16">❄️</span><span title="galaxy cookies - 17">🍪</span><span title="shovelling trail walkway - 18">🚲</span><span title="individual assessment - 19">📝</span><span title="cupcakes - 20">🧁</span><span title="icing - 21">🧁</span><span title="skating party - 22">⛸️</span><span title="breaking up ice - 23">❄️</span><span title="Minecraft Parkour Spiral 2 - 24">🌀</span><span title="more skating - 25">⛸️</span><span title="results: growth, exceptionality - 26">📈</span><a href="https://sachachua.com/blog/2025/02/letting-a-play-with-generative-artificial-intelligence-for-fiction/" title="Comparing Claude and ChatGPT - 27">🤖</a><span title="word search - 28">🔍</span></span>
<span class="emoji-summary"><a href="https://sachachua.com/blog/2025/04/monthly-review-march-2025-going-on-field-trips-shifting-from-fretting-to-learning/">Mar:</a> <span title="campfire - 1">🔥</span><span title="Minecraft & singing - 2">🎵</span><span title="peach pie - 3">🥧</span><span title="apples & marshmallows - 4">🍎</span><span title="doodling - 5">✏️</span><span title="skating in the wind - 6">⛸️</span><span title="RSS, thoughts on reading - 7">📰</span><span title="tired kids - 8">😴</span><span title="cubing comp - 9">⏲️</span><span title="pizza playdate - 10">🍕</span><span title="creeper 3D print - 11">🖨️</span><span title="quiet day, watched Moana 2 - 12">🏝️</span><span title="arcade - 13">🎮</span><span title="bookstore, meds - 14">📚</span><span title="music theory - 15">🎵</span><span title="LEGO Incredibles - 16">🎮</span><span title="monkey bars - 17">🐒</span><span title="tooth: UR2 - 18">🦷</span><span title="playing with the group - 19">👥</span><span title="Sand cakes with A- - 20">🧁</span><span title="pottery wheel - 21">🏺</span><span title="feelings - 22">💭</span><span title="TV - 23">📺</span><span title="Ripley's Aquarium - 24">🐟</span><span title="bike playdate - 25">🚲</span><span title="hot chocolate - 26">☕</span><span title="chocolate cupcake - 27">🧁</span><span title="trails - 28">🥾</span><span title="freezing rain - 29">🌧️</span><span title="homework lap - 30">📝</span><span title="proud of buying snacks & cereal - 31">🛒</span></span>
<span class="emoji-summary"><a href="https://sachachua.com/blog/2025/05/monthly-review-april-2025/">Apr:</a> <span title="Pictionary - 1">✏</span><span title="Charades - 2">🎭</span><span title="bike playdate - 3">🚲</span><span title="clothes, shoes - 4">👕</span><span title="reflection - 5">🤔</span><span title="gardening - 6">🌱</span><span title="Minecraft together - 7">🎮</span><span title="A+: finger cut - 8">🩹</span><span title="set up a village - 9">🏘️</span><span title="trial chamber - 10">🪓</span><span title="blazes - 11">🔥</span><span title="nether wart, skeleton spawner - 12">🌱</span><span title="bike maintenance, park playtime - 13">🔧</span><span title="pretend Minecraft - park - 14">🎭</span><span title="aquarium - 15">🐠</span><span title="writing - 16">✍️</span><span title="early Easter egg hunt - 17">🥚</span><span title="gardening - 18">🌱</span><span title="Easter Monster Math Hunt - 19">🖩</span><span title="Bike Brigade - 20">🚲</span><span title="monkey bars - 21">🐒</span><span title="bubbles - 22">🫧</span><span title="right-size Band-aid - 23">🩹</span><span title="another sunny day - 24">☀️</span><span title="experimented with Minecraft club - 25">🎮</span><span title="scooter parking - 26">🛴</span><span title="Bike Brigade, trail mix - 27">🚲</span><span title="drawing with Popo - 28">✏</span><span title="ice cream - 29">🍨</span><span title="reading, drawing - 30">📚</span></span>
<span class="emoji-summary"><a href="https://sachachua.com/blog/2025/06/monthly-review-may-2025/">May:</a> <span title="rainy day writing - 1">🌧️</span><span title="painting pottery - 2">🎨</span><span title="newsletter training - 3">📰</span><span title="Bike Brigade - 4">🚴</span><span title="dandelions - 5">🌼</span><span title="cat food delivery - 6">🐱</span><span title="toad day - 7">🐸</span><span title="newsletter - 8">📰</span><span title="dental cleaning - 9">🦷</span><span title="sewing - 10">🧵</span><span title="trackless train - 11">🚂</span><span title="s'mores - 12">🔥</span><span title="dogs in Minecraft - 13">🐕</span><span title="monkey bars, fashion - 14">🐒</span><span title="at the castle playground - 15">🏰</span><span title="s'mores and popsicles - 16">🔥</span><span title="W-'s bike light - 17">💡</span><span title="clothes, sewing - 18">👗</span><span title="compost - 19">♻️</span><span title="Stardew Valley - 20">🎮</span><span title="More Stardew, rainy day - 21">🌧️</span><span title="Trout derby - Stardew Valley - 22">🎣</span><span title="silo, fair - Stardew Valley - 23">🎪</span><span title="pottery wheel, ankle hurts - 24">🏺</span><span title="laptop refresh - 25">💻</span><span title="ice cream - 26">🍦</span><span title="whee! - 27">🎢</span><span title="peppermint tea, drizzle - 28">☕</span><span title="farmers market strawberries - 29">🍓</span><span title="market playground - 30">🛝</span><span title="sewing - 31">🧵</span></span>
<span class="emoji-summary"><a href="https://sachachua.com/blog/2025/07/monthly-review-june-2025/">June:</a> <span title="art gallery - 1">🖼️</span><span title="splash pad - 2">💦</span><span title="jump rope, seedlings - 3">🪴</span><span title="lots of sewing - 4">🪡</span><span title="sewed a hat - 5">🪡</span><span title="upside down with friends - 6">🙃</span><span title="radishes, ice cream - 7">🍦</span><span title="biked through rain - 8">🚲</span><span title="storage bag - 9">🪡</span><span title="cracker - 10">🍪</span><span title="tough bedtime - 11">😴</span><span title="ice cream bar - 12">🍦</span><span title="friend delivery - 13">🚲</span><span title="potato print, pizza party - 14">🥔</span><span title="visited grandparents - 15">👴</span><span title="wedding dress in Stardew - 16">👰</span><span title="hulled lots of strawberries - 17">🍓</span><span title="rainy day, golden walnuts - 18">🌧️</span><span title="ROM - 19">🦕</span><span title="sick day for A+ - 20">🌡</span><span title="apple pies - 21">🥧</span><span title="my turn to be sick - 22">😷</span><span title="fever, naps - 23">🌡</span><span title="strawberries, lettuce, report card - 24">🍓</span><span title="stayed up for music homework - 25">🎵</span><span title="aprons - 26">🪡</span><span title="last day of school, first day of wading pool - 27">🏊</span><span title="pottery, two pies - 28">🏺</span><span title="hopping with J- & K- - 29">🐸</span><span title="swim skirt, 23x9= math - 30">🪡</span></span>
<span class="emoji-summary"><a href="https://sachachua.com/blog/2025/08/monthly-review-july-2025/">July:</a> <span title="Swimming, poi, fireworks - 1">🎇</span><span title="High Park pool - 2">🏊</span><span title="farmers market bread - 3">🥖</span><span title="Minecraft at the park - 4">🎮</span><span title="somersault, somer-pepper - 5">🏊</span><span title="Stardew Valley Expanded - 6">🎮</span><span title="sand restaurant; supermarket sims - 7">🏖️</span><span title="more diving toys - 8">🦈</span><span title="errands: clothes, books - 9">🛍️</span><span title="poi - 10">🗘</span><span title="snacks - 11">🧺</span><span title="3 breaths while swimming - 12">🏊</span><span title="card games - 13">🂡</span><span title="swim checklists, lessons - 14">🏊</span><span title="deep end test, water slide - 15">🏊</span><span title="needs more practice to pass - 16">🏊</span><span title="LEGO Glinda and Elphaba's dorm - 17">🪄</span><span title="LEGO Mindstorms - 18">🤖</span><span title="lightsabers - 19">⚔️</span><span title="clothes shopping - 20">👕</span><span title="mulberries - 21">🥣</span><span title="LEGO Spike Prime - 22">🤖</span><span title="bike playdate - 23">🚴</span><span title="last swim lesson; Sunnyside party - 24">🏊</span><span title="doing our own thing at the pool - 25">🏊</span><span title="Biidaasige Park, ziplines; Korean BBQ - 26">😃</span><span title="KidSpark; pottery - 27">🏺</span><span title="Kidspark; wontons - 28">🥣</span><span title="Perler beads - 29">🎨</span><span title="more mulberries - 30">🫐</span><span title="bike playdate - 31">🚴</span></span>
<span class="emoji-summary"><a href="https://sachachua.com/blog/2025/09/monthly-review-august-2025/">Aug:</a> <span title="dolls, flowers - 1">🌻</span><span title="shopping - 2">🛍️</span><span title="aquarium - 3">🐠</span><span title="damming water - 4">🌊</span><span title="played Stardew at home - 5">🎮</span><span title="water at the splash pad - 6">💦</span><span title="bike adventure - A+ rode 13km - 7">🚴</span><span title="ROM, phone moisture - 8">🦕</span><span title="KidSpark: " I="" would="" like="" to="" buy="" a="" papaya"="" -="" 9"="">🛒</span><span title="Create Hypertubes - 10">⛏️</span><span title="A+: -5.00 prescription - 11">👓</span><span title="birthday, Wicked LEGO - 12">🎂</span><span title="origami rose - 13">🌹</span><span title="playdate at C-'s house - 14">🏠</span><span title="playdate at our house: Duplo, flower - 15">🌻</span><span title="magic show - 16">🎩</span><span title="handstands - 17">🤸</span><span title="pottery wheel summer camp - 18">🏺</span><span title="colouring - 19">🖍️</span><span title="opening cabinet - 20">🗄️</span><span title="trimming - 21">🏺</span><span title="marbling - 22">🎨</span><span title="mask discussion - 23">😷</span><span title="Gong-gong's birthday - 24">🎂</span><span title="Science Centre at Sherway - 25">👧</span><span title="CNE (still fun) - 26">🎡</span><span title="KidSpark Pictionary - 27">🎨</span><span title="Minecraft Experience - 28">⛏️</span><span title="A+ and piano - 29">🎹</span><span title="Walk with W- and A+, Lion Dance - 30">🦁</span><span title="Minecraft with cousins, catching up on blog carnivals - 31">⛏️</span></span>

<p>
Not bad. I can see the campfire and s'mores days (🔥), the time we were sick (🌡️), the shift from skating and sledding to biking and swimming, the days when I focused on sewing. In contrast, here are the monthly calendar sketches:
</p>

<div class="two-col-thumbnails" id="org93324c1">
<p>
</p><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2025-02-28-04%20February%202025%20&#45;&#45;%20monthly%20review.png" data-src="https://sketches.sachachua.com/static/2025-02-28-04%20February%202025%20&#45;&#45;%20monthly%20review.png" data-title="2025-02-28-04 February 2025 &#45;&#45; monthly review.png" data-w="3347" data-h="2759"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2025-02-28-04%20February%202025%20&#45;&#45;%20monthly%20review.png" width="" height="" alt="2025-02-28-04 February 2025 &#45;&#45; monthly review.png" loading="lazy" decoding="async">
      <figcaption>2025-02-28-04 February 2025 &#45;&#45; monthly review.png</figcaption>
    </picture></a></div><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2025-03-31-05%20March%202025%20&#45;&#45;%20monthly%20review.jpeg" data-src="https://sketches.sachachua.com/static/2025-03-31-05%20March%202025%20&#45;&#45;%20monthly%20review.jpeg" data-title="2025-03-31-05 March 2025 &#45;&#45; monthly review.jpeg" data-w="2748" data-h="2013"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2025-03-31-05%20March%202025%20&#45;&#45;%20monthly%20review.jpeg" width="" height="" alt="2025-03-31-05 March 2025 &#45;&#45; monthly review.jpeg" loading="lazy" decoding="async">
      <figcaption>2025-03-31-05 March 2025 &#45;&#45; monthly review.jpeg</figcaption>
    </picture></a></div><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2025-04-30-03%20April%202025%20&#45;&#45;%20monthly%20review.jpeg" data-src="https://sketches.sachachua.com/static/2025-04-30-03%20April%202025%20&#45;&#45;%20monthly%20review.jpeg" data-title="2025-04-30-03 April 2025 &#45;&#45; monthly review.jpeg" data-w="2652" data-h="2037"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2025-04-30-03%20April%202025%20&#45;&#45;%20monthly%20review.jpeg" width="" height="" alt="2025-04-30-03 April 2025 &#45;&#45; monthly review.jpeg" loading="lazy" decoding="async">
      <figcaption>2025-04-30-03 April 2025 &#45;&#45; monthly review.jpeg</figcaption>
    </picture></a></div><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2025-05-31-06%20May%202025%20%23monthly%20%23review.jpeg" data-src="https://sketches.sachachua.com/static/2025-05-31-06%20May%202025%20%23monthly%20%23review.jpeg" data-title="2025-05-31-06 May 2025 #monthly #review.jpeg" data-w="2636" data-h="2012"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2025-05-31-06%20May%202025%20%23monthly%20%23review.jpeg" width="" height="" alt="2025-05-31-06 May 2025 #monthly #review.jpeg" loading="lazy" decoding="async">
      <figcaption>2025-05-31-06 May 2025 #monthly #review.jpeg</figcaption>
    </picture></a></div><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2025-06-30-04%20June%202025%20%23monthly%20%23review.jpeg" data-src="https://sketches.sachachua.com/static/2025-06-30-04%20June%202025%20%23monthly%20%23review.jpeg" data-title="2025-06-30-04 June 2025 #monthly #review.jpeg" data-w="2605" data-h="2004"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2025-06-30-04%20June%202025%20%23monthly%20%23review.jpeg" width="" height="" alt="2025-06-30-04 June 2025 #monthly #review.jpeg" loading="lazy" decoding="async">
      <figcaption>2025-06-30-04 June 2025 #monthly #review.jpeg</figcaption>
    </picture></a></div><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2025-07-31-10%20July%202025%20%23monthly%20%23review.jpeg" data-src="https://sketches.sachachua.com/static/2025-07-31-10%20July%202025%20%23monthly%20%23review.jpeg" data-title="2025-07-31-10 July 2025 #monthly #review.jpeg" data-w="2685" data-h="1997"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2025-07-31-10%20July%202025%20%23monthly%20%23review.jpeg" width="" height="" alt="2025-07-31-10 July 2025 #monthly #review.jpeg" loading="lazy" decoding="async">
      <figcaption>2025-07-31-10 July 2025 #monthly #review.jpeg</figcaption>
    </picture></a></div><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2025-08-31-13%20August%202025%20&#45;&#45;%20monthly%20review.jpeg" data-src="https://sketches.sachachua.com/static/2025-08-31-13%20August%202025%20&#45;&#45;%20monthly%20review.jpeg" data-title="2025-08-31-13 August 2025 &#45;&#45; monthly review.jpeg" data-w="2900" data-h="2050"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2025-08-31-13%20August%202025%20&#45;&#45;%20monthly%20review.jpeg" width="" height="" alt="2025-08-31-13 August 2025 &#45;&#45; monthly review.jpeg" loading="lazy" decoding="async">
      <figcaption>2025-08-31-13 August 2025 &#45;&#45; monthly review.jpeg</figcaption>
    </picture></a></div>
<p></p>

</div>

<p>
Hmm. I'm primarily interested in episodic memory retrieval and pattern recognition. The emoji summaries might be better at showing repetition because of the constrained vocabulary and the density is neat, but they're not quite expressive enough to resonate with me. I don't like hovering to see the tooltip, but by itself, the emoji doesn't usually have enough information to trigger my memory (either on its own or as part of the episodic context). Emojis and text also open up the possibility of an "on this day" slice, but I can get that with the plain text or by adding an on-this-day.rss to my web-based journal viewer with maybe some kind of private feed in our local network.
</p>

<p>
The sketches are more fun to flip through, especially now that I'm adding more colour to them. I can show repetition through background colour or icons in my monthly sketches. If I click on these images in my blog post or in my <a href="https://sketches.sachachua.com">public sketchbook</a> (ex: monthly sketches) using either my laptop or my tablet, I can page through them quickly, like the idea of rapid serial visual presentation <sup><a id="fnr.rsvp" class="footref" href="https://sachachua.com/blog/feed/index.xml#fn.rsvp" role="doc-backlink">1</a></sup>. (This is great! Now I'm tempted to figure out how to disable all animations for <a href="https://github.com/henrygd/bigger-picture">BiggerPicture</a> for just that bit of extra speed, which I think is a matter of tinkering with <code>mediaTransition</code>&hellip;) I wonder what it would take to have an automatic "on this day" slice for my monthly calendar sketches. Maybe if I was stricter about using a template so that I can automatically extract boxes from it, or maybe if I can use recognized numbers to figure out the layout&hellip; Definitely a someday thing, but could be an interesting challenge.
</p>

<p>
Do I want to do these emoji summaries long-term? <a href="https://www.reddit.com/r/dataisbeautiful/comments/1cg02nj/oc_5_years_of_emojis_each_days_journal/">Someone summarized 5 years of diary entries as emojis</a>, and of course there's an <a href="https://www.emojijournal.net/">app</a> to do this too. Even on a larger scale, though, I think I might just get a few "huh, how about that" moments out of it rather than "wow, that's amazing." I think that if I continue with my <a href="https://sachachua.com/blog/2025/09/considering-the-format-of-daily-sketches/">daily sketches</a>, that's probably more fun for me to make and review, and it still contains enough information to allow me to map the days to emojis later on if I want to. I can probably discontinue this emoji experiment. I'm glad I explored it, though.
</p>

<p>
In case you're curious about the Emacs Lisp code for extracting the emoji summaries, here's the function. It looks for the top-level blog post, scans for lines matching "dayNum. (emoji) text summary of day", and then turns that into the appropriate span, including links if there are any.
</p>


<div class="org-src-container">
<pre class="src src-emacs-lisp"><code>(<span class="org-keyword">defun</span> <span class="org-function-name">my-org-emoji-summary</span> (<span class="org-type">&amp;optional</span> label)
  (<span class="org-keyword">let</span> (results)
    (<span class="org-keyword">save-excursion</span>
      (goto-char (org-find-property <span class="org-string">"EXPORT_ELEVENTY_PERMALINK"</span> (org-entry-get-with-inheritance <span class="org-string">"EXPORT_ELEVENTY_PERMALINK"</span>)))
      (<span class="org-keyword">let</span> ((end (<span class="org-keyword">save-excursion</span> (org-end-of-subtree))))
        (<span class="org-keyword">while</span> (re-search-forward <span class="org-string">"^</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">(</span></span><span class="org-string">[0-9]+</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">)</span></span><span class="org-string">\\. </span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">(</span></span><span class="org-string">[</span><span class="org-string"><span class="org-negation-char">^</span></span><span class="org-string">A-Za-z0-9]+</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">)</span></span><span class="org-string"> </span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">(</span></span><span class="org-string">.+?</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">)</span></span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">(</span></span><span class="org-string">- weekly highlight</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">)</span></span><span class="org-string">?\n"</span> end t)
          (<span class="org-keyword">let</span> ((day (match-string 1))
                (icon (match-string 2))
                (text (match-string 3)))
            (<span class="org-keyword">push</span>
             (<span class="org-keyword">if</span> (string-match org-link-bracket-re text)
                 (format <span class="org-string">"&lt;a href=\"%s\" title=\"%s - %s\"&gt;%s&lt;/a&gt;"</span>
                         (match-string 1 text)
                         (match-string 2 text)
                         day
                         icon)
               (format <span class="org-string">"&lt;span title=\"%s - %s\"&gt;%s&lt;/span&gt;"</span>
                       text
                       day
                       icon))
             results)))))
    (format <span class="org-string">"&lt;div class=\"emoji-summary\"&gt;%s%s&lt;/div&gt;"</span>
            (<span class="org-keyword">if</span> label (concat label <span class="org-string">": "</span>) <span class="org-string">""</span>)
            (string-join (nreverse results) <span class="org-string">""</span>))))
</code></pre>
</div>

<div id="blog-2025-09-considering-these-monthly-emoji-summaries-footnotes">
<h3 class="footnotes">Footnotes</h3>
<div id="blog-2025-09-considering-these-monthly-emoji-summaries-text-footnotes">

<div class="footdef"><sup><a id="fn.rsvp" class="footnum" href="https://sachachua.com/blog/feed/index.xml#fnr.rsvp" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"><p class="footpara">
Bruijn, Oscar &amp; Spence, Robert. (2000). <a href="https://www.researchgate.net/publication/220944929_Rapid_Serial_Visual_Presentation_A_space-timed_trade-off_in_information_presentation">Rapid Serial Visual Presentation: A space-timed trade-off in information presentation</a>. 189-192. 10.1145/345513.345309. <a href="https://www.researchgate.net/profile/Oscar_Bruijn2/publication/220944929_Rapid_Serial_Visual_Presentation_A_space-timed_trade-off_in_information_presentation/links/09e415112db90c75ed000000.pdf">PDF</a> accessed 2025-09-05.
</p></div></div>


</div>
</div><div><a href="https://sachachua.com/blog/2025/09/considering-these-monthly-emoji-summaries/index.org">View org source for this post</a></div>
<p>You can <a href="mailto:sacha@sachachua.com?subject=Comment%20on%20https%3A%2F%2Fsachachua.com%2Fblog%2F2025%2F09%2Fconsidering-these-monthly-emoji-summaries%2F&body=Name%20you%20want%20to%20be%20credited%20by%20(if%20any)%3A%20%0AMessage%3A%20%0ACan%20I%20share%20your%20comment%20so%20other%20people%20can%20learn%20from%20it%3F%20Yes%2FNo%0A">e-mail me at sacha@sachachua.com</a>.</p>]]></description>
		</item><item>
		<title>Treemap visualization of an Org Mode file</title>
		<link>https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/</link>
		<dc:creator><![CDATA[Sacha Chua]]></dc:creator>
		<pubDate>Sun, 12 Jan 2025 13:39:55 GMT</pubDate>
    <category>org</category>
<category>visualization</category>
		<guid isPermaLink="false">https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/</guid>
		<description><![CDATA[<div class="update" id="org35c8be4">
<p>
<span class="timestamp-wrapper"><span class="timestamp">[2025-01-12 Sun]</span></span>: u/dr-timeous posted a <a href="https://gist.github.com/TimotheeMathieu/91fc04530fa7fb0c30c7cfbd00ec2a64">treemap_org.py · GitHub</a> that makes a coloured treemap that displays the body on hover. (<a href="https://www.reddit.com/r/emacs/comments/1hztdbu/treemaps_and_orgmode_visualization/">Reddit</a>) Also, I think <a href="https://gnome.pages.gitlab.gnome.org/librsvg/devel-docs/features.html">librsvg doesn't support wrapped text</a>, so that might mean manually wrapping if I want to figure out the kind of text density that webtreemap has.
</p>

</div>

<div class="two-col" id="orgef322ae">
<div class="col" id="org835d46f">
<p>
One of the challenges with digital notes is that
it's hard to get a sense of volume, of mass, of
accumulation. Especially with Org Mode, everything
gets folded away so neatly and I can jump around
so readily with <code>C-c j</code> (<code>org-goto</code>) or <code>C-u C-c
C-w</code> (<code>org-refile</code>) that I often don't stumble
across the sorts of things I might encounter in a
physical notebook.
</p>

<p>
Treemaps are a quick way to visualize hierarchical
data using nested rectangles or squares, giving a
sense of relative sizes. I was curious about what
my main organizer.org file would look like as a
treemap, so I wrote some code to transform it into
the kind of data that
<a href="https://github.com/danvk/webtreemap">https://github.com/danvk/webtreemap</a> wants as
input. webtreemap creates an HTML file that uses
Javascript to let me click on nodes to navigate
within them.
</p>

<p>
For this treemap prototype, I used
<code>org-map-entries</code> to go over all the headings and
make a report with the outline path and the size
of the heading. To keep the tree visualization
manageable, I excluded done/cancelled tasks and
archived headings. I also wanted to exclude some
headings from the visualization, like the way my
Parenting subheading has lots of personal
information underneath it. I added a <code>:notree:</code>
tag to indicate that a tree should not be
included.
</p>

</div>
<div class="col" id="orgaf65fb0">
<p>
</p><figure><video controls="1" src="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/2025-01-11_12.47.49.webm" type="video/webm"><a href="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/2025-01-11_12.47.49.webm">Download the video</a></video><figcaption><div>Screencast of exploring a treemap</div></figcaption></figure>
<p></p>

</div>

</div>
<div id="outline-container-org6dd2abf" class="outline-2">
<h3 id="org6dd2abf">Reflections</h3>
<div class="outline-text-2" id="text-org6dd2abf">

<figure id="org58b500b">
<a href="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/2025-01-11_19-54-47.png"><img src="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/2025-01-11_19-54-47.png" alt="2025-01-11_19-54-47.png"></a>

<figcaption><span class="figure-number">Figure 1: </span>Screenshot of the treemap for my organizer.org</figcaption>
</figure>

<p>
The video and the screenshot above show the
treemap for my main Org Mode file,
<code>organizer.org</code>. I feel like the treemap makes it
easier to see projects and clusters where I'd
accumulated notes, both in terms of length and
quantity. (I've omitted some trees like
"Parenting" which take up a fairly large chunk of
space.)
</p>

<p>
To no one's surprise, Emacs takes up a large part
of my notes and ideas. =)
</p>

<p>
When I look at this treemap, I notice a bunch of
nodes I need to mark as <code>DONE</code> or <code>CANCELLED</code>
because I forgot to update my organizer.org. That
usually happens when I come up with an idea, don't
remember that I'd come up with it before, put it
in my inbox.org file, and do it from there or from
the organizer.org location I've refiled it to
without bumping into the first idea. Once in a
blue moon, I go through my whole organizer.org
file and clean out the cruft. Maybe a treemap like
this will make it easier to quickly scan things.
</p>

<p>
Interestingly, "Explore AI" takes up a
disproportionately large chunk of my "Inactive
Projects" visualization, even though I spend more
time and attention on other things. Large language
models make it easy to generate a lot of text, but
I haven't really done the work to process those.
I've also collected a lot of links that I haven't
done much with.
</p>

<p>
It might be neat to filter the headings by
timestamp so that I can see things I've touched in
the last 6 months.
</p>

<p>
Hmm, looking at this treemap reminds me that I've
got "organizer.org/Areas/Ideas for things to do
with focused time/Writing/", which probably should
get moved to the <code>posts.org</code> file that I tend to
use for drafts. Let's take look at the treemap for
that file. (Updated: cleared it out!)
</p>


<figure id="org79e8c37">
<a href="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/2025-01-11_20-10-18.png"><img src="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/2025-01-11_20-10-18.png" alt="2025-01-11_20-10-18.png"></a>

<figcaption><span class="figure-number">Figure 2: </span>Drafts in my posts.org</figcaption>
</figure>

<p>
Unlike my <code>organizer.org</code> file, my <code>posts.org</code>
file tends to be fairly flat in terms of
hierarchy. It's just a staging ground for ideas
before I put them on my blog. I usually try to
keep posts short, but a few of my posts have
sub-headings. Since the treemap makes it easy to
see nodes that are larger or more complex, that
could be a good nudge to focus on getting those
out the door. Looking at this treemap reminds me
that I've got a bunch of EmacsConf posts that I
want to finish so that I can document more of our
processes and tools.
</p>


<figure id="org3beca22">
<a href="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/2025-01-11_14-52-28.png"><img src="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/2025-01-11_14-52-28.png" alt="2025-01-11_14-52-28.png"></a>

<figcaption><span class="figure-number">Figure 3: </span>Treemap of my inbox</figcaption>
</figure>

<p>
My <code>inbox.org</code> is pretty flat too, since it's
really just captured top-level notes that I'll
either mark as done or move somewhere else
(usually <code>organizer.org</code>). Because the treemap
visualization tool uses <code>/</code> as a path separator,
the treemap groups headings that are plain URLs
together, grouped by domain and path.
</p>


<figure id="orgc54d5f9">
<a href="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/2025-01-12_08-30-44.png"><img src="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/2025-01-12_08-30-44.png" alt="2025-01-12_08-30-44.png"></a>

<figcaption><span class="figure-number">Figure 4: </span>Treemap of my Emacs configuration</figcaption>
</figure>

<p>
My Emacs configuration is organized as a
hierarchy. I usually embed the explanatory blog
posts in it, which explains the larger nodes. I
like how the treemap makes it easy to see the
major components of my configuration and where I
might have a lot of notes/custom code. For
example, my config has a surprising amount to do
with multimedia considering Emacs is a text
editor, and that's mostly because I like to tinker
with my workflow for sketchnotes and subtitles.
This treemap would be interesting to colour based
on whether something has been described in a blog
post, and it would be great to link the nodes in a
published SVG to the blog post URLs. That way, I
can more easily spot things that might be fun to
write about.
</p>
</div>
</div>
<div id="outline-container-orgf8daa91" class="outline-2">
<h3 id="orgf8daa91">The code</h3>
<div class="outline-text-2" id="text-orgf8daa91">
<p>
This assumes <a href="https://github.com/danvk/webtreemap">https://github.com/danvk/webtreemap</a> is installed with <code>npm install -g webtreemap-cli</code>.
</p>


<div class="org-src-container">
<pre class="src src-emacs-lisp">(<span class="org-keyword">defvar</span> <span class="org-variable-name">my-org-treemap-temp-file</span> <span class="org-string">"~/treemap.html"</span>) <span class="org-comment-delimiter">; </span><span class="org-comment">Firefox inside Snap can't access /tmp</span>
(<span class="org-keyword">defvar</span> <span class="org-variable-name">my-org-treemap-command</span> <span class="org-string">"treemap"</span> <span class="org-doc">"Executable to generate a treemap."</span>)

(<span class="org-keyword">defun</span> <span class="org-function-name">my-org-treemap-include-p</span> (node)
  (not (<span class="org-keyword">or</span> (eq (org-element-property <span class="org-builtin">:todo-type</span> node) <span class="org-highlight-quoted-quote">'</span><span class="org-highlight-quoted-symbol">done</span>)
           (member <span class="org-string">"notree"</span> (org-element-property <span class="org-builtin">:tags</span> node))
           (org-element-property-inherited <span class="org-builtin">:archivedp</span> node <span class="org-highlight-quoted-quote">'</span><span class="org-highlight-quoted-symbol">with-self</span>))))

(<span class="org-keyword">defun</span> <span class="org-function-name">my-org-treemap-data</span> (node <span class="org-type">&amp;optional</span> path)
  <span class="org-doc">"Output the size of headings underneath this one."</span>
  (<span class="org-keyword">let</span> ((sub
         (apply
          <span class="org-highlight-quoted-quote">'</span><span class="org-highlight-quoted-symbol">append</span>
          (org-element-map
              (org-element-contents node)
              <span class="org-highlight-quoted-quote">'</span>(headline)
            (<span class="org-keyword">lambda</span> (child)
              (<span class="org-keyword">if</span> (my-org-treemap-include-p child)
                  (my-org-treemap-data
                   child
                   (append path
                           (list
                            (org-no-properties
                             (org-element-property <span class="org-builtin">:raw-value</span> node)))))
                (list
                 (list
                  (-
                   (org-element-end child)
                   (org-element-begin child))
                  (string-join
                   (cdr
                    (append path
                            (list
                             (org-no-properties
                              (org-element-property <span class="org-builtin">:raw-value</span> node))
                             (org-no-properties
                              (org-element-property <span class="org-builtin">:raw-value</span> child)))))
                   <span class="org-string">"/"</span>)
                  nil))))
            nil nil <span class="org-highlight-quoted-quote">'</span><span class="org-highlight-quoted-symbol">headline</span>))))
    (append
     (list
      (list
       (-
        (org-element-end node)
        (org-element-begin node)
        (apply <span class="org-highlight-quoted-quote">'</span><span class="org-highlight-quoted-symbol">+</span> (mapcar <span class="org-highlight-quoted-quote">'</span><span class="org-highlight-quoted-symbol">car</span> sub))
        )
       (string-join
        (cdr
         (append path
                 (list
                  (org-no-properties (org-element-property <span class="org-builtin">:raw-value</span> node)))))
        <span class="org-string">"/"</span>)
       (my-org-treemap-include-p node)))
     sub)))

(<span class="org-keyword">defun</span> <span class="org-function-name">my-org-treemap</span> ()
  <span class="org-doc">"Generate a treemap."</span>
  (<span class="org-keyword">interactive</span>)
  (<span class="org-keyword">save-excursion</span>
    (goto-char (point-min))
    (<span class="org-keyword">let</span> ((file (expand-file-name (expand-file-name my-org-treemap-temp-file)))
          (data (cdr (my-org-treemap-data (org-element-parse-buffer)))))
      (<span class="org-keyword">with-temp-file</span> file
        (call-process-region
         (mapconcat
          (<span class="org-keyword">lambda</span> (entry)
            (<span class="org-keyword">if</span> (elt entry 2)
                (format <span class="org-string">"%d %s\n"</span> (car entry)
                        (replace-regexp-in-string org-link-bracket-re <span class="org-string">"\\2"</span> (cadr entry)))
              <span class="org-string">""</span>))
          data
          <span class="org-string">""</span>)
         nil
         my-org-treemap-command nil t t))
      (browse-url (concat <span class="org-string">"file://"</span> (expand-file-name my-org-treemap-temp-file))))))
</pre>
</div>


<p>
There's another <a href="https://github.com/nikolaydubina/treemap">treemap visualization tool</a> that
can produce squarified treemaps as coloured SVGs,
so that style might be interesting to explore too.
</p>
</div>
</div>
<div id="outline-container-orge6b6a66" class="outline-2">
<h3 id="orge6b6a66">Next steps</h3>
<div class="outline-text-2" id="text-orge6b6a66">
<p>
I think there's some value in being able to look
at and think about my outline headings with a
sense of scale. I can imagine a command that shows
the treemap for the current subtree and allows
people to click on a node to jump to it (or maybe
shift-click to mark something for bulk action), or
one that shows subtrees summing up <code>:EFFORT:</code>
estimates or maybe clock times from the logbook,
or one limited by a timestamp range, or one that
highlights matching entries as you type in a
query, or one that visualizes s-exps or JSON or
project files or test coverage.
</p>

<p>
It would probably be more helpful if the treemap
were in Emacs itself, so I could quickly jump to
the Org nodes and read more or mark something as
done when I notice it. <a href="https://gitlab.com/grinn.amy/boxy-headings">boxy-headings</a> uses text to
show the spatial relationships of nested headings,
which is neat but probably not up to handling this
kind of information density. Emacs can also
display SVG images in a buffer, animate them, and
handle mouse-clicks, so it could be interesting to
implement a general treemap visualization which
could then be used for all sorts of things like
disk space usage, files in project modules, etc.
SVGs would probably be a better fit for this
because that allows increased text density and
more layout flexibility.
</p>

<p>
It would be useful to browse the treemap within
Emacs, export it as an SVG so that I can include
it in a webpage or blog post, and add some
Javascript for web-based navigation.
</p>

<p>
The Emacs community being what it is (which is
awesome!), I wouldn't be surprised if someone's
already figured it out. Since a quick search
for <code>treemap</code> in the package archives and various
places doesn't seem to turn anything up, I thought
I'd share these quick experiments in case they
resonate with other people. I guess I (or someone)
could figure out <a href="https://vanwijk.win.tue.nl/stm.pdf">the squarified treemapping
algorithm</a> or the <a href="https://www3.cs.stonybrook.edu/~mueller/teaching/cse591_visAnalytics/treeMaps.pdf">ordered treemap algorithm</a> in
Emacs Lisp, and then we can see what we can do
with it.
</p>

<p>
I've also thought about other visualizations that
can help me see my Org files a different way.
Network graphs are pretty popular among the
org-roam crew because <a href="https://github.com/org-roam/org-roam-ui">org-roam-ui</a> makes them.
Aside from a few process checklists that link to
headings that go into step-by-step detail and
things that are meant to <a href="https://sachachua.com/web/beginner-map.html">graph connections between
concepts</a>, most of my Org Mode notes don't
intentionally link to other Org Mode notes. (There
are also a bunch of random org-capture context
annotations I haven't bothered removing.) I tend
to link to my public blog posts, sketches, and
source code rather than to other headings, so
that's a layer of indirection that I'd have to
custom-code. Treemaps might be a good start,
though, as they take advantage of the built-in
hierarchy. Hmm&#x2026;
</p>
</div>
</div>
<div><a href="https://sachachua.com/blog/2025/01/treemap-visualization-of-an-org-mode-file/index.org">View org source for this post</a></div>

<p>You can <a href="mailto:sacha@sachachua.com?subject=Comment%20on%20https%3A%2F%2Fsachachua.com%2Fblog%2F2025%2F01%2Ftreemap-visualization-of-an-org-mode-file%2F&body=Name%20you%20want%20to%20be%20credited%20by%20(if%20any)%3A%20%0AMessage%3A%20%0ACan%20I%20share%20your%20comment%20so%20other%20people%20can%20learn%20from%20it%3F%20Yes%2FNo%0A">e-mail me at sacha@sachachua.com</a>.</p>]]></description>
		</item><item>
		<title>Exploring neighbourhood libraries and other notes from the Toronto Public Library Hackathon</title>
		<link>https://sachachua.com/blog/2015/11/exploring-neighbourhood-libraries-and-other-notes-from-the-toronto-public-library-hackathon/</link>
		<dc:creator><![CDATA[Sacha Chua]]></dc:creator>
		<pubDate>Mon, 16 Nov 2015 05:39:00 GMT</pubDate>
    <category>visualization</category>
<category>development</category>
<category>geek</category>
<category>kaizen</category>
		<guid isPermaLink="false">https://sachachua.com/blog/?p=28468</guid>
		<description><![CDATA[<p>UPDATE 2015-11-30: <a href="http://torontopubliclibrary.typepad.com/digital_design_studio/2015/11/great-ideas-and-teamwork-displayed-at-inaugural-tpl-hackathon.html">Here&apos;s the Toronto Public Library&apos;s recap, along with other videos.</a></p>
<p>UPDATE 2015-11-27: Here&apos;s the video of my hackathon pitch:</p>
<p><iframe loading="lazy" src="https://www.youtube.com/embed/wnZHIWB-zD4" width="640" height="360" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>UPDATE 2015-11-18: I figured out how to make this&#xA0;entirely client-side, so you don&apos;t have to run a separate server. First, install&#xA0;either <a href="http://tampermonkey.net">Tampermonkey</a> (Chrome) or <a href="https://addons.mozilla.org/en-us/firefox/addon/greasemonkey/">Greasemonkey</a> (Firefox). Then install the user script <a href="https://github.com/sachac/explore-neighbourhood-libraries/raw/master/insert-visualize-link.user.js">insert-visualize-link.user.js</a>&#xA0;, and the Visualize link should appear next to the library branch options on Toronto Public Library search result&#xA0;pages. See the <a href="https://github.com/sachac/explore-neighbourhood-libraries">Github repository</a> for more details.</p>
<p>Yay! My neighbourhood library visualization won at the <a href="http://www.torontopubliclibrary.ca/hackathon/">Toronto Public Library hackathon</a>. It added a Visualize link to the search results page which mapped the number of search results by branch. For example, here&apos;s a visualization of a search that shows items matching &quot;<a href="http://www.torontopubliclibrary.ca/search.jsp?Ntt=avengers+comics">Avengers comics</a>&quot;.</p>
<p><img loading="lazy" class="alignnone size-medium wp-image-28470" src="https://sachachua.com/blog/wp-content/uploads/2015/11/avengers-640x287.png" alt="avengers" width="640" height="287" srcset="https://sachachua.com/blog/wp-content/uploads/2015/11/avengers-640x287.png 640w, https://sachachua.com/blog/wp-content/uploads/2015/11/avengers-280x126.png 280w, https://sachachua.com/blog/wp-content/uploads/2015/11/avengers.png 1366w" sizes="(max-width: 640px) 100vw, 640px"></p>
<p>It&apos;s a handy way to see which branches you might want to go to so that you can browse through what&apos;s there in person.</p>
<p>Librarians could also use it to help them plan their selections, since it&apos;s easy to see the distribution across branches. For example, here&apos;s the visualization for <a href="http://www.torontopubliclibrary.ca/search.jsp?N=37918+20491">books in Tagalog</a>.</p>
<p><a href="https://sachachua.com/blog/wp-content/uploads/2015/11/tagalog.png"><img loading="lazy" class="alignnone size-medium wp-image-28471" src="https://sachachua.com/blog/wp-content/uploads/2015/11/tagalog-640x363.png" alt="tagalog" width="640" height="363" srcset="https://sachachua.com/blog/wp-content/uploads/2015/11/tagalog-640x363.png 640w, https://sachachua.com/blog/wp-content/uploads/2015/11/tagalog-280x159.png 280w, https://sachachua.com/blog/wp-content/uploads/2015/11/tagalog.png 1057w" sizes="(max-width: 640px) 100vw, 640px"></a></p>
<p>The collections roughly match up with <a href="http://www.toronto.ca/wellbeing">Wellbeing Toronto</a>&apos;s data on Tagalog as the home language, although there are some areas that could probably use collections of their own.</p>
<p><a href="https://sachachua.com/blog/wp-content/uploads/2015/11/tagalog-census.png"><img loading="lazy" class="alignnone size-medium wp-image-28472" src="https://sachachua.com/blog/wp-content/uploads/2015/11/tagalog-census-640x480.png" alt="tagalog census" width="640" height="480" srcset="https://sachachua.com/blog/wp-content/uploads/2015/11/tagalog-census-640x480.png 640w, https://sachachua.com/blog/wp-content/uploads/2015/11/tagalog-census-267x200.png 267w, https://sachachua.com/blog/wp-content/uploads/2015/11/tagalog-census.png 960w" sizes="(max-width: 640px) 100vw, 640px"></a></p>
<p>Incidentally, I was delighted to learn that Von Totanes had done a detailed analysis of the library&apos;s Filipino collections in the chapter he wrote in <i>Filipinos in Canada: Disturbing Invisibility</i> (Coloma, McElhinny, and Tungohan, 1992). Von sent me the chapter after I mentioned the hackathon on Facebook; yay people bumping into other people online!</p>
<p>Personally, I&apos;m looking forward to using this visualization to see things like which branches have new videos. Videos released in the past year can only be borrowed in person &#x2013; you can&apos;t request them online &#x2013; so it&apos;s good to check branches regularly to see if they&apos;re there. It would be even better if the library search engine had a filter for &quot;On the shelf right now&quot;, but in the meantime, this visualization tool gives me a good idea of our chances of picking up something new to watch while we&apos;re folding laundry. =)</p>
<p><b>Notes</b></p>
<p><a href="https://github.com/sachac/explore-neighbourhood-libraries">https://github.com/sachac/explore-neighbourhood-libraries</a></p>
<p>More notes will probably follow, but here are a few quick drawings:</p>
<p><img loading="lazy" class="alignnone size-medium wp-image-28473" src="https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15b-Tech-Exploring-neighbourhood-libraries-index-card-tpl-hackathon-640x383.png" alt="2015-11-15b Tech - Exploring neighbourhood libraries &#45;&#45; index card #tpl #hackathon" width="640" height="383" srcset="https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15b-Tech-Exploring-neighbourhood-libraries-index-card-tpl-hackathon-640x383.png 640w, https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15b-Tech-Exploring-neighbourhood-libraries-index-card-tpl-hackathon-280x168.png 280w, https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15b-Tech-Exploring-neighbourhood-libraries-index-card-tpl-hackathon.png 1497w" sizes="(max-width: 640px) 100vw, 640px"></p>
<p></p><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2015-11-15b%20Tech%20-%20Exploring%20neighbourhood%20libraries%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon.png" data-src="https://sketches.sachachua.com/static/2015-11-15b%20Tech%20-%20Exploring%20neighbourhood%20libraries%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon.png" data-title="2015-11-15b Tech - Exploring neighbourhood libraries &#45;&#45; index card #tpl #hackathon" data-w="1497" data-h="896"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2015-11-15b%20Tech%20-%20Exploring%20neighbourhood%20libraries%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon.png" width="" height="" alt="2015-11-15b Tech - Exploring neighbourhood libraries &#45;&#45; index card #tpl #hackathon" loading="lazy" decoding="async">
      <figcaption>2015-11-15b Tech - Exploring neighbourhood libraries &#45;&#45; index card #tpl #hackathon</figcaption>
    </picture></a></div><p></p>
<p><img loading="lazy" class="alignnone size-medium wp-image-28474" src="https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15c-Kaizen-and-the-Toronto-Public-Library-hackathon-index-card-tpl-hackathon-kaizen-improvement-640x383.png" alt="2015-11-15c Kaizen and the Toronto Public Library hackathon &#45;&#45; index card #tpl #hackathon #kaizen #improvement" width="640" height="383" srcset="https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15c-Kaizen-and-the-Toronto-Public-Library-hackathon-index-card-tpl-hackathon-kaizen-improvement-640x383.png 640w, https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15c-Kaizen-and-the-Toronto-Public-Library-hackathon-index-card-tpl-hackathon-kaizen-improvement-280x168.png 280w, https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15c-Kaizen-and-the-Toronto-Public-Library-hackathon-index-card-tpl-hackathon-kaizen-improvement.png 1497w" sizes="(max-width: 640px) 100vw, 640px"></p>
<p></p><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2015-11-15c%20Kaizen%20and%20the%20Toronto%20Public%20Library%20hackathon%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon%20%23kaizen%20%23improvement.png" data-src="https://sketches.sachachua.com/static/2015-11-15c%20Kaizen%20and%20the%20Toronto%20Public%20Library%20hackathon%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon%20%23kaizen%20%23improvement.png" data-title="2015-11-15c Kaizen and the Toronto Public Library hackathon &#45;&#45; index card #tpl #hackathon #kaizen #improvement" data-w="1497" data-h="896"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2015-11-15c%20Kaizen%20and%20the%20Toronto%20Public%20Library%20hackathon%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon%20%23kaizen%20%23improvement.png" width="" height="" alt="2015-11-15c Kaizen and the Toronto Public Library hackathon &#45;&#45; index card #tpl #hackathon #kaizen #improvement" loading="lazy" decoding="async">
      <figcaption>2015-11-15c Kaizen and the Toronto Public Library hackathon &#45;&#45; index card #tpl #hackathon #kaizen #improvement</figcaption>
    </picture></a></div><p></p>
<p></p><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2015-11-15d%20Other%20reflections%20from%20TPL%20hackathon%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon%20%23introversion%20%23prototyping%20%23presenting.png" data-src="https://sketches.sachachua.com/static/2015-11-15d%20Other%20reflections%20from%20TPL%20hackathon%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon%20%23introversion%20%23prototyping%20%23presenting.png" data-title="2015-11-15d Other reflections from TPL hackathon &#45;&#45; index card #tpl #hackathon #introversion #prototyping #presenting" data-w="1497" data-h="896"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2015-11-15d%20Other%20reflections%20from%20TPL%20hackathon%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon%20%23introversion%20%23prototyping%20%23presenting.png" width="" height="" alt="2015-11-15d Other reflections from TPL hackathon &#45;&#45; index card #tpl #hackathon #introversion #prototyping #presenting" loading="lazy" decoding="async">
      <figcaption>2015-11-15d Other reflections from TPL hackathon &#45;&#45; index card #tpl #hackathon #introversion #prototyping #presenting</figcaption>
    </picture></a></div><p></p>
<p></p><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2015-11-15d%20Other%20reflections%20from%20TPL%20hackathon%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon%20%23introversion%20%23prototyping%20%23presenting.png" data-src="https://sketches.sachachua.com/static/2015-11-15d%20Other%20reflections%20from%20TPL%20hackathon%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon%20%23introversion%20%23prototyping%20%23presenting.png" data-title="2015-11-15d Other reflections from TPL hackathon &#45;&#45; index card #tpl #hackathon #introversion #prototyping #presenting" data-w="1497" data-h="896"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2015-11-15d%20Other%20reflections%20from%20TPL%20hackathon%20&#45;&#45;%20index%20card%20%23tpl%20%23hackathon%20%23introversion%20%23prototyping%20%23presenting.png" width="" height="" alt="2015-11-15d Other reflections from TPL hackathon &#45;&#45; index card #tpl #hackathon #introversion #prototyping #presenting" loading="lazy" decoding="async">
      <figcaption>2015-11-15d Other reflections from TPL hackathon &#45;&#45; index card #tpl #hackathon #introversion #prototyping #presenting</figcaption>
    </picture></a></div><p></p>
<p><img loading="lazy" class="alignnone size-medium wp-image-28476" src="https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15e-Ideas-for-following-up-on-TPL-hackathon-index-card-prototyping-tpl-hackathon-640x383.png" alt="2015-11-15e Ideas for following up on TPL hackathon &#45;&#45; index card #prototyping #tpl #hackathon" width="640" height="383" srcset="https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15e-Ideas-for-following-up-on-TPL-hackathon-index-card-prototyping-tpl-hackathon-640x383.png 640w, https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15e-Ideas-for-following-up-on-TPL-hackathon-index-card-prototyping-tpl-hackathon-280x168.png 280w, https://sachachua.com/blog/wp-content/uploads/2015/11/2015-11-15e-Ideas-for-following-up-on-TPL-hackathon-index-card-prototyping-tpl-hackathon.png 1497w" sizes="(max-width: 640px) 100vw, 640px"></p>
<p></p><div class="sketch-thumbnail"><a class="photoswipe" href="https://sketches.sachachua.com/filename/2015-11-15e%20Ideas%20for%20following%20up%20on%20TPL%20hackathon%20&#45;&#45;%20index%20card%20%23prototyping%20%23tpl%20%23hackathon.png" data-src="https://sketches.sachachua.com/static/2015-11-15e%20Ideas%20for%20following%20up%20on%20TPL%20hackathon%20&#45;&#45;%20index%20card%20%23prototyping%20%23tpl%20%23hackathon.png" data-title="2015-11-15e Ideas for following up on TPL hackathon &#45;&#45; index card #prototyping #tpl #hackathon" data-w="1497" data-h="896"><picture>
      <img src="https://sketches.sachachua.com/thumbnails/2015-11-15e%20Ideas%20for%20following%20up%20on%20TPL%20hackathon%20&#45;&#45;%20index%20card%20%23prototyping%20%23tpl%20%23hackathon.png" width="" height="" alt="2015-11-15e Ideas for following up on TPL hackathon &#45;&#45; index card #prototyping #tpl #hackathon" loading="lazy" decoding="async">
      <figcaption>2015-11-15e Ideas for following up on TPL hackathon &#45;&#45; index card #prototyping #tpl #hackathon</figcaption>
    </picture></a></div><p></p>
<p>&#xA0;</p>
<p>The <a href="https://github.com/sachac/explore-neighbourhood-libraries">code</a> works by extracting the branch names and totals on the left side of search pages and combining those with the <a href="http://www.torontopubliclibrary.ca/data/library-data.kml">locations of the branches (KML)</a>. I don&apos;t really need the server component, so I&apos;m thinking of rewriting the script so that it runs entirely client-side &#8211; maybe as a Chrome extension or as a user script. That way, other people can play with the idea without running their own server (and without my having to keep a server around), and we can try it out without waiting for the library to integrate it into their website. That said, it would be totally awesome to get it into the interface of the Toronto Public Library! We&apos;ll just have to see if it can happen. =) Happy to chat with library geeks to get this sorted out.</p>
<p>It was fun working on this. W- decided to join me at the last minute, so it turned into a fun weekend of hanging out with my husband at the library. I wanted to keep my weekend flexible and low-key, so I decided not to go through the team matchmaking thing. W- found some comfy chairs in the corner of the area, I plugged in the long extension cord I brought, and we settled in.</p>
<p>I learned a lot from the hackathon mentors. In particular, I picked up some excellent search and RSS tips from <a href="https://twitter.com/waharnum">Alan Harnum</a>. You can&apos;t search with a blank query, but he showed me how you can start with a text string, narrow the results using the facets on the left side, and then remove the text string from the query in order to end up with a search that uses only the facets. He also showed me that the RSS feed had extra information that wasn&apos;t in the HTML source and that it could be paginated with URL parameters. Most of the RSS feeds I&apos;d explored in the past were nonpaginated subsets of the information presented on the websites, so it was great to learn about the possibilities I had overlooked.</p>
<p>The faceted search was exactly what I needed to list recent videos even if I didn&apos;t know what they were called, so I started thinking of fun tools that would make hunting for popular new videos easier. (There have been quite a few times when I&apos;ve gone to a library at opening time so that I could snag a video that was marked as available the night before!) In addition to checking the specific item&apos;s branch details to see where it was on the shelf and which copies were out on loan, I was also curious about whether we were checking the right library, or if other libraries were getting more new videos than our neighbourhood library was.</p>
<p>W- was curious about the Z39.50 protocol that lets you query a library catalogue. I showed him the little bits I&apos;d figured out last week using <code>yaz-client</code> from the <code>yaz</code> package, and he started digging into the protocol reference. He figured out how to get it to output XML (<code>format xml</code>) and how to search by different attributes. I&apos;m looking forward to reading his notes on that.</p>
<p>Me, I figured that there might be something interesting in the visualization of new videos and other items. I hadn&apos;t played around a lot with geographic visualization, so it was a good excuse to pick up some skills. First, I needed to get the data into the right shape.</p>
<p><b>Step 1: Extract the data and test that I was reading it correctly</b></p>
<p>I usually find it easier to start with the data rather than visualizations. I like writing small data transformation functions and tests, since they don&apos;t involve complex external libraries. (If you miss something important when coding a visualization, often nothing happens!)</p>
<p>I wrote a function to extract information from the branch CSV on the <a href="http://hackathon.tplcs.ca/">hackathon data page</a>, using <code>fast-csv</code> to read it as an array of objects. I tested that with <code>jasmine-node</code>. Tiny, quick accomplishment.</p>
<p>Then I worked on extracting the branch result count from the search results page. This was just a matter of finding the right section, extracting the text, and converting the numbers. I saved a sample results page to my project and used <a href="https://github.com/cheeriojs/cheerio">cheerio</a> to parse it. I decided not to hook it up to live search results until I figured out the visualization aspect. No sense in hitting the library website repeatedly or dealing with network delays.</p>
<p><b>Step 2: Make a simple map that shows library branches</b></p>
<p>I started with the <a href="https://developers.google.com/maps/tutorials/visualizing/earthquakes">Google Maps earthquake tutorial</a>. The data I&apos;d extracted had addresses but not coordinates. I tried using the Google geocoder, but with my rapid tests, I ran into rate limits pretty early. Then it occurred to me that with their interest in open data, the library was the sort of place that would probably have a file with branch coordinates in terms of latitude and longitude. The hackathon data page didn&apos;t list any obvious matches, but a search for Toronto Public Library KML (an extension I remembered from W-&apos;s explorations with GPS and OpenStreetMap) turned up the <a href="http://www.torontopubliclibrary.ca/data/library-data.kml">file I wanted</a>. I wrote a test to make sure this worked as I expected.</p>
<p><b>Step 3: Combine the data</b></p>
<p>At first I tried to combine the data on the client side, making one request for the branch information and another request for the results information. It got a bit confusing, though &#8211; I need to get the hang of using <code>require</code> in a from-scratch webpage. I decided the easiest way to try my idea out was to just make the server combine the data and return the GeoJSON that the tutorial showed how to visualize. That way, my client-side HTML and JS could stay simple.</p>
<p><b>Step 4: Fiddle with the visualization options</b></p>
<p>Decisions, decisions&#x2026; Red was too negative. Blue and green were hard to see. W- suggested orange, and that worked out well with Google Maps&apos; colours. Logarithmic scale or linear scale? Based on a maximum? After experimenting with a bunch of options, I decided to go with a linear scale (calculated on the server), since it made sense for the marker for a branch with a thousand items to be significantly bigger than a branch with five hundred items. I played with this a bit until I came up with maximum and minimum sizes that made sense to me.</p>
<p><b>Step 5: Hook it up to live search data</b></p>
<p>I needed to pass the URL of the search results, and I knew I wanted to be able to call the visualization from the search results page itself. I used <a href="http://tampermonkey.net/">TamperMonkey</a> to inject some Javascript into the Toronto Public Library webpage. The library website didn&apos;t use JQuery, so I looked up the plain-vanilla Javascript way of selecting and modifying elements.</p>
<div class="org-src-container">
<pre class="src src-js2">document.querySelector(&apos;#refinements-library_branch&apos;)
  .parentNode.querySelector(&apos;h3&apos;).innerHTML =
  &apos;Library Branch &lt;a target=&quot;_blank&quot; style=&quot;color: white; &apos; +
  &apos;text-decoration: underline&quot; &apos; +
  &apos;href=&quot;http://localhost:9000/viz.html?url=&apos; +
  encodeURIComponent(location.href) + &apos;&quot;&gt;(Visualize)&lt;/a&gt;&apos;;
</pre>
</div>
<p><b>Step 6: Tweak the interface</b></p>
<p>I wanted to display information on hover and filter search results on click. Most of the tutorials I saw focused on how to add event listeners to individual markers, but I eventually found an example that showed how to <a href="https://developers.google.com/maps/documentation/javascript/examples/layer-data-event">add a listener</a> to <code>map.data</code> and get the information from the event object. I also found out that you could add a <code>title</code> attribute and get a simple tooltip to display, which was great for confirming that I had the data all lined up properly.</p>
<p><b>Step 7: Cache the results</b></p>
<p>Testing with live data was a bit inconvenient because of occasional timeouts from the library website, so I decided to cache search results to the filesystem. I didn&apos;t bother writing code for checking last modification time, since I knew it was just for demos and testing.</p>
<p><b>Step 8: Prettify the hover</b></p>
<p>The tooltip provided by <code>title</code> was a little bare, so I decided to spend some time figuring out how to make better information displays before taking screenshots for the presentation. I found an example that showed how to create and move an InfoWindow based on the <a href="https://duncan99.wordpress.com/2011/11/04/google-maps-api-adding-infowindows-in-response-to-user-clicks/">event&apos;s location</a> instead of relying on marker information, so I used that to show the information with better formatting.</p>
<p><b>Step 9: Make the presentation</b></p>
<p>Here&apos;s how I usually plan short presentations:</p>
<ol class="org-ol">
<li>Figure out the key message and the flow.</li>
<li>Pick a target words-per-minute rate and come up with a word budget.</li>
<li>Draft the script, checking it against my word budget.</li>
<li>Read the script out loud a few times, checking for time, tone, and hard-to-say phrases.</li>
<li>Annotate the script with notes on visual aids.</li>
<li>Make visuals, take screenshots, etc.</li>
<li>Record and edit short videos, splitting them up in Camtasia Studio by using markers so that I can control the pace of the video.</li>
<li>Copy the script (or keywords) into the presenter&apos;s notes.</li>
<li>Test the script for time and flow, and revise as needed.</li>
</ol>
<p>I considered two options for the flow. I could start with the personal use case (looking for new videos) and then expand from there, tying it into the library&apos;s wider goals. That would be close to how I developed it. Or I could start with one of the hackathon challenges, establish that connection with the library&apos;s goals, and then toss in my personal use case as a possibly amusing conclusion. After chatting about it with W- on the subway ride home from the library, I decided to start with the second approach. I figured that would make it easier for people to connect the dots in terms of relevance.</p>
<p>I used ~140wpm as my target, minus a bit of a buffer for demos and other things that could come up, so roughly 350 words for 3 minutes. I ran through the presentation a few times at home, clocking in at about 2:30. I tend to speak more quickly when I&apos;m nervous, so I rehearsed with a slightly slower pace. That way, I could get a sense of what the pace should sound like. During the actual presentation, though, I was a teensy bit over time &#8211; there was a bit of unexpected applause. Also, even though I remembered to slow down, I didn&apos;t breathe as well as I probalby should&apos;ve; I still tend to breathe a little shallowly when I&apos;m on stage. Maybe I should pick a lower WPM for presentations and add explicit breathing reminders. =)</p>
<p>I normally try to start with less material and then add details to fit the time. That way, I can easily adjust if I need to compress my talk, since I&apos;ve added details in terms of priority. I initially had a hard time concisely expressing the problem statement and tying together the three examples I wanted to use, though. It took me a few tries to get things to fit into my word budget <b>and</b> flow in a way that made me happy.</p>
<p>Anyway, once I sorted out the script, I came up with some ideas for the visuals. I didn&apos;t want a lot of words on the screen, since it&apos;s hard to read and listen at the same time. Doodles work well for me. I sketched a few images and created a simple sequence. I took screenshots for the key parts I wanted to demonstrate, just in case I didn&apos;t get around to doing a live demo or recording video. That way, I didn&apos;t have to worry about scrambling to finish my presentation. I could start with something simple but presentable, and then I could add more frills if I had time.</p>
<p>Once the static slides were in place, I recorded and edited videos demonstrating the capabilities. Video is a nice way to give people a more real sense of how something works without risking as many technical issues as a live demo would.</p>
<p>I had started with just my regular resolution (1366&#215;768 on my laptop) and a regular browser window, but the resulting video was not as sharp as it could have been. Since the presentation template had 4:3 aspect ratio, I redid the video with 1024&#215;768 resolution and a full-screen browser in order to minimize the need for resizing.</p>
<p>I sped up boring parts of the video and added markers where I wanted to split it into slides. Camtasia Studio rendered the video into separate files based on my markers. I added the videos to individual slides, setting them to play automatically. I like the approach of splitting up videos onto separate slides because it allows me to narrate at my own pace instead of speeding up or slowing down to match the animation.</p>
<p>I copied the segments of my script to the presenter notes for each slide, and I used Presenter View to run through it a few more times so that I could check whether the pace worked and whether the visuals made sense. Seemed all right, yay!</p>
<p>Just in time, too. I had a quick lunch and headed off to the library for the conclusion of the hackathon.</p>
<p>There wsa a bit of time before the presentations started. I talked to Alan again to show him what I&apos;d made, hear about what he had been working on, and pick his brain to figure out which terms might resonate with the internal jargon of the library &#8211; little things, like what they call the people who decide what kinds of books should be in which libraries, or what they call the things that libraries lend. (Items? Resources? Items.) Based on his feedback, I edited my script to change &quot;library administrators&quot; to &quot;selection committees&quot;. I don&apos;t know if it made a difference, but it was a good excuse to learn more about the language people used.</p>
<p>I tested that the presentation displayed fine on the big screen, too. It turned out that the display was capable of widescreen input at a higher resolution than what I&apos;d set, but 1024&#215;768 was pretty safe and didn&apos;t look too fuzzy, so I left it as it was. I used my presentation remote to flip through the slides while confirming that things looked okay from the back of the room (colours, size, important information not getting cut off by people&apos;s heads, etc.). The hover text was a bit small, but it gave the general idea.</p>
<p>And then it was presentation time. I was third, which was great because once I finished, I could focus on other people&apos;s presentations and learn from their ideas. Based on W-&apos;s cellphone video, it looks like I remembered to use the microphone so that the library could record, and I remembered to look up from my presenter notes and gesture from time to time (hard when you&apos;re hidden behind the podium, but we do what we can!). I stayed pretty close to my script, but I hope I kept the script conversational enough that it sounded more like me instead of a book. I didn&apos;t have the mental bandwidth to keep an eye on the timer in the center of the presenter view, but fortunately the time worked out reasonably well. I concluded just as the organizer was getting up to nudge me along, and I&apos;d managed to get to all the points I wanted to along the way. Whew!</p>
<p>Anyway, that&apos;s a quick braindump of the project and what it was like to hack it together. I&apos;ll probably write some more about following up on ideas and about other people&apos;s presentations, but I wanted to get this post out there while the experience was fresh in my head. It was fun. I hope the Toronto Public Library will take the hackathon ideas forward, and I hope they&apos;ll get enough out of the hackathon that they&apos;ll organize another one! =)</p>

<p>You can <a href="https://sachachua.com/blog/2015/11/exploring-neighbourhood-libraries-and-other-notes-from-the-toronto-public-library-hackathon/#comment">view 1 comment</a> or <a href="mailto:sacha@sachachua.com?subject=Comment%20on%20https%3A%2F%2Fsachachua.com%2Fblog%2F2015%2F11%2Fexploring-neighbourhood-libraries-and-other-notes-from-the-toronto-public-library-hackathon%2F&body=Name%20you%20want%20to%20be%20credited%20by%20(if%20any)%3A%20%0AMessage%3A%20%0ACan%20I%20share%20your%20comment%20so%20other%20people%20can%20learn%20from%20it%3F%20Yes%2FNo%0A">e-mail me at sacha@sachachua.com</a>.</p>]]></description>
		</item><item>
		<title>What it&#8217;s like to work with data</title>
		<link>https://sachachua.com/blog/2015/05/what-its-like-to-work-with-data/</link>
		<dc:creator><![CDATA[Sacha Chua]]></dc:creator>
		<pubDate>Fri, 22 May 2015 00:44:07 GMT</pubDate>
    <category>visualization</category>
<category>business</category>
		<guid isPermaLink="false">https://sachachua.com/blog/?p=28222</guid>
		<description><![CDATA[<p>How did I learn to work with data?</p>
<p>I learned the basics of SQL in high school, I think. In university, I got most of my kicks from the extracurricular projects I worked on because doing so let me hang out with interesting people. As those people graduated, I moved to handling those systems on my own. Blogging have me another reason to explore data analysis, since I was curious about my stats. Eventually, with Quantified Self, I started collecting and scraping my own data.</p>
<div>I do a lot of data analysis and report creation as part of my social business consulting. It has deepened my appreciation of database indexes, subqueries, common table expressions, recursive queries, caching tables, arrays, partitioned queries, string manipulation with regular expressions, and visualization tools. I&#8217;d love to get together with other social business data geeks so that we could swap analysis questions and techniques, but we&#8217;d need to get approval for sharing data or set up a sanitization protocol that my clients would be comfortable with. We&#8217;re doing some pretty cool stuff.</div>
<div></div>
<div>What is it like when my clients ask me data questions, or when I think of a question I&#8217;d like to explore?</div>
<div></div>
<div>I start by thinking of whether we have the data to answer that question, or how I can collect the data we need. I think about whether there are similar questions that are easier to answer. Then I start thinking about how to bring everything together: which tables, which joins, which conditions. Sometimes I have to use subqueries to combine the data. I&#8217;m getting into the habit of using common table expressions to make those easier to read. I feel satisfied when I can connect everything in a way that makes sense to me. I also like seeing the common threads among different questions, and turning those insights into parameterized reports.</div>
<div></div>
<div>Sometimes the first report I make fits the situation perfectly. Other times, we go back and forth a little to figure out what the real question is. I really appreciate it when other people help me sanity-check the numbers, because I occasionally overlook things. I&#8217;d like to get better at catching those errors.</div>
<div></div>
<div>Once the report settles down, I can think about the performance. Sometimes it&#8217;s as simple as adding an index or creating a table that caches complex calculations. Other times, I might need to modify the presentation or the question a little.</div>
<div></div>
<div>In addition to making my reports more reliable, I&#8217;d like to get better at visualizing the data so that people can get an intuitive feel for what&#8217;s going on.</div>
<div></div>
<div>I also want to get better at making inferences based on the data, especially when it comes to teasing out time-delayed or multivariate factors. I think my data sets are usually too small for things like that, though.</div>
<div></div>
<div>Anyway, that&#8217;s what it&#8217;s like to enjoy crunching the numbers. I love being able to do it, and I like exploring the kinds of questions that people imagine. =)</div>

<p>You can <a href="mailto:sacha@sachachua.com?subject=Comment%20on%20https%3A%2F%2Fsachachua.com%2Fblog%2F2015%2F05%2Fwhat-its-like-to-work-with-data%2F&body=Name%20you%20want%20to%20be%20credited%20by%20(if%20any)%3A%20%0AMessage%3A%20%0ACan%20I%20share%20your%20comment%20so%20other%20people%20can%20learn%20from%20it%3F%20Yes%2FNo%0A">e-mail me at sacha@sachachua.com</a>.</p>]]></description>
		</item><item>
		<title>Visualizing the internal citation network of my blog</title>
		<link>https://sachachua.com/blog/2015/01/visualizing-internal-citation-network-blog/</link>
		<dc:creator><![CDATA[Sacha Chua]]></dc:creator>
		<pubDate>Fri, 23 Jan 2015 13:00:42 GMT</pubDate>
    <category>visualization</category>
<category>pkm</category>
<category>visual</category>
<category>wordpress</category>
		<guid isPermaLink="false">https://sachachua.com/blog/?p=27667</guid>
		<description><![CDATA[<p>I&#8217;m curious about the internal citation of my blog. Which thoughts have been developed over a long chain of posts? Which posts do I often link to? Where are there big jumps in time? Where have I combined threads?</p>
<p><a href="https://sachachua.com/blog/wp-content/uploads/2014/12/2014-12-03-Internal-citation-network.png"><img loading="lazy" class="alignnone wp-image-27668 size-medium" src="https://sachachua.com/blog/wp-content/uploads/2014/12/2014-12-03-Internal-citation-network-640x266.png" alt="2014-12-03 Internal citation network" width="640" height="266" srcset="https://sachachua.com/blog/wp-content/uploads/2014/12/2014-12-03-Internal-citation-network-640x266.png 640w, https://sachachua.com/blog/wp-content/uploads/2014/12/2014-12-03-Internal-citation-network-280x116.png 280w, https://sachachua.com/blog/wp-content/uploads/2014/12/2014-12-03-Internal-citation-network.png 1413w" sizes="(max-width: 640px) 100vw, 640px"></a></p>
<p>I&#8217;ll probably need to build my own data extractor so that it can:</p>
<ul>
<li>ignore weekly and monthly reviews, since I link to everything in those,</li>
<li>reconcile short and long permalinks, redirection, and sneak previews,</li>
<li>and maybe even index my sketches and look at follow-ups</li>
</ul>
<p>and I&#8217;ll probably want to create something that I could eventually plot as an SVG or imagemap using Graphviz, or maybe analyze using Gephi.</p>
<p>It would be super-interesting to create some kind of output that I could fold into my blog outline or into individual posts. I would need a static dump for that one, I think.</p>
<p>How would I build something like this? One time, I used Ruby to <a href="https://sachachua.com/blog/2011/12/blog-analysis-2011-173363-words-far-also-rails-console-work-wordpress/">analyze the text of my blog</a>. That might work. I might be able to pull out all the link hrefs, do lookups&#8230;</p>
<p>As of Dec 3, 2014, there are 87 posts in 2014 that link to previous posts, out of 259 non-review posts (so roughly 34%). I used this SQL query to get that:</p>
<p>SELECT post_title FROM wp_posts WHERE post_content LIKE &#8216;%&lt;a href=&#8221;https://sachachua.com/blog/20%&#8217; AND post_date &gt;= &#8216;2014-01-01&#8217; AND post_title NOT LIKE &#8216;%review:%&#8217; AND post_state=&#8217;publish&#8217;;</p>
<p>Hmm. I might even be able to do some preliminary explorations with Emacs and text processing instead of writing a script to analyze this, if I focus on 2014 and ignore the special cases (short permalinks, redirection, and sneak previews), just to see what the data looks like. Rough technical notes:</p>
<pre>perl -i -p -e s/href/\nhref/gi 2014-manip.html
grep http://sachachua.com/blog/20 2013-manip.html &gt; list-2013
perl -i -p -e "s/(&lt;\/a&gt;(&lt;\/h2&gt;)?).*/$1/gi" list-2013
</pre>
<div class="org-src-container">
<pre class="src src-emacs-lisp">(<span class="org-keyword">defun</span> <span class="org-function-name">sacha/misc-clean-up-reviews</span> ()
  (interactive)
  (<span class="org-keyword">while</span> (re-search-forward <span class="org-string">"</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">(</span></span><span class="org-string">Monthly</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">|</span></span><span class="org-string">Weekly</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">)</span></span><span class="org-string"> review: .*&lt;/h2&gt;"</span> nil t)
    (<span class="org-keyword">let</span> ((start (line-beginning-position)))
      (re-search-forward <span class="org-string">"&lt;/h2&gt;"</span>)
      (delete-region start (line-beginning-position))
      (goto-char (line-beginning-position)))))

(<span class="org-keyword">defun</span> <span class="org-function-name">sacha/org-tabulate-links</span> ()
  (interactive)
  (goto-char (point-min))
  (<span class="org-keyword">let</span> (main-link edges nodes)
    (<span class="org-keyword">while</span> (not (eobp))
      (<span class="org-keyword">if</span> (looking-at <span class="org-string">"^href=\"</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">(</span></span><span class="org-string">.*?</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">)</span></span><span class="org-string">\".*?&lt;/a&gt;&lt;/h2&gt;"</span>)
          <span class="org-comment-delimiter">;; </span><span class="org-comment">Main entry</span>
          (<span class="org-keyword">progn</span>
            (setq nodes (cons (match-string 1) nodes))
            (setq main-link (match-string 1)))
        (<span class="org-keyword">if</span> (looking-at <span class="org-string">"^href=\"</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">(</span></span><span class="org-string">.*?</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">)</span></span><span class="org-string">\""</span>)
            (setq edges (cons (concat 
                               main-link  <span class="org-comment-delimiter">;; </span><span class="org-comment">from</span>
                               <span class="org-string">"\t"</span>
                               (match-string 1)   <span class="org-comment-delimiter">;; </span><span class="org-comment">to </span>
                               ) edges))))
      (forward-line 1))
    (kill-new (mapconcat 'identity edges <span class="org-string">"\n"</span>))))
</pre>
</div>
<p>Ooooh. Pretty. Gephi visualization of the edge list formed by links, using the Yifan Hu layout. That big thread in the middle, that&#8217;s the one about taskmasters and choice and productivity, which is indeed the core theme running through this year of the experiment. The cluster on the right is a year in review. We see lots of little links too.</p>
<div id="attachment_27669" style="width: 592px" class="wp-caption alignnone"><a href="https://sachachua.com/blog/wp-content/uploads/2014/12/2014-12-03-20_23_52-Gephi-0.8.2-Project-0.png"><img aria-describedby="caption-attachment-27669" loading="lazy" class="wp-image-27669 size-full" src="https://sachachua.com/blog/wp-content/uploads/2014/12/2014-12-03-20_23_52-Gephi-0.8.2-Project-0.png" alt="Internal links for entries posted in 2014" width="582" height="558" srcset="https://sachachua.com/blog/wp-content/uploads/2014/12/2014-12-03-20_23_52-Gephi-0.8.2-Project-0.png 582w, https://sachachua.com/blog/wp-content/uploads/2014/12/2014-12-03-20_23_52-Gephi-0.8.2-Project-0-208x200.png 208w" sizes="(max-width: 582px) 100vw, 582px"></a><p id="caption-attachment-27669" class="wp-caption-text">Internal links for entries posted in 2014</p></div>
<p>Now I&#8217;m curious about what happens when we add the posts and links from 2013 and 2012, too. I&#8217;ve colour-coded this by year, with It ties together posts on sketchnoting, blogging, choice, learning, writing, plans&#8230; Neat.</p>
<p><a href="https://sachachua.com/blog/wp-content/uploads/2014/12/blog-graph1.png"><img loading="lazy" class="alignnone wp-image-27672 size-medium" src="https://sachachua.com/blog/wp-content/uploads/2014/12/blog-graph1-640x640.png" alt="blog-graph" width="640" height="640" srcset="https://sachachua.com/blog/wp-content/uploads/2014/12/blog-graph1-640x640.png 640w, https://sachachua.com/blog/wp-content/uploads/2014/12/blog-graph1-200x200.png 200w, https://sachachua.com/blog/wp-content/uploads/2014/12/blog-graph1.png 1024w" sizes="(max-width: 640px) 100vw, 640px"></a></p>
<p>&nbsp;</p>
<p>What does this say? It says that even though I write about lots of different things, there are connections between the different topics, and the biggest tangle in the middle has more than 320 nodes. I have lots of blog posts that build on an idea for three or four posts, sometimes spanning several years, even if I don&#8217;t think about it in advance. There are 90 such clumps, and it might be good to revisit some of these 2- and 3-post chains to see if I can link them up even further.</p>
<p>Also, it could be interesting to do this analysis with tags, not just year. Hmm&#8230; Also, I should dust off my data structures and algorithms, and make my own connected-component analyzer so that I can get a list of the clumps of topics. Good ideas to save for another day!</p>

<p>You can <a href="https://sachachua.com/blog/2015/01/visualizing-internal-citation-network-blog/#comment">view 2 comments</a> or <a href="mailto:sacha@sachachua.com?subject=Comment%20on%20https%3A%2F%2Fsachachua.com%2Fblog%2F2015%2F01%2Fvisualizing-internal-citation-network-blog%2F&body=Name%20you%20want%20to%20be%20credited%20by%20(if%20any)%3A%20%0AMessage%3A%20%0ACan%20I%20share%20your%20comment%20so%20other%20people%20can%20learn%20from%20it%3F%20Yes%2FNo%0A">e-mail me at sacha@sachachua.com</a>.</p>]]></description>
		</item><item>
		<title>Analyzing my Lotus Notes sent mail since January 2011</title>
		<link>https://sachachua.com/blog/2012/02/analyzing-my-lotus-notes-sent-mail-since-2011-01/</link>
		<dc:creator><![CDATA[Sacha Chua]]></dc:creator>
		<pubDate>Thu, 16 Feb 2012 19:37:09 GMT</pubDate>
    <category>visualization</category>
<category>analysis</category>
<category>ibm</category>
<category>lotus</category>
		<guid isPermaLink="false">https://sachachua.com/blog/?p=23164</guid>
		<description><![CDATA[<p>Today is my penultimate day at IBM! Having successfully turned my projects over to another developer (hooray for the habit of organizing project-related files in Lotus Connections Activities), I’ve been focusing on getting things ready for the traditional goodbye e-mail, which I plan to send tomorrow.</p>
<p>I dug around in the Lotus Connections Profiles API to see if I could get a list of my contacts’ e-mail addresses. I fixed a small bug in the feed exporter of the Community Toolkit (<a href="http://w4.ibm.com/community">w4.ibm.com/community</a> for people in the IBM intranet) and exported my contacts, giving me a list of 530 IBMers who had accepted or sent me an invitation to connect.</p>
<p>Not everyone participates in that Web 2.0 network, though, so I wanted to analyze my sent mail to identify other people to whom I should send a note. I couldn’t find a neat LotusScript to do the job, and I couldn’t get the <a href="http://tech.niques.info/projects/lotus-notes-email-export/">NSF to EML or mbox converter</a> to work. Because I didn’t need all the information, just the recipients, subjects, and times, I wrote my own script (included at the end of this blog post).</p>
<p>I used the script to summarize the messages in my sent mail folder, and crunched the numbers using PivotTables in Microsoft Excel. I worked with monthly batches so that it was easier to find and fix errors. I decided to analyze all the mail going back to the beginning of last year in order to identify the people I mailed the most frequently, and to come up with some easy statistics as well. </p>
<p><a href="https://sachachua.com/blog/wp-content/uploads/2012/02/image1.png"><img loading="lazy" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://sachachua.com/blog/wp-content/uploads/2012/02/image_thumb1.png" width="580" height="397"></a></p>
<p>Spiky around project starts/ends, I’d guess.</p>
<p><a href="https://sachachua.com/blog/wp-content/uploads/2012/02/image2.png"><img loading="lazy" style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://sachachua.com/blog/wp-content/uploads/2012/02/image_thumb2.png" width="580" height="397"></a></p>
<p>I wanted to see which roles I tended to e-mail often, so I categorized each recipient with their role. I distinguished between people I’d worked with directly on projects (coworkers) and people who worked with IBM but with whom I didn’t work on a project (colleagues). The numbers below count individual recipients.</p>
<table style="line-height: normal; border-collapse: collapse" border="0" cellspacing="0" cellpadding="0" width="564">
<colgroup>
<col style="width: 72pt; mso-width-source: userset; mso-width-alt: 3510" width="96">
<col style="width: 82pt; mso-width-source: userset; mso-width-alt: 3986" width="109">
<col style="width: 156pt; mso-width-source: userset; mso-width-alt: 7606" width="208">
<col style="width: 154pt; mso-width-source: userset; mso-width-alt: 7497" width="205"></colgroup>
<tbody>
<tr style="height: 12.75pt" height="17">
<td style="border-left: black 0.5pt solid; vertical-align: bottom; border-top: black 0.5pt solid" class="xl24" height="17" width="96"><font face="Arial"></font><font style="font-size: 10pt" color="#000000"><strong>Role</strong></font></td>
<td style="border-left: black 0.5pt solid; vertical-align: bottom; border-top: black 0.5pt solid" class="xl24" width="136">
<p align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000"><strong>Number of people</strong></font></p>
</td>
<td style="vertical-align: bottom; border-top: black 0.5pt solid; border-right: black 0.5pt solid" class="xl27" width="181">
<p align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000"><strong>Number of individual                  <br>e-mails sent</strong></font></p>
</td>
<td style="vertical-align: bottom" width="149">
<p align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000"><strong>Average e-mails sent                  <br>per person</strong></font></p>
</td>
</tr>
<tr style="height: 12.75pt" height="17">
<td style="border-left: black 0.5pt solid; vertical-align: bottom; border-top: black 0.5pt solid" class="xl24" height="17"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">colleague</font></td>
<td style="border-left: black 0.5pt solid; vertical-align: bottom; border-top: black 0.5pt solid" class="xl24" width="136" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">407</font></td>
<td style="vertical-align: bottom; border-top: black 0.5pt solid; border-right: black 0.5pt solid" class="xl27" width="181" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">827</font></td>
<td style="vertical-align: bottom" class="xl30" width="149" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">2.0</font></td>
</tr>
<tr style="height: 12.75pt" height="17">
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" height="17"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">coworker</font></td>
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" width="136" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">50</font></td>
<td style="vertical-align: bottom; border-right: black 0.5pt solid" class="xl28" width="181" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">562</font></td>
<td style="vertical-align: bottom" class="xl30" width="149" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">11.2</font></td>
</tr>
<tr style="height: 12.75pt" height="17">
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" height="17"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">client</font></td>
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" width="136" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">21</font></td>
<td style="vertical-align: bottom; border-right: black 0.5pt solid" class="xl28" width="181" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">387</font></td>
<td style="vertical-align: bottom" class="xl30" width="149" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">18.4</font></td>
</tr>
<tr style="height: 12.75pt" height="17">
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" height="17"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">manager</font></td>
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" width="136" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">4</font></td>
<td style="vertical-align: bottom; border-right: black 0.5pt solid" class="xl28" width="181" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">109</font></td>
<td style="vertical-align: bottom" class="xl30" width="149" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">27.3</font></td>
</tr>
<tr style="height: 12.75pt" height="17">
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" height="17"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">partner</font></td>
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" width="136" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">9</font></td>
<td style="vertical-align: bottom; border-right: black 0.5pt solid" class="xl28" width="181" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">51</font></td>
<td style="vertical-align: bottom" class="xl30" width="149" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">5.7</font></td>
</tr>
<tr style="height: 12.75pt" height="17">
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" height="17"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">system</font></td>
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" width="136" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">9</font></td>
<td style="vertical-align: bottom; border-right: black 0.5pt solid" class="xl28" width="181" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">21</font></td>
<td style="vertical-align: bottom" class="xl30" width="149" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">2.3</font></td>
</tr>
<tr style="height: 12.75pt" height="17">
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" height="17"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">other</font></td>
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" width="136" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">8</font></td>
<td style="vertical-align: bottom; border-right: black 0.5pt solid" class="xl28" width="181" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">11</font></td>
<td style="vertical-align: bottom" class="xl30" width="149" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">1.4</font></td>
</tr>
<tr style="height: 12.75pt" height="17">
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" height="17"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">self</font></td>
<td style="border-left: black 0.5pt solid; vertical-align: bottom" class="xl25" width="136" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">1</font></td>
<td style="vertical-align: bottom; border-right: black 0.5pt solid" class="xl28" width="181" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">5</font></td>
<td style="vertical-align: bottom" class="xl30" width="149" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000">5.0</font></td>
</tr>
<tr style="height: 12.75pt" height="17">
<td style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; vertical-align: bottom; border-top: black 0.5pt solid" class="xl26" height="17"><font face="Arial"></font><font style="font-size: 10pt" color="#000000"><strong>Grand Total</strong></font></td>
<td style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; vertical-align: bottom; border-top: black 0.5pt solid" class="xl26" width="136" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000"><strong>509</strong></font></td>
<td style="border-bottom: black 0.5pt solid; vertical-align: bottom; border-top: black 0.5pt solid; border-right: black 0.5pt solid" class="xl29" width="181" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000"><strong>1973</strong></font></td>
<td style="vertical-align: bottom" class="xl30" width="149" align="right"><font face="Arial"></font><font style="font-size: 10pt" color="#000000"><strong>3.9</strong></font></td>
</tr>
</tbody>
</table>
<p>As it turns out, I sent a <em>lot</em> of mail to a <em>lot</em> of people throughout IBM, mostly in response to questions about Lotus Connections, Idea Labs, or collaboration tools. </p>
<p>Now I can sort my summarized data to see whom I e-mailed the most often, and add more names to my don’t-forget-to-say-goodbye list. If all goes well, I might even be able to use <a href="https://sachachua.com/blog/p/7189/">that mail merge script</a>. =)</p>
<p>The following agent processes selected messages and creates a table with one row per recipient, e-mailing the results to the specified mail address. It seems to choke on calendar entries and other weird documents, but if you go through your sent mail box in batches (Search This View by date is handy), then you should be able to find and delete the offending entries.</p>
<pre>Option Public
Dim TempNitem As NotesItem
Dim TempNm As NotesName
Dim session As  NotesSession
Dim db As NotesDatabase
Sub Initialize
	mailAddress = &quot;YOUR_ADDRESS@HERE&quot;
	
	Dim ws As New NotesUIWorkspace
	Dim uidoc As NotesUIDocument
	Dim partno As String
	Dim db As NotesDatabase
	Dim view As NotesView
	Dim doc As NotesDocument
	Dim collection As NotesDocumentCollection
	Dim memo As NotesDocument
	Dim body As NotesRichTextItem
	Dim range As NotesRichTextRange
	Dim count As Integer
	
	Set session = New NotesSession
	Set db = session.CurrentDatabase
	Set collection = db.UnprocessedDocuments
	
	Dim FldTitles(3) As String
	FldTitles(0) = &quot;E-mail&quot;
	FldTitles(1) = &quot;Subject&quot;
	FldTitles(2) = &quot;Date sent&quot;
	
	Set maildoc = db.CreateDocument
	maildoc.Form = &quot;Memo&quot;
	maildoc.Subject = &quot;Summary&quot;
	maildoc.SendTo = mailAddress
	Dim ritem As NotesRichTextItem
	Set ritem=New NotesRichTextItem(maildoc,&quot;body&quot;) 
' passing the rich text item &amp; other relevant details
	Set ritem = CreateTable(FldTitles, collection, ritem, &quot;Sent items&quot;, &quot;Summary created on &quot; + Format(Now, &quot;YYYY-MM-DD&quot;))
	maildoc.send(False)
End Sub
Function CreateTable(FldTitles As Variant, doccoll  As NotesDocumentCollection, rtitem As NotesRichTextItem,msgTitle As String,msgBody As String ) As NotesRichTextItem
	'http://searchdomino.techtarget.com/tip/0,289483,sid4_gci1254682_mem1,00.html
	'Takes  Documentcollection &amp; creates tabular information on to the passed   rtitem (rich text item)
	
	Set ritem=rtitem
	Set rtnav = ritem.CreateNavigator
	Set rstyle=session.CreateRichTextStyle 
	
	'===================================================
	'heading in the body section of the mail
	rstyle.Bold=True
	rstyle.NotesColor=COLOR_RED 
	rstyle.Underline=True
	rstyle.NotesFont=FONT_COURIER
	rstyle.FontSize=12
	Call  ritem.AppendStyle(rstyle)
	ritem.AppendText(msgTitle)
	
	rstyle.Underline=False
	rstyle.NotesColor=COLOR_BLACK
	ritem.AddNewline(2)
	
	rstyle.FontSize=10
	rstyle.Bold=False
	rstyle.NotesColor=COLOR_BLACK
	Call  ritem.AppendStyle(rstyle) 
	ritem.AppendText(msgBody)
	ritem.AddNewline(1)
	
	'===================================================
	rows=doccoll.Count +1
	cols=CInt(UBound(FldTitles)) 
	
	Call ritem.AppendTable(1, cols)
	Dim rtt As NotesRichTextTable
	Call rtnav.FindFirstElement(RTELEM_TYPE_TABLE)
	Set rtt = rtNav.GetElement 
	'=================================================
	'heading of the table
	rstyle.Bold=True
	rstyle.NotesColor=COLOR_BLUE 
	rstyle.FontSize=10
	Call  ritem.AppendStyle(rstyle)
	
	For i=0 To UBound(FldTitles) - 1
		Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)
		Call ritem.BeginInsert(rtnav) 
		Call ritem.AppendText(FldTitles(i))
		Call ritem.EndInsert
	Next
	
	'=================================================
	rstyle.FontSize=10
	rstyle.Bold=False
	rstyle.NotesColor=COLOR_BLACK
	Call  ritem.AppendStyle(rstyle)
	Dim count As Integer
	count = 0
	Set  doc=doccoll.GetFirstDocument
	While Not (doc Is Nothing)
		subject = doc.GetFirstItem(&quot;Subject&quot;).values(0)
		posted = doc.GetFirstItem(&quot;PostedDate&quot;).values(0)
		Set sendTo = doc.getFirstItem(&quot;SendTo&quot;)
		For i = 0 To UBound(sendTo.values)
			Call rtt.AddRow(1)
			Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)   
			Call ritem.BeginInsert(rtnav)
			ritem.appendText(sendTo.values(i))
			Call ritem.EndInsert
			Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)   
			Call ritem.BeginInsert(rtnav)
			ritem.appendText(subject)
			Call ritem.EndInsert
			Call rtnav.FindNextElement(RTELEM_TYPE_TABLECELL)   
			Call ritem.BeginInsert(rtnav)
			ritem.appendText(posted)
			Call ritem.EndInsert
		Next   
		count = count + 1
		Set doc=doccoll.GetNextDocument(doc)
	Wend
	Set CreateTable=ritem
	MsgBox &quot;E-mails summarized: &quot; &amp; count	
End Function</pre>
<p>I find it helpful to save it as the &quot;Summarize Recipients&quot; agent and assign it to a toolbar button that runs @Command([RunAgent]; &quot;Summarize Recipients&quot;).</p>

<p>You can <a href="https://sachachua.com/blog/2012/02/analyzing-my-lotus-notes-sent-mail-since-2011-01/#comment">view 4 comments</a> or <a href="mailto:sacha@sachachua.com?subject=Comment%20on%20https%3A%2F%2Fsachachua.com%2Fblog%2F2012%2F02%2Fanalyzing-my-lotus-notes-sent-mail-since-2011-01%2F&body=Name%20you%20want%20to%20be%20credited%20by%20(if%20any)%3A%20%0AMessage%3A%20%0ACan%20I%20share%20your%20comment%20so%20other%20people%20can%20learn%20from%20it%3F%20Yes%2FNo%0A">e-mail me at sacha@sachachua.com</a>.</p>]]></description>
		</item><item>
		<title>Visualization of my blog categories</title>
		<link>https://sachachua.com/blog/2010/02/visualization-of-my-blog-categories/</link>
		<dc:creator><![CDATA[Sacha Chua]]></dc:creator>
		<pubDate>Sat, 13 Feb 2010 13:00:00 GMT</pubDate>
    <category>visualization</category>
<category>blogging</category>
<category>visual</category>
		<guid isPermaLink="false">https://sachachua.com/blog/?p=7036</guid>
		<description><![CDATA[<p>This visualizes how often I blogged something with a tag in a given year, sorted by all-time popularity. There are more categories, but I skipped them. The height of each block represents how many blog posts I wrote in that category, while the different blocks represent the years, ending with 2010 at the far right. The graph reflects changing interests and recurring themes.</p>
<p><a href="https://sachachua.com/blog/wp-content/uploads/2010/02/image4.png"><img loading="lazy" style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="https://sachachua.com/blog/wp-content/uploads/2010/02/image_thumb4.png" width="285" height="749"></a> </p>
<p>This visualizes some of the things I’ve been writing about in 2010. We’re only a month in, so the last line is pretty small, and in some cases (n &lt; 4) not even visible. </p>
<p><a href="https://sachachua.com/blog/wp-content/uploads/2010/02/image5.png"><img loading="lazy" style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="https://sachachua.com/blog/wp-content/uploads/2010/02/image_thumb5.png" width="219" height="746"></a> </p>
<p>Sparkline bar graphs created with <a href="http://sparklines-excel.blogspot.com/">Sparklines for Excel</a>. Initial categories table created with the following SQL incantation:</p>
<p><code> </code></p>
<p>select p.post_date, p.post_title, terms.name from wp_posts p inner join wp_term_relationships tr on p.id=tr.object_id inner join wp_term_taxonomy tt on tr.term_taxonomy_id=tt.term_taxonomy_id inner join wp_terms terms on tt.term_id=terms.term_id into outfile '/tmp/categories.csv'; </p>
<p> </p>
<p>then imported and tweaked in Microsoft Excel.</p>

<p>You can <a href="https://sachachua.com/blog/2010/02/visualization-of-my-blog-categories/#comment">view 5 comments</a> or <a href="mailto:sacha@sachachua.com?subject=Comment%20on%20https%3A%2F%2Fsachachua.com%2Fblog%2F2010%2F02%2Fvisualization-of-my-blog-categories%2F&body=Name%20you%20want%20to%20be%20credited%20by%20(if%20any)%3A%20%0AMessage%3A%20%0ACan%20I%20share%20your%20comment%20so%20other%20people%20can%20learn%20from%20it%3F%20Yes%2FNo%0A">e-mail me at sacha@sachachua.com</a>.</p>]]></description>
		</item>
	</channel>
</rss>