Matt's Notes

Fitbit Data Part Two -- Access and Visualization

In my last post I told my story with my Fitbit, and ended on a high note with regards to data access. Here I’ll share how I got my data, and some early visualization I’ve down with it.

The relevant code for this post has been put up on the github project FitbitAnalysisTools. It’s very rough, but functional.

Getting Your Data

As I mentioned, the amazing key to all of this is jFitbit. My thanks to Clay Gregory.

In the project FitbitAnalysisTools, I’ve provided a rough skeleton of a Java program to extract your fitbit data using jFitbit.

Unfortunately, I’m crap at packaging, so it will be a little rough to get put together. Hopefully the README and instructions will help get you going. If not, please email me – Though, I may be a little slow to respond!.

At the end of this, you should have a plain text (CSV) file containing the steps for every five minute interval in the time you’ve specified.


I’m fascinated by data visualization – I’m bad at it too, but still fascinated. One visualization project I found very interesting was Stephen Wolfram’s Personal Analytics.

The diurnal plots (using the Mathematica terminology – if anyone knows a different name for them, please let me know) are fascinating to me.

Here’s his email:

I was curious about this kind of plot for my activity – what does it look like?

In my plot, the data is coloured using the matplotlib YlGnBu colourmap, which scales from yellow at the low end, to blue at the high end. I’ve also used white to indicate zero steps.

Some interesting notes (to me):

  • The gap in August 2012 is where I lost my fitbit, and the time it took to obtain a replacement.
  • The gap in May 2013 is a Mexican Vacation where I left it at home – planning on swimming most days, and it is not waterproof.
  • The consistency of my scheduled from September to May
  • I stopped using it for sleep tracking in January.
  • My three phase day – Morning, Lunch, Evening.

I’ve included the script in FitbitAnalysisTools as

I’ve got some ideas for more visualization, analysis. We’ll see how that plays out later.

In conclusion – I’m super happy with Clay Gregory. Now to email him and see if I can’t buy him a beer or something.