Tuesday 12 March 2013

Weight tracking with Fitbit & Google docs

I have used a Fitbit since the beginning of 2012. Last year I tracked my weight sporadically, using the machine at the gym. My weight went up a bit, down a bit but over the year there was nil net change. At the beginning of 2013 I bought scales for home and started weighing myself every day first thing in the morning to get a more consistent measure. I tap that into Fitbit which then uses the data in algorithms to estimate my daily calorific output.

Fitbit provides a pretty graphical interface to see how my weight changes and sends me a weekly email with weekly stats along with my weight gain and loss. That is all well and good but it was clear from my daily weigh-ins that my weight fluctuates wildly and it is difficult to see an overall trend.

Then I read two articles on the Quantified Self blog. One provided directions for polling the Fitbit data on a daily basis through Google spreadsheets with a script provided by Mark Leavitt. The other was a presentation from Amelia Greenhall explaining how she used running averages in tracking her weight.

Amelia made a point that she recorded her weight and then tried not to think about it. We live in a culture that idealises weight loss and demonises weight gain and a daily weigh in provides a salutary lesson in how ingrained these values are. On days I woke up and lost half a kilogram or more I would be happy, on days when I had lost weight for 2 or 3 days in a row I was really happy. But on days when my weight went up I would be glum, sometimes as glum as to say "to hell with it, I'm gonna eat everything today"! As a scientist I could look at the data and say dispassionately and say that any peak would later regress to the norm but as a psychologist I know I needed to find a way to support my emotions on a daily basis.

So here's my first attempt at that. Google provide a trend graph which makes it easy to zoom and pan, so hopefully this graph will grow with the data without much further input from me. It shows my daily weight change can be as much as 1.5kg. Over 3-4 days this tends to regress. Amelia picked a 10-day mean for her trend-line but didn't give a reason for this period. I decided to use a 7-day mean, purely because a week seems like a normal human period and any 7-day period takes in the whole weekly pattern without repeating anything like weekend binges that might tip the trend. Looked at over 7 days, the mean weight change drops to less than 0.5kg, far more reasonable.

Here's the graph:

I am, of course, interested in what factors play a part in weight change on the immediate and medium-term basis so will be looking for other data to track along with this. So watch this space!

Tuesday 5 March 2013

Coffee powered cognition

I start each morning with a mug of coffee. That is quickly chased down by another, perhaps with a piece of toast, but the coffee is more important. Like many people I believe that coffee is essential to wake me physically and mentally. Coffee tastes good. I enjoy drinking it, I feel better. Caffeine is a stimulant, it makes me feel better. But I'm a psychologist;"feel better" is not good enough-I want numbers.

I recently discovered the Quantified mind website with a battery of cognitive tests organised into experiments you can take at home. The tests are all drawn from psychology literature. No single test maps exactly onto skills you use in your daily life but taken together they indicate speed of cognition, capacity of working memory, reaction time - all things that affect your cognitive skills. The science pages on Quantified Mind explain it more eloquently than me.

So as you have by now guessed, I signed up to do an experiment comparing my cognitive abilities with and without my morning coffee. Or to be more exact, before and after my morning coffee. The study runs over 31 days, on odd days I take the tests before coffee, on evens I take them after coffee. The long data gathering is important to get a reliable figure and to mitigate practice effects. I need to average out my performance on mornings that I've slept well and I'm relaxed and have nowhere to go to with performance on mornings that are mornings-after-the-night-before *, or after a bout of insomnia and I have to rush to a meeting I don't want to go to. And I need to take the test enough times so that my scores are not improving every time from practice.

So, yes I am a psychologist but I'm also a bit of a geek **. I wanted to find a way to display my results as the data grew and experiment with some new technology (or at least new to me). Quantified Mind doesn't have an API so I'm using old fashioned cut'n'paste to grab the data and put it into Google spreadsheets that automatically updates the graph you see below. It seems to work well so I will be exploring more facilities over coming weeks.

Here's my overall scores so far:

* yes there might a beer-cognition experiment lurking in there somewhere

** HCI is not just about making websites pretty.