Monday, March 14, 2016

One year with a food scale and a spreadsheet

Let's take a brief jaunt into one of my most active spreadsheets: the one that tracks my macronutrients (consumed), exercise (performed), and weight (mass * gravity). I now have about a year of data, so perhaps we can see some trends.

The motive for the spreadsheet --- and the food scale which enabled me to precisely measure my food, for cooking, eating, and tracking purposes --- was mostly curiosity, an enjoyment of data points, and the interest to see if there were any long-term changes that were too gradual to notice on a daily basis.

Here's the chart, minus all labels because I don't have infinite time to wrestle with chart software to make something nice-looking, and also I don't have the expertise for what features a good chart should have.

X-axis: days in the past year (some data incomplete on some days)
Y-axis blue: kilocalories consumed (centerline is daily recommendation)
Y-axis green: exercise (goes from slothlike 0 at bottom to outrageously exhausting LAC day at top)
Y-axis red: mass ("normal" BMI cutoff is bottom 1/8 of scale; the rest is "overweight"; total span is ~6kg)
Obviously these clusters of blue/green/red dots are not super-easy to read. I have made your chart-reading life more difficult by stripping off all labels on the axes, for my own private reasons. It might help to interpolate some trendlines. Here are linear interpolations.
With linear trendlines, it looks like mass tends towards 0.
At various intermediate exponents between 2 and 10, the best-fit polynomials have weird corners or predict extreme blowup/decreases outside the range. This seems like a bad fit because my weight will probably not plummet to 0 in the next few years, and my exercise did not start at 8x my current effort just before the data began.

Here are some 10th-degree polynomial interpolations (below). I picked 10 because that was the highest available, and I have no idea what sort of trendline I should be picking to get a "meaningful" trend (visually interesting, useful, predictive). Notice that these polynomials predict crazy extremes --- my weight before the data was enormous, and my future weight is smoothly tapering down. I have fun watching how the best-fit polynomial changes when I add a new data point, as the relative flatness of the data means that it sometimes wiggles in an aesthetically pleasing way to accommodate the new point.
With degree 10 polynomial trendlines, the downtick in mass echoes the uptick in exercise.

This is not groundbreaking data analysis. Clearly. But I do enjoy playing with a spreadsheet.

Some very plain observations:
  • kCals: I eat approximately the daily recommended kCals, with some reasonable variation. A few of the really low outlier days I had a bad cold or food poisoning. The high outlier days I was just hungrier, so I ate more. Some of the really high outlier days are missing, as I definitely ate more on vacation in BBQ-feasting Texas, but I didn't reliably measure those days and didn't worry about it.
  • exercise: I'm using Fitocracy to turn my various workouts into a single number. Sometimes the number seems much too low/high compared to how much effort I felt the workout required. But at least it's a standardized measure.
    The trendline is helpful here because in any given week, hard workouts are mixed in with easy ones, so probably the average is more enlightening than the actual individual data points. (The chart has all that empty space at the top because high-outlier workout days occur at regular intervals, once or twice a week, and I wanted to visually include them in the chart.)
    The recent uptick in exercise reflects the fact that I have been going climbing once a week, regularly replacing a low-scoring easy workout with a high-scoring hard one. It's nice that the trendline shows this.
  • weight: I lost some, but if you look at the data points you'll see that my daily weight varies. The trendline is useful here for seeing, well, a trend. Much more interesting would be my density measurement, but of course I don't have this historical data. Based on how my clothing fits, I have swapped some undense fat for some dense muscle, but the single-number mass measurement doesn't reflect this change in volume.
Your advice for what I should do with this data is welcome. What would be interesting? I should probably just take a few classes of the coursera data science sequence and figure it out myself. I also have the breakdown of kCal into fat/carbohydrates/protein for each day, if you can think of something interesting to do with that. (Mostly it shows that the decrease in kCal came from eating less carbohydrates, but keeping protein the same, which was a result of conscious intent on my part.)
A time-travelling version of myself from the 1920s. (Illustration from La Culture Physique de la Femme Elégante, as posted here.)
Some non-empirical observations about this time period and set of data. I did not feel particularly hungry or like I needed food during this data period, even though I observably consumed fewer total calories and expended more. I found that I felt slightly overall more comfortable in my body: warmer in winter, cooler in summer, and generally more flexible (a bodily sensation I enjoy). (Other possible factors there: different clothing, different climate, different locations, the weird hyperbole/discounting of memories of past physical sensations.) Flipping through my logged workouts, my incremental increases in strength and endurance continue. One big difference between the logged data period and, e.g., graduate school, is that I don't really nap anymore. But there are enough other factors at play here --- my postdoc work schedule, French cultural conformity enforcing a standard and synchronized pattern of wake up-commute-work-lunch-commute-dinner, etc. --- that I have no idea if my food intake has had a causal effect on my decreased napping, or if other confounding factors have combined, or if perhaps I just aged into an adult sort of schedule which my body finds comfortable.

May your green trend ever upwards!


This post's theme word is overmorrow, "the day after tomorrow." Can your model predict how much I shall exercise on the overmorrow?

No comments: