## A Year of Personal Analytics

A couple years ago I read a blog post by Stephen Wolfram about personal analytics. In his post, he showed a number of different types of personal data he's collected over the past couple decades, as well as some interesting insights revealed by graphing the data. I was immediately fascinated, and felt somewhat of an urgency to start recording different types of data about my own life. For the past year or so, I've kept track of a number of different things. Here I include analyses of my weight and my car's gas mileage.

### Weight

Last October I started weighing myself every day. My motivation was two-fold: I wanted to lose a little weight, and I was taking a signals class at the time, so I thought it would be interesting to see what kinds of insight I could gain from the data. Wanting to get as close to the raw data as I could, I opted to use Matlab scripts I wrote for analysis, rather than outsourcing the tracking to other software. It takes more time, but it's more fun and offers more detail. Here's my weight over the past year:

My target weight was 170 lbs. As just a rough way to keep track of how well I was doing, I fit a line to my recorded weights and then extrapolated how long it would take me to reach my target weight at that trajectory. As you can tell, it's going to be a while...

Most of my weight recordings I did in the morning, before I had eaten, without clothing on, after using the restroom. Using my phone, I entered the weight into a text file on Dropbox. However, the actual time of day I weighed myself had some variance. As an example, here are the times of my recordings over the past month, based on the times previous versions of the text file were saved to Dropbox.

The average time I weighed myself during this month was at 10:31 am, but there was a standard deviation of 3 hours and 27 minutes(!). So there's some jitter in the time of day I recorded my weight. However, the average time period between recordings was fairly close to 24 hours. That is shown in this next graph, a plot of the derivative of the first graph.

The average time period between recordings was 23.91 hours, with a standard deviation of 5.04 hours. I am going to assume that's close enough to my desired sampling rate of 1/day. On the 24 days that I was out of town or forgot to weigh myself, I took the days before and after, assumed my weight changed linearly between them, and filled in the values.

Then, I wanted to see how much of my weight fluctuation was just noise in the recordings, rather than real changes. I detrended the recordings using a running average.

By doing this, I was able to discover that the noise in my weight is Gaussian distributed (Lilliefors test, p = 0.07), with a standard deviation of about 1 lb.

I also wanted to find out if there was a cyclical nature to my weight. I took the Fourier transform of my weight over the past year to see if any obvious peaks would show me a frequency with which my weight fluctuated. Since I recorded my weight once a day, the Nyquist frequency is 1/2 days, meaning I wouldn't be able to see any frequencies less than 1/2 days--no peaks for defecation.

Interestingly, I don't really see anything here that suggests there's a cyclical nature to my weight. I thought there might be some regular increase on the weekends followed by a slow decrease during the week that would manifest itself, but I guess not. This could be because there's nothing to see, or it could mean I haven't sampled frequently enough, or it could mean I haven't recorded for a long enough period. Maybe with a few more years of data collection something will show up.

In any case, I will have to try replicating the behavior I had between days 100 and 150 (in the first graph) to see if I can lose weight at an accelerated rate.

### Gas Mileage

I have a 2.5 liter, 4-cylinder, 2002 Nissan Altima. A little over a year ago, I started using it for my daily commute to school. I was curious about how much it was costing me to drive to school every day, so I started keeping my receipts from the gas station and keeping track of the number of miles I drove between fill ups. Now I use a text file on Dropbox to keep track of this, too.

I'm not sure what happened during Q2-14 that made me get such terrible gas mileage. It likely was a recording error on my part. But my average gas mileage hovers around 25.3 miles/gallon, with a standard deviation of 2.7 miles/gallon. The average range of my car between fill ups is about 344 miles with a standard deviation of 69 miles. However, I've gotten up to 441.1 miles on one tank before, so it really depends on what kind of driving I've been doing. I normally drive it until my fuel gauge is pretty close to empty.

My driving schedule has me filling up about once every 16 days, with a standard deviation of 12 days, as shown in the next histogram. The outliers were probably times when I forgot to record a trip to the gas station, making it seem like I went a lot longer between fill ups than I really did.

As far as gas prices go, the price per gallon dipped down at the end of 2013, beginning of 2014. Hopefully it dips again soon...

So what is my daily commute cost? With gas costing about $3.50/gallon, and with my car getting about 25 miles/gallon, the 20 miles round trip to school is costing me about

And that's just the cost of gas. Ouch!

### What's the point?

Looking at different data from my life lately was a lot of fun. I got to play around with the data and even learned some new things. However, my behaviors haven't really changed much since I started keeping track of these two variables. I eat a little bit healthier, but not so much that I have shed some extra pounds. I'd say my exercise rate has stayed about the same. I also don't really drive more conservatively. I've heard that performance measurement leads to improvement, but when performance is measured and reported, the rate of that improvement accelerates. Maybe I need to start reporting my performance. I guess this blog post is a good way to start.

A Year of Personal Analytics http://t.co/EoerbU6EcK

A Year of Personal Analytics, http://t.co/r2rpF4gRn4