Tracking Weight and What You Eat with Twitter

I’m sure this will come as no surprise to all of you, but personal data collection fascinates me. I love playing with data and when it’s about me, all the better. Daytum and mycrocosm are two applications that let you do this; although each have somewhat different goals. Daytum is sort of like a financial report for your life (ala Feltron) while mycrocosm is more of an experiment in communication and social media. They do both, however, have an underlying goal, whether implicit or explicit, of understanding yourself better. Do Daytum and mycrocosm help you understand yourself better? At some level, yes, but both have room for improvement. Here is my attempt #1 to improve on these existing systems.

Sacrificing Specificity for Flexibility

Daytum and mycrocosm let you start your own personal tracking for whatever data fit into a pie chart, bar graph, line chart, or a list i.e. Google Charting API. This is fine, and can very well be useful, but after a little while (like after a week), I got bored, and haven’t done much with the two apps since. But why?

I think it was because mycrocosm’s charts are so basic that I wasn’t getting anything out of it. I was just collecting data for the sake of collecting it. On the other hand, Daytum does at least allow a little bit (albeit, a very little bit) of interaction and is better designed on the frontend. There’s no way to enter data via SMS with Daytum though (mycrocosm does), so my data entry was pretty sparse…and so began my own experiment.

Borrowing Lessons from Self-Experiments

Not quite satisfied with what I had available, I created my own self-surveillance bot to try to figure out what my ideal mycrocosm or Daytum might look like. I happened to just finish reading Seth Roberts and Allen Neuringer‘s paper on self-experimentation in which they identified 6 lessons learned from their own self-experiments:

  1. Measure something you care about
  2. Make data collection and analysis as easy as possible
  3. Taking more than one measure is usually worth the trouble
  4. Make graphs
  5. Communicate your ideas
  6. A flawed experiment is better than none

These lessons seemed like a good place to start, so I loosely used them as a base for my own self-surveillance.

Tracking Weight and Foooood

I’ve gained about 15 pounds since I started graduate school – largely in part from sitting in front of a computer all day, snacking, and not exercising over the past four years. Yeah, that’ll do it to you. Shocking, I know. So weight is certainly something I care about. That covers lesson one.

Now for lesson 2: make data collection and analysis easy. I chose Twitter as my data entry point. I use Twitter already (especially with my new phone with the QWERTY keyboard), so it wasn’t a huge burden to start tweeting what I eat. I created my own Twitter bot and created my own basic language. When I consume something, I send a direct message to my bot, and when I weigh myself, I tell my bot how much I weigh. Since all of this is via Twitter, I have multiple points of entry – mainly mobile phone and computer. My bot then of course sticks everything into a database. Tada, I now have data that I can run analysis on.

Lesson 4: make graphs. Don’t have to tell me twice. The important thing here was making sure I showed the things I care about. I need motivation. I stuck that in big print, above the fold. I care about how much I weight, and whether or not I will reach my goal. I care how much time I have left and whether or not I’m on track to achieve. I tried to take this into account as I put together my progress page.

What Can We Learn?

Ultimately, I want maximum output for minimum input. Does this simple self-surveillance do me any good? Does it really help me improve myself? As you can see, I haven’t exactly lost any weight in the past 2 weeks. However, it is interesting that my weight went down some in the beginning. Then I went on travel for a week (when there aren’t many weight measurements) and wasn’t so diligent in keeping track of eating and weight. I got back home a couple of days ago and I’m back to where I started.

My main hope is that I can argue that this more specific type of self-surveillance, in contrast to mycrocosm and Daytum, provides me with more motivation, more use, and something more than just satisfying a curiosity in the minutiae of everyday life. Change is what I’m after. What do you think? Do I have hope or am I just wasting my time?

UPDATE: If I were to make this public, would anyone want to use it?


  • The page looks great. Nice use of the grid, subtle typography goodness … I hope you’ll reach your goal, but you’ve already won one battle: that app is gorgeous.

    I have a question though, how do you match the food you eat to its calories ? Do you manually assign them a “cost”, from what’s written on the packaging ? I’m curious about this ^^

  • Now you have to tweak the app to sort out “ice cream” and alert you when you’re eating too much of it. Heh. “Nathan, you have eaten ice cream six times this week.”

  • Great post. I’ve really been enjoying your site.

    I’m interested in your use of twitter. Would you be willing to share your twitter-bot code, or post some of the resources you consulted for developing it?

    I have a project I’m thinking through right now that would use twitter in a similar manner to track my movements during the day.

  • @Pims – Thanks :). I’m actually not counting calories, just the number of times I eat. Calorie counting would be the natural next step in this though.

    @Mindy – hehe, yeah. I’m actually thinking about that. Some kind of feedback mechanism that tells me, “Dude, stop eating so much,” when I’m not on track

    @Mario – Keep an eye out. I’ll post the Twitter bot code in its entirety soon.

  • The Twitterbot is a great idea! I have two different applications on my iPhone for tracking weight and stuff I eat, but I never really use them. One of the problems is that you can’t get the data out easily. So rolling your own and having an easy way to send the data to your database from wherever sounds like exactly what I’d need, too.

  • I’d be very interested in using this stuff if you released it.

    I personally gained about 30 lbs back over the last two years, several years after losing about 90lbs. Naturally I was pretty unhappy to admit that I was no longer at my slimmest.

    Now I’m jogging about 5k a night again, anywhere from 3 to 5 nights a week. In the past when I lost a lot of weight I purposely avoided scales the entire time I was in the process because I didn’t want to be discouraged by the slow rate of my progress, or convince myself that I had already done enough.

    At the same time, now, I get discouraged wondering if I’m actually accomplishing anything. It would be really helpful and motivating to have a record of what I’ve managed to shed along the way.

  • awesome stuff.
    bessides twitter,maybe use aim/jabber for a more live input instead of having to get data from twitter.

    itd be awesome to have this open sourced or made into a service.

    do you analyze the length of text for each meal? would that be useful?

  • Kevin Carlson October 30, 2008 at 3:03 pm

    Interesting idea! I haven’t used a Twitterbot before, however, with your background in PHP you might want to look at scheduling some IMAP code to check a receiving email account periodically, then process the text using PHP. This approach could provide additional programming flexibility…

  • @Ian – I know what you mean. When I got back home after my week of travel, I was hesitant to step on that scale – especially since I knew other people were going to see my “progress”

    @Joseph – Definitely. The more points of entry, the better. I’ve given a little bit of thought to turning this into a service, but part of something much bigger – sort of a self-surveillance platform where data collection isn’t only restricted to food and weight.

    I hadn’t thought about text length… that could be useful, especially how I’ve been entering stuff.

  • @Kevin – That was actually my first approach (but with Python :). I chose Twitter for the time being though, because if I wanted to let others use this, I wouldn’t have to take care of spam, etc.

  • do you have any daytum invites?

  • Love this idea. The best next step would be to set up a database that learns the caloric content of foods – I don’t know about you but I tend to eat the same stuff over and over. So the first time you eat a burrito, for example, you could tweet “burrito=1200” and then any time you send “burrito” it will reference accordingly. Kind of like tagging but with another variable…

    I would love to see this publicly available.

  • hey Nathan, I like the visuals of the graphs but not so much the substance.

    Measuring pounds can be a bit variable day to day, and BMI is a bit unreliable for classification purposes. I’d be concerned that these measures are demotivators.

    Instead, I would measure weight within ranges, to avoid demotivation when it went up 1/2 pound on a given day but dropped 2 pounds for the week. I’d also add a perceived “pants tightness rating” so you can measure directly against your goal.

    Number of eats is not the best measure either… for example, 6 smaller meals a day is better than 3 larger ones. You really need to work out what your caloric needs are in a typical day, and then compare the calories you consumed. Ideally the latter is lower than the former on more days than it is not!

    Although getting the calorie data is a lot harder to do, it would make it a lot more beneficial. As an easier but less accurate alternative you could use the GI of foods that you are consuming. In either case, it would be good to see a ranking of the foods you eat that are contributing most of the energy (calories) in your diet. Then you’ll have confirmation of which foods to reduce/replace. The nice thing about tracking it is that you can sometimes see foods that you really were’t aware of, but which might be a problem. After i tracked my drinks for 6 months I realised just how much sugar was coming from soda, which was the incentive to quit drinking it.

    I’d also add a target line from start to goal, based on something realistic like 1 to 2 pounds of weight lost per week. That would help you determine whether or not the goal is even realistic. As it becomes less and less realistic that line will get steeper and steeper.

    I’d also add some exercise to the visual. You could tweet each session, and ideally, calories burned if you have a HR monitor, or just duration and then use a table of METS to calculate the energy expended.

    Finally, you could glean a few ideas from :)

  • I would love something like that to track my exercise details – when, how long, what I accomplish, etc. So – not the same as eating, but the same “kind” of detail

    I was wondering when you’d get around to linking personal data with Allen Neuringer’s work – I went to the college where he taught (he just retired recently) and was a subject in some of his earlier self-experiment studies. He’s a really phenomenal guy – I hope you have emailed him some of your posts :) I went to a psych dept reunion this June and it was a sort of celebration of Allen and others – Seth Roberts was there too. It was really kind of awesome to see where all these folks who graduated from that program have ended up.

  • Which phone did you go for?

  • i’d like to think i was the inspiration (or at least nagging motivation) behind this

  • @AJ, Tim – All valid points. On the flip side, thinking back to the time when I was fittest in my life, I never counted calories. I just didn’t overeat and exercised. As for weight, I agree – I shouldn’t weigh daily, and probably weekly. Of course, I’m just experimenting at this point :)

    I also don’t want to get too specific just yet since this is really just a first pass at using Twitter for something useful. In the grand scheme of things, I’m more interested in a framework for recording lots of things and then the social implications.

    @Sara – The Roberts/Neuringer self-experimentation paper is actually the only thing I’ve read. I also chatted with Seth once, but that’s about it. Do you have any Neuringer literature suggestions?

    @Daniel – I just got the free phone Verizon was offering at the time, the LG env2. Satisfied with it so far.

    @bea – yes.

  • Oh wow. I NEED this in my life so badly! PLEASE SHARE!!!

    great post.

  • that is an inspiring visualization. can i ask which tool you used to generate the flash dashboard?


  • @KS – custom actionscript :)

  • So let me sum it up:
    – you’ve got a PhD in statistics
    – you sure can design
    – you know how to code in Python, PHP & Actionscript

    How come you’re not working for Google yet ????!!!!

  • @Pims – Ha, I’m not quite there yet :) I’m still working towards my PhD. One and a half more years, maybe.

  • I’m a bit concerned that you are measuring number of times you ate and your weight. They are a bit disjoint.

    I would maybe use it if it automatically counted (estimated) calories of what I ate, even if i don’t indicate how much of it I ate. Better if it also indicated (estimated) how much calories I burned depending on what exercise and how much I’ve done of it.

  • Nice layout and goal-based motivation right there on the dashboard.

    I have a tool I use to track my training, and even though I use it every-day to track my sessions, I haven’t done any useful active deployment on it since I started the project nearly a year ago.

    Thanks for the inspiration, I’m going to start with a new layout and decent graphs.

  • I can’t see why tracking numbers of meals are wrong?
    If this graph is not only to track progress but also to see what works best.
    This graph will show what number of meals are the best for Nathan to loose or gain weight.

    Sometimes we try to put too much details forward, and belive it automaticaly tells more and makes us smarter.

  • Hi, has an awesome weight tracking feature with time-lapse video creating. Check it out!

  • If you were to make something like this go public I would totally use it.

    Beautifully designed by the way. So clean!

  • I would love to try this out and use it! How can I help? I am a BI Analyst by trade and I love data and finding patterns!

  • Would love to use this. Looks great. Nice human touches.

  • A couple thoughts.

    Graphs are absolutely essential for watching weight.

    if you’re gaining (or losing) 0.5 – 1.0 lbs a month,
    you may never be able to see this if you weigh yourself,
    say, 1 day a week (as I’ve seen oft recommended)

    My weight bounces around as much as 10 lbs in ~24 hrs,
    and 6-8 lbs in 12 hrs. Without graphs, it’s not likely
    that I could make out the true long-term trends
    (regression to the mean)

    You might also consider a scale that (proports to)
    measure body-fat percentage. Such scales may never
    be accurate in a absolute sense, but it can be useful to
    plot the relative values from day to day.
    (i find the readings are affected greatly by how damp, or
    dry your feet are.)

  • “If I made this public would you use it?” HELL YEAH!!!!!!! Make it public!!

  • Yes! I would definitely use a released version.

  • This looks neat, reminds me of daytum.