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

<channel>
	<title>FlowingData &#187; Self-surveillance</title>
	<atom:link href="http://flowingdata.com/category/self-surveillance/feed/" rel="self" type="application/rss+xml" />
	<link>http://flowingdata.com</link>
	<description>Strength in Numbers</description>
	<lastBuildDate>Sat, 20 Mar 2010 15:07:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom:link rel="next" href="http://flowingdata.com/category/self-surveillance/feed/?page=2" />

		<item>
		<title>Visualize your Last.fm listening patterns with LastHistory</title>
		<link>http://flowingdata.com/2010/03/03/visualize-your-last-fm-listening-patterns-with-lasthistory/</link>
		<comments>http://flowingdata.com/2010/03/03/visualize-your-last-fm-listening-patterns-with-lasthistory/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 08:26:24 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Self-surveillance]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://flowingdata.com/?p=5741</guid>
		<description><![CDATA[<a href="http://flowingdata.com/2010/03/03/visualize-your-last-fm-listening-patterns-with-lasthistory/" title="Visualize your Last.fm listening patterns with LastHistory"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/lasthistory.5n3lxyjl8ps0c0owwg8ow8wcs.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="334" alt="Visualize your Last.fm listening patterns with LastHistory" ></a>Frederik Seiffert provides this nifty tool, LastHistory, to visualize your Last.fm listening history. Mouse over songs and find repeated track sequences. The visualization itself isn't all that useful, but it gets interesting when you hook your calendar and photos in with music. LastHistory lets you replay songs synched with your photos, and your slideshow suddenly [...]<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></description>
			<content:encoded><![CDATA[<a href="http://flowingdata.com/2010/03/03/visualize-your-last-fm-listening-patterns-with-lasthistory/" title="Visualize your Last.fm listening patterns with LastHistory"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/lasthistory.5n3lxyjl8ps0c0owwg8ow8wcs.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="334" alt="Visualize your Last.fm listening patterns with LastHistory" ></a><p>Frederik Seiffert provides this nifty tool, <a href="http://www.frederikseiffert.de/lasthistory/">LastHistory</a>, to visualize your Last.fm listening history. Mouse over songs and find repeated track sequences. The visualization itself isn't all that useful, but it gets interesting when you hook your calendar and photos in with music. LastHistory lets you replay songs synched with your photos, and your slideshow suddenly gains a new dimension.</p>
<p><object width="545" height="341"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9495577&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9495577&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="545" height="341"></embed></object></p>
<p>I don't use Last.fm, so LastHistory isn't much use to me, but I'd be interested in hearing what others think. Give it a try for your self though (for Mac only), and leave your thoughts in the comments below. Is it a reason to start using Last.fm?</p>
<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></content:encoded>
			<wfw:commentRss>http://flowingdata.com/2010/03/03/visualize-your-last-fm-listening-patterns-with-lasthistory/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Track Mouse Activity On Your Computer</title>
		<link>http://flowingdata.com/2010/02/09/track-mouse-activity-on-your-computer/</link>
		<comments>http://flowingdata.com/2010/02/09/track-mouse-activity-on-your-computer/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 08:31:21 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Network Visualization]]></category>
		<category><![CDATA[Self-surveillance]]></category>
		<category><![CDATA[homeviz]]></category>

		<guid isPermaLink="false">http://flowingdata.com/?p=5287</guid>
		<description><![CDATA[<a href="http://flowingdata.com/2010/02/09/track-mouse-activity-on-your-computer/" title="Track Mouse Activity On Your Computer"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/picture_31.4h6a5uwlo884s880k8wgo8css.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="329" alt="Track Mouse Activity On Your Computer" ></a>Anatoly Zenkov provides this nifty tool (Mac and PC) to track your mouse pointer. Really simple. Just start it, let it run, minimize the window, and carry on as usual. In the end, you get this image that looks something like a Pollock. Circles show areas where the pointer didn't move while the tracks show [...]<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></description>
			<content:encoded><![CDATA[<a href="http://flowingdata.com/2010/02/09/track-mouse-activity-on-your-computer/" title="Track Mouse Activity On Your Computer"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/picture_31.4h6a5uwlo884s880k8wgo8css.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="329" alt="Track Mouse Activity On Your Computer" ></a><p><a href="http://www.flickr.com/photos/anatoliy_zenkov/">Anatoly Zenkov</a> provides this nifty tool (<a href="http://dl.dropbox.com/u/684632/mousepath.jar">Mac</a> and <a href="http://dl.dropbox.com/u/684632/mousepath.exe.zip">PC</a>) to track your mouse pointer. Really simple. Just start it, let it run, minimize the window, and carry on as usual. In the end, you get this image that looks something like a Pollock. Circles show areas where the pointer didn't move while the tracks show movement.</p>
<p>The above is my own activity during the past couple of hours. I was just randomly browsing while watching the Laker game, so it's kind of all over the place. Run while using a single application for a while, and you might see something like Zenkov's <a href="http://www.flickr.com/photos/anatoliy_zenkov/4271592658/">tracks on Photoshop</a>.</p>
<p><img src="http://flowingdata.com/wp-content/uploads/2010/02/photoshop-545x340.png" alt="" title="photoshop" width="545" height="340" class="alignnone size-medium wp-image-5294" /></p>
<p>What do your tracks look like?</p>
<p>[via <a href="http://feltron.tumblr.com/post/372913412/mousepaths-on-my-computer-for-the-last-24-hours">feltron</a>]</p>
<p><strong>Update:</strong> Anatoly has setup an <a href="http://iographica.com/">actual site</a> for the app instead of it sitting in the dropbox boonies of boontown. Go there for the most up-to-date info.</p>
<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></content:encoded>
			<wfw:commentRss>http://flowingdata.com/2010/02/09/track-mouse-activity-on-your-computer/feed/</wfw:commentRss>
		<slash:comments>74</slash:comments>
		</item>
		<item>
		<title>Nebul.us Shows You Your Activity on the Web</title>
		<link>http://flowingdata.com/2009/12/08/nebul-us-shows-you-your-activity-on-the-web/</link>
		<comments>http://flowingdata.com/2009/12/08/nebul-us-shows-you-your-activity-on-the-web/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 08:35:17 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Online Applications]]></category>
		<category><![CDATA[Self-surveillance]]></category>

		<guid isPermaLink="false">http://flowingdata.com/?p=4011</guid>
		<description><![CDATA[<a href="http://flowingdata.com/2009/12/08/nebul-us-shows-you-your-activity-on-the-web/" title="Nebul.us Shows You Your Activity on the Web"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/nebulus.9ynmysuvsgwkswc8c844gssg.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="390" alt="Nebul.us Shows You Your Activity on the Web" ></a>Nebul.us is an online application, currently in private beta, that aggregates and visualizes your online activity. Enter your information for Twitter, Facebook, Flickr, etc and install a plugin in Firefox to record your browsing behavior. Get something that looks like the above, sort of a donut-polar area chart hybrid. Nebul.us calls it a cloud.
While your [...]<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></description>
			<content:encoded><![CDATA[<a href="http://flowingdata.com/2009/12/08/nebul-us-shows-you-your-activity-on-the-web/" title="Nebul.us Shows You Your Activity on the Web"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/nebulus.9ynmysuvsgwkswc8c844gssg.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="390" alt="Nebul.us Shows You Your Activity on the Web" ></a><p><a href="http://nebul.us/">Nebul.us</a> is an online application, currently in private beta, that aggregates and visualizes your online activity. Enter your information for Twitter, Facebook, Flickr, etc and install a plugin in Firefox to record your browsing behavior. Get something that looks like the above, sort of a donut-polar area chart hybrid. Nebul.us calls it a cloud.</p>
<p>While your personal cloud can be interesting to a small extent, the strength of Nebul.us will most likely come out of the social aspect. There's a social cloud to see your friends' activity and then there's a public cloud that lets you see what's trending across the network. </p>
<p>This of course depends on how many people use the service as well as what those users select to share. Right now, for example, the public cloud (above) isn't all that interesting. I see people are going to Twitter, Google, and Facebook. Nothing new there.</p>
<p>Finally, as with most of these types of things, we always have to ask, "Does this visualization do any better than a simple list?" As it stands now, no. The cloud isn't really doing anything for me. If I see something interesting, I'll just bookmark it on del.icio.us or tweet it. </p>
<p>But hey, they're still in the very early stages. There's a lot more work to be done.</p>
<p>Watch the clip below for more:</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/zKRB241WMNk&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zKRB241WMNk&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></content:encoded>
			<wfw:commentRss>http://flowingdata.com/2009/12/08/nebul-us-shows-you-your-activity-on-the-web/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>One Life, One Stacked Area Chart</title>
		<link>http://flowingdata.com/2009/10/15/one-life-one-stacked-area-chart/</link>
		<comments>http://flowingdata.com/2009/10/15/one-life-one-stacked-area-chart/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 07:05:29 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Infographics]]></category>
		<category><![CDATA[Self-surveillance]]></category>

		<guid isPermaLink="false">http://flowingdata.com/?p=3306</guid>
		<description><![CDATA[<a href="http://flowingdata.com/2009/10/15/one-life-one-stacked-area-chart/" title="One Life, One Stacked Area Chart"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/picture_1.ernipqanza8gcs0g0o0sgcgo0.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="348" alt="One Life, One Stacked Area Chart" ></a>Ben Fogarty uses a stacked area chart to represent his life. To us outsiders looking in it's not much more than that, but to Ben I am sure there is a story in every peak and valley. It's like a "this is your life" slideshow in data. 
This is the drive behind your.flowingdata. I don't [...]<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></description>
			<content:encoded><![CDATA[<a href="http://flowingdata.com/2009/10/15/one-life-one-stacked-area-chart/" title="One Life, One Stacked Area Chart"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/picture_1.ernipqanza8gcs0g0o0sgcgo0.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="348" alt="One Life, One Stacked Area Chart" ></a><p><a href="http://www.flickr.com/photos/17687233@N03/">Ben Fogarty</a> uses a <a href="http://www.flickr.com/photos/17687233@N03/3587644769/sizes/o/">stacked area chart</a> to represent his life. To us outsiders looking in it's not much more than that, but to Ben I am sure there is a story in every peak and valley. It's like a "this is your life" slideshow in data. </p>
<p>This is the drive behind <a href="http://your.flowingdata.com">your.flowingdata</a>. I don't think YFD is even remotely close yet to developing a personal narrative, but it's something to shoot for. I can imagine a lifetime of data replaying and watching it unfold like a movie. That'd be amazing. Then again, I might also end up like Jerry in Act 3 of Episode 88 in <a href="http://www.thisamericanlife.org/Radio_Episode.aspx?episode=88">This American Life</a>. Fingers crossed for the former.</p>
<p>[via <a href="http://datavis.tumblr.com/post/207715088/life-chart-beta-via-benfogarty">WeLoveDataVis</a>]</p>
<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></content:encoded>
			<wfw:commentRss>http://flowingdata.com/2009/10/15/one-life-one-stacked-area-chart/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Sneak Peek: New Version of your.flowingdata Coming Soon</title>
		<link>http://flowingdata.com/2009/07/08/sneak-peak-new-version-of-your-flowingdata-coming-soon/</link>
		<comments>http://flowingdata.com/2009/07/08/sneak-peak-new-version-of-your-flowingdata-coming-soon/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 07:00:54 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Self-surveillance]]></category>

		<guid isPermaLink="false">http://flowingdata.com/?p=2026</guid>
		<description><![CDATA[<a href="http://flowingdata.com/2009/07/08/sneak-peak-new-version-of-your-flowingdata-coming-soon/" title="Sneak Peek: New Version of your.flowingdata Coming Soon"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/homepage1.dawvgjvfv9s8wgc8cc8k084k0.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="326" alt="Sneak Peek: New Version of your.flowingdata Coming Soon" ></a>The brand new version of your.flowingdata (YFD) is coming soon, and of course, as a FlowingData reader, you get the first peak. Newer readers might not know what I'm talking about. Well, it's an online application that lets you collect data about yourself via Twitter.
Follow @yfd on Twitter to be the first to try it [...]<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></description>
			<content:encoded><![CDATA[<a href="http://flowingdata.com/2009/07/08/sneak-peak-new-version-of-your-flowingdata-coming-soon/" title="Sneak Peek: New Version of your.flowingdata Coming Soon"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/homepage1.dawvgjvfv9s8wgc8cc8k084k0.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="326" alt="Sneak Peek: New Version of your.flowingdata Coming Soon" ></a><p>The brand new version of <em>your</em>.flowingdata (YFD) is coming soon, and of course, as a FlowingData reader, you get the first peak. Newer readers might not know what I'm talking about. Well, it's an online application that lets you collect data about yourself via <a href="http://twitter.com/yfd">Twitter</a>.</p>
<p>Follow @<a href="http://twitter.com/yfd">yfd</a> on Twitter to be the first to try it out when it's ready. </p>
<h3>But wait, let me back up a bit...</h3>
<p>Way back in October of last year (2008), I wrote a quick and dirty script - my <a href="http://flowingdata.com/2008/10/30/tracking-weight-and-what-i-eat-with-twitter-self-surveillance-made-easy/">first Twitter bot</a> - to record my weight and eating habits. The user interface was <a href="http://projects.flowingdata.com/weight/">one page</a> that showed my progress.</p>
<p>That quickly evolved into a <a href="http://flowingdata.com/2008/12/03/understand-your-behaviors-with-twitter-testers-needed/">simple application</a> that others could use (and some are still using) that could record eating and weight the same way I was. There was also a new tracker to record feelings. It was the birth of YFD so to speak.</p>
<p>In March of this year (2009), I put up a <a href="http://flowingdata.com/2009/03/10/yourflowingdata-collect-data-about-yourself-via-twitter/">new version</a> with more trackers, an upgraded UI, and a more reliable backend. This version actually got a bit more attention than I expected. </p>
<p>More importantly though, I got a lot of great feedback from all of you - what worked, what didn't work, and what else would be cool. Thanks for that.</p>
<h3>A Sneak Peak</h3>
<p>So I took in all that feedback and everything else I learned and went to work on a new version of YFD, which is what I've been working on for the past two months on and off.</p>
<p>I won't go into all the details. I'll do that when the new version is up, but here are a few screenshots:</p>
<p><img src="http://flowingdata.com/wp-content/uploads/2009/07/stacked-graph1-545x240.png" alt="stacked-graph" title="stacked-graph" width="545" height="240" class="alignnone size-medium wp-image-2035" /></p>
<p><img src="http://flowingdata.com/wp-content/uploads/2009/07/treemap1-545x286.png" alt="treemap" title="treemap" width="545" height="286" class="alignnone size-medium wp-image-2036" /></p>
<p><img src="http://flowingdata.com/wp-content/uploads/2009/07/calendars.png" alt="calendars" title="calendars" width="410" height="93" class="alignnone size-full wp-image-2038" /></p>
<p>As you can see, the new version is all about flexibility and exploration. While there's still a lot to be done before I'll be really happy with it, I like where things are headed, and I think you all will like the new features. </p>
<p>Be sure to <strong><a href="http://twitter.com/yfd">follow YFD on Twitter</a></strong> to stay up-to-date on when you can start collecting and exploring data about yourself.</p>
<p>Thoughts or suggestions? Please leave them in the comments below.</p>
<p>P.S. If you're a YFD test user, feel free to continue recording data as you are now. All of your data will be available in the new version.</p>
<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></content:encoded>
			<wfw:commentRss>http://flowingdata.com/2009/07/08/sneak-peak-new-version-of-your-flowingdata-coming-soon/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>A Perfect Personal Data Collection Application</title>
		<link>http://flowingdata.com/2009/04/07/a-perfect-personal-data-collection-application/</link>
		<comments>http://flowingdata.com/2009/04/07/a-perfect-personal-data-collection-application/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 06:35:20 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Self-surveillance]]></category>

		<guid isPermaLink="false">http://flowingdata.com/?p=1477</guid>
		<description><![CDATA[The number of Web applications to collect data and information about yourself continues to grow; if you want to track something, most likely there's an online tool to do it. This is great - especially since a lot of the applications seem to have a lot of users, which means an interest in data. Whether [...]<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://flowingdata.com/wp-content/uploads/2009/04/glass300.png" alt="" title="Magnifying Glass" width="300" height="273" class="imgright" />The number of Web applications to collect data and information about yourself continues to grow; if you want to track something, most likely there's an online tool to do it. This is great - especially since a lot of the applications seem to have a lot of users, which means an interest in data. Whether it is deliberate or not is a different question, but you know, that doesn't really matter. What does matter is that people are taking notice. However, as users, developers, and designers, we shouldn't be satisfied too quickly with what we have. Want more. Demand more. It's interesting and oftentimes fun to log data about your life - whether it be when you go the bathroom, your sugar levels, or your mood. You get some nice graphs and charts, it looks cool, and maybe you learn something about yourself.</p>
<p>But all the self-surveillance tools so far are mostly about a single dataset or two at most. You track your weight and what you eat, but it's more complex than that. Life is complicated and data is an abstraction of life after all. Do you eat when you're depressed or are you depressed when you eat? Do you feel better if you exercise? What about sleep? How much sleep and exercise is best for you? What days should you exericse and how many days in a row and for how long? What truly makes you happy? I want my self-surveillance application to not only give me the ability to find these answers but to give them to me with very little effort on my part.</p>
<h2>Process It and Find Information</h2>
<p>There's no need for me to go over <a href="http://flowingdata.com/2008/09/12/23-personal-tools-to-learn-more-about-yourself/">all the personal tools</a> available online again, but they all share a common theme. They concentrate on a single aspect of your life, and the more generalized ones don't do much to relate multiple data streams. For example, <a href="http://rescuetime.com">RescueTime</a> only measures activity on your computer, <a href="http://bedposted.com">Bedpost</a> is specifically for sex, and <a href="http://motionbased.com">Motionbased</a> is only for exercise. I'm not trying to knock these tools though. The area is relatively new, so we're all just getting started. My own project, <a href="http://your.flowingdata.com">your.flowingdata</a>, is not even close to where I want it to be. Applications like <a href="http://swivel.com">Swivel</a> (which I realize isn't specifically for self-surveillance) and <a href="http://me-trics.com">me-trics</a> do some correlating, but it's very basic and often not very useful. <a href="http://daytum.com">Daytum</a> uses the Google Charts API, and has managed to make it look good, but there's no data processing on their part, which is again, the theme we're seeing across all self-surveillance tools. </p>
<p>It's the show-it-all approach. This works to extent, but the human brain can only process so much. I'm specifically thinking about the non-professional majority who don't necessarily know statistical methods. Even if you do, woudln't be nicer if the computer/application did it for you (in an intelligent way)? I mean, if all the data are on the server anyways, we might as well do something useful with it.</p>
<h2>Digital Self in a Physical World</h2>
<p>Okay, more data processing. Check. The ultimate self-surveillance tool has also gotta be ubiquitous. I don't want to have to wait to get to my computer to record something. I want to log it right then and there. Luckily mobile phones make that possible. With SMS and Internet connectivity practically everywhere, we can log data pretty easily. Twitter has made it easier. </p>
<p>There's still the tough part of remembering to send data over to the servers. A lot of it is manual data entry still, and that leads to sparse data. It also takes a while for anything worthwhile to show up in the graphs and plots, so people get bored quick. You're dubbed a "data geek" if you keep at it.</p>
<p>I don't know if we'll ever get rid of that stigma, but I look at <a href="http://facebook.com">Facebook</a> and <a href="http://twitter.com/flowingdata">Twitter</a> as my glimmers of hope. There's a whole culture around the two. Everyone thought Twitter was a super nerdy thing to do (my wife still thinks it's weird), but millions of people are using it and the (mainstream) community is growing at a rapid pace. </p>
<p>Facebook in particular has managed to intertwine itself with real life. I hung out with a very non-tech crowd this past weekend, and I heard about Facebook more than I ever had in my life. People use it to stay updated on their friends' lives as well as keep others in the know, and update their status multiple times per day. After an event in the real world, many feel it's necessary to upload pictures to Facebook immediately after. It's an interesting culture. Of course, people don't use Facebook to broadcast their weight or when just went doodie, but they are uploading and entering info (or data depending on who you ask) frequently, and I don't see why that culture couldn't extend to more data-ish things. Some people will cry information overload, but that's what data processing is for.</p>
<h2>Make It Exploratory</h2>
<p>The computer shouldn't do all the processing though. It should do a lot, but not everything. We are after all pretty good at finding patterns (even when they're not there). When you've been collecting data about yourself for a long while, you're going to need some exploratory tools. Without them, the pie graph and bar charts will get out of hand, and you're pretty much back at where you started - a boat load of data with nowhere to go. I'm thinking something like a <a href="http://many-eyes.com">Many Eyes</a> for automatic personal data. You would then tell the computer to keep an eye on things when you find something interesting in the visualization tools. Imagine all your data streams in one place where you could explore, analyze, bookmark, etc.</p>
<h2>The Perfect Self-surveillance Tool</h2>
<p>In the end, I want all of my data in one place with some machine learning in the background and the ability to analyze and visualize easily and thoroughly. We're not quite there yet, but I'm looking forward to when we do. Information overload? No. Better-educated decisions and a completely different view of ourselves and our surroundings? Definitely.</p>
<p>What's in your perfect self-surveillance tool?</p>
<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></content:encoded>
			<wfw:commentRss>http://flowingdata.com/2009/04/07/a-perfect-personal-data-collection-application/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>your.flowingdata: Collect Data About Yourself via Twitter</title>
		<link>http://flowingdata.com/2009/03/10/yourflowingdata-collect-data-about-yourself-via-twitter/</link>
		<comments>http://flowingdata.com/2009/03/10/yourflowingdata-collect-data-about-yourself-via-twitter/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 12:45:45 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Self-surveillance]]></category>

		<guid isPermaLink="false">http://flowingdata.com/?p=1406</guid>
		<description><![CDATA[<a href="http://flowingdata.com/2009/03/10/yourflowingdata-collect-data-about-yourself-via-twitter/" title="your.flowingdata: Collect Data About Yourself via Twitter"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/yfd_home.51crb291frk8wg0gkwk08wow0.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="377" alt="your.flowingdata: Collect Data About Yourself via Twitter" ></a>As many of you know, I've been working on a project that lets you collect data about yourself via direct messages on Twitter. It's called your.flowingdata (YFD). It started with just weight and sleep, but it's slowly growing. I recently added entertainment, potty time, smoking, mood, and something I call YFD pulse. You can now [...]<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></description>
			<content:encoded><![CDATA[<a href="http://flowingdata.com/2009/03/10/yourflowingdata-collect-data-about-yourself-via-twitter/" title="your.flowingdata: Collect Data About Yourself via Twitter"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/yfd_home.51crb291frk8wg0gkwk08wow0.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="377" alt="your.flowingdata: Collect Data About Yourself via Twitter" ></a><p>As many of you know, I've been working on a <a href="http://flowingdata.com/2008/12/03/understand-your-behaviors-with-twitter-testers-needed/">project</a> that lets you collect data about yourself via direct messages on <a href="http://twitter.com/yfd">Twitter</a>. It's called <a href="http://your.flowingdata.com"><em>your</em>.flowingdata</a> (YFD). It <a href="http://flowingdata.com/2008/10/30/tracking-weight-and-what-i-eat-with-twitter-self-surveillance-made-easy/">started</a> with just weight and sleep, but it's slowly growing. I recently added entertainment, potty time, smoking, mood, and something I call YFD pulse. You can now also download your data in CSV format.</p>
<p>Here's my YFD pulse...</p>
<p><img src="http://flowingdata.com/wp-content/uploads/2009/03/yfd-pulse-545x115.png" alt="" title="YFD Pulse" width="545" height="115" class="alignnone size-medium wp-image-1407" /></p>
<p>Here's when I go... you know...</p>
<p><img src="http://flowingdata.com/wp-content/uploads/2009/03/yfd-potty-545x401.png" alt="" title="YFD Potty" width="545" height="401" class="alignnone size-medium wp-image-1408" /></p>
<p>Now here's my sleep habits...</p>
<p><img src="http://flowingdata.com/wp-content/uploads/2009/03/yfd-sleep1-545x506.png" alt="" title="yfd sleep" width="545" height="506" class="alignnone size-medium wp-image-1410" /></p>
<p>Alright, so maybe that's more information that you needed to know. But anyways, if you'd like to help me test <em>your</em>.flowingdata, I'm opening it up to the first 300 people. Just login at <a href="http://your.flowingdata.com"><em>your</em>.flowingdata</a> with your Twitter info, and you'll be good to go. It's very tip of the iceberg at this point in development, but I'd love to hear what you all think.</p>
<p><strong>UPDATE, 11:34am - </strong> It seems the Twitter whitelisting hasn't kicked in yet, so there's going to be some lag. Stay tuned. Feel free to continue logging data. No data will be lost while we wait. Sorry for the inconvenience.</p>
<p><strong>UPDATE, 12:41pm -</strong> You can now login and create a YFD account. You can also start logging data. Although it won't appear, no data will be lost. I'm still waiting to get a response from Twitter.</p>
<p><strong>UPDATE, 1:34pm -</strong> It looks like we're back in business. Updates will be slightly delayed until I'm absolutely sure, but feel free to create an account and record data.</p>
<p><strong>UPDATE, 7:40pm -</strong> We're now back at the normal refresh rate of every 3 minutes. I'll increase the frequency in a couple of days.</p>
<p><strong>UPDATE, 8:47pm -</strong> That's it for this wave of invites. Thanks everyone for the hugely positive response. Follow @<a href="http://twitter.com/yfd">yfd</a> to stay updated on the next wave.</p>
<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></content:encoded>
			<wfw:commentRss>http://flowingdata.com/2009/03/10/yourflowingdata-collect-data-about-yourself-via-twitter/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>2008 Feltron Annual Report Now Available</title>
		<link>http://flowingdata.com/2009/01/13/2008-feltron-annual-report-now-available/</link>
		<comments>http://flowingdata.com/2009/01/13/2008-feltron-annual-report-now-available/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 19:38:35 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Infographics]]></category>
		<category><![CDATA[Self-surveillance]]></category>

		<guid isPermaLink="false">http://flowingdata.com/?p=1301</guid>
		<description><![CDATA[<a href="http://flowingdata.com/2009/01/13/2008-feltron-annual-report-now-available/" title="2008 Feltron Annual Report Now Available"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/ar08_02.dw9fqw8esyogsg04cg4s4w4sc.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="340" alt="2008 Feltron Annual Report Now Available" ></a>After Nicholas Felton's ever popular 2005, 2006 and 2007 annual report on himself, you knew this was coming. The 2008 Feltron Annual Report is now up for your viewing pleasure. There's a lot more mapping, data, and pages this time around. 

The discipline it takes to collect that much data about yourself is quite the [...]<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></description>
			<content:encoded><![CDATA[<a href="http://flowingdata.com/2009/01/13/2008-feltron-annual-report-now-available/" title="2008 Feltron Annual Report Now Available"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/ar08_02.dw9fqw8esyogsg04cg4s4w4sc.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="340" alt="2008 Feltron Annual Report Now Available" ></a><p>After Nicholas Felton's ever popular <a href="http://feltron.com/index.php?/content/2005_annual_report/">2005</a>, <a href="http://feltron.com/index.php?/content/2006_annual_report/">2006</a> and <a href="http://feltron.com/index.php?/content/2007_annual_report/">2007</a> annual report on himself, you knew this was coming. The <a href="http://feltron.com/index.php?/content/2008_annual_report">2008 Feltron Annual Report</a> is now up for your viewing pleasure. There's a lot more mapping, data, and pages this time around. </p>
<p><a href='http://feltron.com/index.php?/content/2008_annual_report/P4/'><img src="http://flowingdata.com/wp-content/uploads/2009/01/ar08_05-545x340.jpg" alt="" title="Feltron Map" width="545" height="340" class="alignnone size-medium wp-image-1302" /></a></p>
<p>The discipline it takes to collect that much data about yourself is quite the feat, but if you'd like to give it a try, you'll be interested in Nicholas' other project, <a href="http://daytum.com">Daytum</a>, which is an application that allows you to do just that.</p>
<p>[via <a href="http://www.kottke.org/09/01/personal-annual-report-2008">kottke</a>]</p>
<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></content:encoded>
			<wfw:commentRss>http://flowingdata.com/2009/01/13/2008-feltron-annual-report-now-available/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Understand Your Behaviors with Twitter &#8211; Testers Needed</title>
		<link>http://flowingdata.com/2008/12/03/understand-your-behaviors-with-twitter-testers-needed/</link>
		<comments>http://flowingdata.com/2008/12/03/understand-your-behaviors-with-twitter-testers-needed/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 06:13:41 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Self-surveillance]]></category>

		<guid isPermaLink="false">http://flowingdata.com/?p=1165</guid>
		<description><![CDATA[<a href="http://flowingdata.com/2008/12/03/understand-your-behaviors-with-twitter-testers-needed/" title="Understand Your Behaviors with Twitter &#8211; Testers Needed"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/sleep.3obijawtfgkksgo8ok04cog8s.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="511" alt="Understand Your Behaviors with Twitter &#8211; Testers Needed" ></a>I started tracking what I eat and my weight using Twitter in an effort to shed 10 pounds and consume less. It's already been (a really fast) two months since I started this experiment &#8212; I've lost 7 pounds so far. While there are a number of factors that can contribute to weight loss (and [...]<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></description>
			<content:encoded><![CDATA[<a href="http://flowingdata.com/2008/12/03/understand-your-behaviors-with-twitter-testers-needed/" title="Understand Your Behaviors with Twitter &#8211; Testers Needed"><img src="http://flowingdata.com/wp-content/uploads/yapb_cache/sleep.3obijawtfgkksgo8ok04cog8s.22qwr5zijcckg48go4wowg88o.th.png" width="545" height="511" alt="Understand Your Behaviors with Twitter &#8211; Testers Needed" ></a><p>I <a href="http://flowingdata.com/2008/10/30/tracking-weight-and-what-i-eat-with-twitter-self-surveillance-made-easy/">started tracking</a> what I eat and my weight using <a href="http://twitter.com/flowingdata">Twitter</a> in an effort to shed 10 pounds and consume less. It's already been (a really fast) two months since I started this experiment &mdash; I've lost 7 pounds so far. While there are a number of factors that can contribute to weight loss (and gain), I think the simple act of tweeting raised my awareness just enough to make me feel guilty for eating that bag of chips in the middle of the afternoon.</p>
<h2>I Need Your Help</h2>
<p>So I got enough positive response to keep going with this idea. I expanded my application so that anyone with a <a href="http://twitter.com/signup">Twitter account</a> can monitor his or her weight and eating habits. I also added two more services &mdash; sleep (above) and mood (below).</p>
<p><img src="http://flowingdata.com/wp-content/uploads/2008/12/feeling-545x227.png" alt="" title="feeling" width="545" height="227" class="alignnone size-medium wp-image-1166" /></p>
<p>I'm not quite ready to open it up to everyone just yet. You all will be the first to know though. In the meantime, I need some people to test the application under the following non-daunting conditions:</p>
<ul>
<li>You have a Twitter account and actually know how to use it</li>
<li>After two weeks of use, I can email you a few questions about what works and what doesn't</li>
</ul>
<p>Ideally you'd want to lose some weight, change your sleeping habits, or are interested in your emotions. It's sorta useless otherwise. Well, I guess pure curiosity could be another reason. Anyways, if you'd like to test it out, let me know in the comments. Leave your Twitter username and use a valid email address so that I can send you the info to get started.</p>
<p><strong>UPDATE:</strong> This isn't an app that processes your Twitter feed. Rather, you send direct messages to a bot and the app does the rest of the work - a similar process you might have seen on services like mycrocosm, Daytum, or FoodFeed.</p>
<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></content:encoded>
			<wfw:commentRss>http://flowingdata.com/2008/12/03/understand-your-behaviors-with-twitter-testers-needed/feed/</wfw:commentRss>
		<slash:comments>103</slash:comments>
		</item>
		<item>
		<title>How to Make Your Own Twitter Bot &#8211; Python Implementation</title>
		<link>http://flowingdata.com/2008/11/05/how-to-make-your-own-twitter-bot-python-implementation/</link>
		<comments>http://flowingdata.com/2008/11/05/how-to-make-your-own-twitter-bot-python-implementation/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 07:16:22 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Self-surveillance]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://flowingdata.com/?p=1107</guid>
		<description><![CDATA[Following up on my post last week about using Twitter to track eating and weight, some of you voiced some interest in creating your own Twitter bot. This post covers how you can do that. 
The Gist of It
Creating my own Twitter bot was pretty straightforward (much more than I thought it'd be), mostly because [...]<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Following up on my post last week about using Twitter to <a href="http://flowingdata.com/2008/10/30/tracking-weight-and-what-i-eat-with-twitter-self-surveillance-made-easy/">track eating and weight</a>, some of you voiced some interest in creating your own Twitter bot. This post covers how you can do that. </p>
<h2>The Gist of It</h2>
<p>Creating my own Twitter bot was pretty straightforward (much more than I thought it'd be), mostly because Twitter provides <a href="http://apiwiki.twitter.com/">an API</a> and the resources to make it that way. </p>
<p>I wanted something really simple that I could play around with. I just wanted to be able to send a direct message to my Twitter bot, and from there, it would store my data. OK, so here are the basic steps I took:</p>
<ol>
<li>Create Twitter account for bot</li>
<li>Turn on email notification for direct messages only</li>
<li>Check email periodically for new direct messages</li>
<li>Parse direct messages and store in database</li>
</ol>
<h2>Create a Twitter Account (and Email Address)</h2>
<p>The first step is easy. Create a Twitter account specifically for your bot. The account name should be short and easy to remember. Make sure you enter an IMAP email address that is only for your bot. You could put in a general purpose email address, but it'll make your life a lot easier if the email address was specifically for Twitter.</p>
<h2>Turn on Email Notifications</h2>
<p>Once you've setup your bot account, turn on email notification via the Twitter options menu. For now, tell Twitter to only send you notifications when your bot receives direct messages and <em>not</em> when someone new follows.</p>
<h2>Check Email and Do Something with Messages</h2>
<p>Here's where the actual code comes in. Here's the general framework. I've left out some details that will be specific to your own purposes.</p>
<pre class="python">&nbsp;
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">imaplib</span> <span style="color: #ff7700;font-weight:bold;">import</span> *
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">email</span>.<span style="color: black;">Parser</span> <span style="color: #ff7700;font-weight:bold;">import</span> Parser
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">datetime</span>, <span style="color: #dc143c;">time</span>, <span style="color: #dc143c;">email</span>, <span style="color: #dc143c;">email</span>.<span style="color: black;">Utils</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">re</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Connect to email server</span>
server = IMAP4<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;__EMAIL_SERVER.COM__&quot;</span><span style="color: black;">&#41;</span>
server.<span style="color: black;">login</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;__EMAIL_ACCOUNT_NAME__&quot;</span>, <span style="color: #483d8b;">&quot;__EMAIL_PASSWORD__&quot;</span><span style="color: black;">&#41;</span>
r = server.<span style="color: #dc143c;">select</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;INBOX&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Find only new mail (i.e. new direct messages)</span>
r, data = server.<span style="color: black;">search</span><span style="color: black;">&#40;</span><span style="color: #008000;">None</span>, <span style="color: #483d8b;">&quot;(NEW)&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># If there are new direct messages:</span>
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> &gt; <span style="color: #ff4500;">0</span>:
&nbsp;
    p = Parser<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;"># Loop through new emails</span>
    <span style="color: #ff7700;font-weight:bold;">for</span> num <span style="color: #ff7700;font-weight:bold;">in</span> data<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
&nbsp;
        <span style="color: #808080; font-style: italic;"># Who email is from (Should be one line, broken for display only)</span>
        r, data = server.<span style="color: black;">fetch</span><span style="color: black;">&#40;</span>num, <span style="color: #483d8b;">'(BODY[HEADER.FIELDS
            (DATE SUBJECT FROM X-TwitterEmailType X-TwitterSenderScreenName
            X-TwitterCreatedAt X-TwitterRecipientScreenName)])'</span><span style="color: black;">&#41;</span>
        msg = p.<span style="color: black;">parsestr</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        who = msg.<span style="color: #0000cd;">__getitem__</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'From'</span><span style="color: black;">&#41;</span>
        matchemail = <span style="color: #dc143c;">re</span>.<span style="color: #008000;">compile</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'[<span style="color: #000099; font-weight: bold;">\w</span><span style="color: #000099; font-weight: bold;">\-</span>][<span style="color: #000099; font-weight: bold;">\w</span><span style="color: #000099; font-weight: bold;">\-</span><span style="color: #000099; font-weight: bold;">\.</span>]+@[<span style="color: #000099; font-weight: bold;">\w</span><span style="color: #000099; font-weight: bold;">\-</span>][<span style="color: #000099; font-weight: bold;">\w</span><span style="color: #000099; font-weight: bold;">\-</span><span style="color: #000099; font-weight: bold;">\.</span>]+[a-zA-Z]{1,4}'</span><span style="color: black;">&#41;</span>
        email_addy = matchemail.<span style="color: black;">findall</span><span style="color: black;">&#40;</span>who<span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;"># Twitter username</span>
        twitter_un = msg.<span style="color: #0000cd;">__getitem__</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'X-TwitterSenderScreenName'</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;"># If the email is a direct message sent from Twitter</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> msg.<span style="color: #0000cd;">__getitem__</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'X-TwitterEmailType'</span><span style="color: black;">&#41;</span> == <span style="color: #483d8b;">'direct_message'</span>:
&nbsp;
	    <span style="color: #808080; font-style: italic;"># When direct message sent, convert to epoch seconds</span>
            twitter_time = msg.<span style="color: #0000cd;">__getitem__</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'X-TwitterCreatedAt'</span><span style="color: black;">&#41;</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
            time_tuple = <span style="color: #dc143c;">email</span>.<span style="color: black;">Utils</span>.<span style="color: black;">parsedate</span><span style="color: black;">&#40;</span>twitter_time<span style="color: black;">&#41;</span>
            epoch_seconds = <span style="color: #dc143c;">time</span>.<span style="color: black;">mktime</span><span style="color: black;">&#40;</span>time_tuple<span style="color: black;">&#41;</span>
&nbsp;
            <span style="color: #808080; font-style: italic;"># Get body of email sent by Twitter</span>
            r, data = server.<span style="color: black;">fetch</span><span style="color: black;">&#40;</span>num, <span style="color: #483d8b;">'(RFC822.TEXT)'</span><span style="color: black;">&#41;</span>
            body = data<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
            twitter_dm = body.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>.<span style="color: black;">strip</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
            <span style="color: #808080; font-style: italic;"># Do something with the twitter direct message...</span>
            <span style="color: #808080; font-style: italic;"># Parse it...</span>
            <span style="color: #808080; font-style: italic;"># Store it in a database?...</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Logout of email server</span>
server.<span style="color: black;">logout</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;</pre>
<p>I run this script every 30 minutes with a <a href="http://en.wikipedia.org/wiki/Cron">cron</a>. You could of course run it more frequently. The important part of this code though is that Twitter attaches its own <a href="http://apiwiki.twitter.com/REST+API+Documentation#HowshouldmyTwitterbotfollowusersthatfollowitorinspectdirectmessages">special headers</a> (e.g. X-TwitterEmailType). If you wanted your bot to automatically follow users that followed it, you could check the EmailType and then use the Twitter API to follow a Twitter user. For my simple purposes though, I only cared about direct messages.</p>
<p>That's all. There is of course plenty of room for improvement. Like I said, you could make this useful to lots of users by making your bot automatically follow those who follow it. Users can only direct message another Twitter user, if he is following. I would also delete emails that have already been read and stored somewhere so that the INBOX doesn't pile up. Yup.</p>
<p>Did I miss anything?</p>
<p><p>---------<br />
<a href="http://flowingprints.com/print4.php">World Progress Report</a> - 4 days left to order</p></p>
]]></content:encoded>
			<wfw:commentRss>http://flowingdata.com/2008/11/05/how-to-make-your-own-twitter-bot-python-implementation/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>
