Friday 17 June 2011

Visualization Consumerism

Interesting post by Enrico Bertini on the usefulness and 'democratization' of data visualization.  He suggests that we are currently stuck in what he calls 'visualization consumerism' where data visualization is static and prepackaged by experts rather than dynamic and explorable by the general public.

Friday 10 June 2011

Health and Fitness Metrics

It's been a busy month but I still managed to find some time to devote to my self-tracking investigations.  I decided that I needed a centralized location to store all my personal metric data, and so I created a basic back-end with Google App Engine.  There are plenty of benefits to going with GAE over the traditional LAMP architechure that I've noticed (much easier deployment (with versioning), extremely scalable, free to start, etc.).  Plus, compared to writing your site in PHP, coding in Python is a dream.  The only drawback as far as I can tell is that it's not the same relational database model that we web developers are used to, so there's a bit of learning curve (apparently it works this way for scalability reasons).

Anyway, so far the site is pretty bare bones. It basically just functions as a front-end for the database right now.  The way I imagine the whole tool working is that in addition to the site, the user will have 'data collector' apps, which run on your phone or your PC, and feed data into the site via HTTP POST requests.  Eventually the site will also allow the user to view history, edit logged data, and (most importantly) allow them to chart and analyze the data to learn things about themselves.  But for now the site will just log and serve out data.

I've also started writing some basic data collectors now that the site is semi-functional.  I started with what for me is the most important:  Health and fitness metrics.

Naturally, I looked at weight first.  I wrote an extremely basic Android app for my phone that just takes a decimal number and uploads immediately to the site.  I had never actually written an Android app before and it occurred to me that this one might actually be simple enough that I could do it with Google App Inventor (which, as it turns out, was correct).  So for the last couple weeks I've been weighing myself daily just before my morning shower and recording the result on my phone.  Already I've started noticing a downward trend, which makes me wonder whether maybe there's something to the Hawthorne effect after all
Several weeks work of weight tracking
The second metric that I knew I'd want to track eventually was running.  I was reluctant to add to the millions of smartphone apps that already exist to track your route and record your distance, especially given that I had never written an Android app before (App Inventor does not count!).  But I found that the overhead time in migrating data from these existing apps to my database was too painful and so I wrote it anyway.  It turned out to be surprisingly straightforward. Coding in Java took me back to my university days, and I was right at home in the amazing Eclipse IDE.

The first weeks worth of running data
Finally, I wanted to do something about my eating habits, but I wasn't sure what.  I didn't want to try something crazy like counting calories, since for one thing, I tend to reject the idea that a metric like that is useful at all in the first place, since it's just not possible to be accurate enough for you to really learn anything.  So without any other ideas, I decided that for this one I'd try something kind of experimental. It occurred to me that with the built in camera on the phone, I could easily write an app to record a photo of each meal (and then upload immediately to the site).  I thought that, while this would be pretty much useless for data-mining (unless I wanted to flex some ridiculous image processing muscle) it might add some accountability to my dietary choices.  Maybe I'd be less likely to eat entire bags of Cheetos if I had to take a picture of it and guilt trip over it later.  I decided to try it.

Food diary entries
So now I have several weeks worth of data here, and have stuck with it (despite strange looks from friends/co-workers) but am not totally sold on the idea yet.  One surprising result is that the photos seem to me maybe a bit too personal. If the site ever did go social, I'm not sure I'd want even my friends to know about a) my lackluster cooking skills or b) the 2 AM half-awake snack binge.  But then again, friends would definitely be a great motivator to improve your diet.  The other problem is that I haven't found a really good way to visualize the data yet.  But I'll try to reserve judgement for another couple weeks.

Anyway that's the latest brain-dump of the development on this thing. Progress has been slow, but I've also been getting a lot done. It seems, like most projects, I underestimated how much work was actually involved.  Unfortunately you can only really estimate the amount of work you know needs to be done (rather than all the work that you don't know needs to be done).  Meaning that an honest estimate is more like an approximation of the lower bound if anything.