Fitness Tracking Platform: Update on Progress

Fitness Tracking Platform: Update on Progress

Last August, I enthusiastically blogged about an idea I had for creating a Fitness Tracking Platform; personal informatics for fitness.  Since that time I’ve been gradually making progress and am getting closer to fulfilling that original vision.  I figured I would do a quick writeup and share some of the progress I’ve made, and layout a simple roadmap for taking it to the next level.  For right now I have some screenshots I can share.  In the coming weeks I plan on putting up an actual demo application, and may release a large portion of the code as open source.  Ultimately, I still need to figure out what I plan to do with it, but my immediate goal is to build something that is practical and useful for myself.  The original idea started out to mainly track fitness related data (and that’s primarily what I’ve been doing), but the application for this could apply generically to any form of self tracking.  It’s possible this could be one of the earliest efforts to create an open source application for personal tracking (see the Quantified Self list of software).
What’s Been Done So Far?
If you look at the original diagram I created, there where a few different components to this tracking platform (local storage, data collection scripts/api integration, and the presentation layer).

  • Local Storage – Personal copy of data stored in MySQL.  I created the local storage piece almost immediately after writing the article in Aug.  I chose to use MySQL as a database, and created a schema that was suited towards collecting my initial data set of interest: data from my FitBit and WiThings scale.  The schema accounts for storing both daily and intraday activity for calories burned/consumed, activity score (+very active, moderately active, and lightly active), total distance, steps taken, sleep, and weight.  I’ve now created about a dozen or so SQL queries that will generate useful reports on this historical data.
  • Data collection scripts/API Integration. I immediately leveraged the Perl FitBit API I originally wrote last April to sync data from the FitBit site to my local database.  I created a nightly cron job that will request the daily + intraday stats and save to the db using Perl::DBI.  I also took a similar approach with the WiThings scale.  Although I haven’t created a Perl wrapper yet for Withings, they do publish and easy to use REST API for getting access to your weight.  This script also runs on a nighly basis and saves weight information to the local database.
  • Presentation Layer.  This has been the most complicated piece so far.  I’ve created a Java-based webapp using Spring 3.0/Jetty to build the analytics UI.  For now the UI is built with 2 major views: a dashboard, and reporting interface.  The dashboard displays both historical and daily information in a visually-pleasing format using Google Charts.  You can see a daily snapshot (+ weekly, quarterly, and yearly views) and see stats on your activity, distance, steps taken, weight, sleep and intraday stats (activity and sleep level on an hourly basis).  I’ve also built a light home-grown reporting interface that integrates with the Google Visualization API and easily builds dynamic tables and charts based on the provided SQL queries.

Screenshots

  • Dashboard View

dashboard

  • Historical Stats – Multiple Activity Logs

historical

  • Historical Stats – Distance Bar Chart

historical2

  • Daily Stats

daily

  • Intraday Stats

intraday

  • Reporting

report_closeup

Immediate Next Steps?
The current code is fairly stable and mostly ready for a demo.  Before I make it live I’m planning on adding a few major features:

  1. Geo-Location support – I’ve been tracking GPS coordinates since I purchased my QStarz device in September.  I’m thinking of adding a couple Map and GPS tracklog views to the Dashboard.  And, this could lead to some interesting location-based reporting as well.  I have a ton of saved .gpx files, so it’s a matter of writing an integration script to parse and store in the db.  And, some lightweight presentation layer to dynamically generate .KML and overlay on top of Google Maps.
  2. Simple mobile interface.  I’d like to be able to access the interface using my iPhone and having some light interface to get quick stats and graphs would be nice.
  3. Come up with a catchy project name.  As I stated earlier, although the original scope of this was for fitness tracking, this type of platform can be used for tracking any type of personal statistics.

Future Roadmap

  1. Tracking detailed sleep info from MyZeo.  Since I wrote the original vision I had the chance to do a review for the MyZeo sleep device.  I’ve also created a Perl API so it’s simply a matter of writing the integration script to start recording in the MySQL DB.
  2. Tracking workout info from my iPhone app – iFitness.  I also have about 10 years worth of workout information either stored from previous products (like CrossTrainer) or written down.
  3. Tracking heartrate info from my Garmin heartrate monitor watch.
  4. Integrate with the new official Fitbit API.  Since I wrote my initial (unofficial) Perl API, fitbit has embraced the developer community and released a support API (yes!)
(Visited 2,291 times, 1 visits today)

4 Responses

  1. Neat stuff. You might want to add a category to the pie chart called “inactive, but coding the activity tracker” :-).
    I was never as fit or healthy as when I did all my fitness tracking in hardbound notebooks. Somehow an empty page can more compeling than an empty database record.

  2. ericblue76 says:

    I like that category! 🙂 There definitely is some irony in sitting still writing a program that tracks success by not sitting still.
    Good point on writing things down. I’ve also spent years manually keeping track of my workouts. I think the really key factor for success is visibility. With the current setup there’s less writing things down (partially the beauty of it), so it’s very important to review the data on a daily basis to see how you’re tracking towards your goals.

  3. […] A month ago around this time I was anxiously awaiting the first annual Quantified Self conference in Mountain View, CA. This was a fantastic conference on many levels and, although a little late, deserves a future post detailing the great sessions, people, and companies who were there.  I didn’t have an official speaking session, but I used this event as a milestone to make forward progress on my personal project for fitness tracking. […]

  4. Scott Wilson says:

    Have you released a version yet? I am a teacher at a school and would love to use this tracker to track the fitness of my students. This is exactly what I am looking for to use in my PE classes.
    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *