2012/03/15

More with the Quantified Self stuff

This is me. Specifically, my weight over the last 20 or so days. That's the red line.

The blue line is the average of the weights reported over the seven days previous. There's only one weight recorded at first, so the starting points are the same. I'm told this is an excellent way to normalize the data, to even out the peaks and show the trend. It seems to work.

I was asked "Have you lost weight?" today, but conversation changed before I was able to explain that I can quantify the weight loss, and it's four pounds. That's probably a good thing.

Once I have some things together, I'll definitely put it up on Github. I'm even considering the next step, doing something -- gasp! -- commercial with it! The commerical version will be different, because I've coded this for one person, and I'll have to rejigger it for many parallel users.


  • It's in MySQL, and I'm happy with it. I've been told by someone in the Perl community that I should really go with PostgreSQL, which I don't have a problem with, either. 
  • I've been able to put all the logic in the query and just get the numbers, which I grab using Perl.
  • Using Template Toolkit, I take the numbers and generate an R script. I'm not particularly happy with the means of running it, a system call in the Perl, but I'm happy that it runs, and I'm happy that I can mess with the view, more or less,without having to worry about the model. Metaphorically speaking, as this really isn't MVC. And you can write R that looks much better than this.
Post a Comment