Quick summary analysis of driving habits with the Automatic tracker for past 13 months.

Intro:

I realized last night that I have had my 2004 Volvo Wagon for over a year now. It’s not exactly a car I love, mostly because it has some issues, which I knew about when I bought it. I do love driving Volvo wagon’s though, especially as something to roll around town in. I added the Automatic tracker to the car when I bought it, primarily so I could see all the engine warning codes and know when I needed to take it to Robert at Meadowthorpe Motors (the reason I buy Volvo’s), or when I could ignore them.

Knowing I had a year’s worth of data available, I decided to go pull down the data and do a quick analysis of my driving habits. Here’s a quick look:

Interesting observations:

  • I had 1,861 trips!  This seems ridiculously high, until you realize that every time you go out to a store you’ll make a minimum of 2 trips and often many more. I’m assuming this will be less this year, now that I commute most place on bike?
  • The month I drove the most miles was May 2017… which is the month I moved.
  •  When I leave town in a car, I always rent a car. So in February when I drove to Kansas and Texas, along with Minnesota in June are not reflected in mileage driven.
  • Moving has decreased the total driving, on average.
  • I don’t really spend that much on gas. Only one month (again May 2017) did I spend more than $100 on gas.

The analysis (completed using a Jupyter Notebook):

Import pandas, numpy and read in data from csv exported from Automatic

In [46]:
import pandas as pd
In [47]:
import numpy as np
In [48]:
trip = pd.read_csv('automatic-trips-2017-08-01.csv')

Pull out the first two rows from data frame to see what is available

 

Here you can see my trip from Joseph Beth Bookstore to Barnes & Noble, than B&N to Five Guys !!

Here’s an image capture of that output:
Screenshot 2017-08-02 08.36.43

Create a dataframe with only the columns of data initially interested in, then print the head to view

In [50]:
trip[['Vehicle','Start Time', 'Distance (mi)', 'Fuel Cost (USD)']].head()
Out[50]:
Vehicle Start Time Distance (mi) Fuel Cost (USD)
0 2004 Volvo V70 2017-08-01 8:03 PM 1.73 0.21
1 2004 Volvo V70 2017-08-01 7:24 PM 9.04 0.81
2 2004 Volvo V70 2017-08-01 7:00 PM 4.98 0.53
3 2004 Volvo V70 2017-07-31 7:35 PM 2.17 0.28
4 2004 Volvo V70 2017-07-31 7:10 PM 9.90 1.00

The date needs to be changed to datetime format, but checking current type first

In [51]:
type(trip['Start Time'][0])
Out[51]:
str
In [52]:
trip.loc[:, 'Start Time'] = pd.to_datetime(pd.Series(trip['Start Time']))
In [53]:
type(trip['Start Time'][0])
Out[53]:
pandas._libs.tslib.Timestamp

I want to use the TimeGrouper method from pandas, so need to set index to the datetime

In [54]:
trip.set_index(trip['Start Time'], inplace=True)

Print first 5 rows to make sure index is now set to ‘Start Time’

In [58]:
trip[:2]
Here’s an image capture of that output:
Screenshot 2017-08-02 08.36.43

Some columns no longer makes sense after applying sumer (avg. mpg, etc), subsetting desired columns for new dataframe

In [57]:
monthly_miles[['Distance (mi)', 'Duration (min)', 'Fuel Cost (USD)', 'Fuel Volume (gal)', 'Hard Brakes', 'Hard Accelerations']]
Out[57]:
Distance (mi) Duration (min) Fuel Cost (USD) Fuel Volume (gal) Hard Brakes Hard Accelerations
Start Time
2016-07-31 497.85 1265.68 49.51 20.85 19 0
2016-08-31 692.04 2217.81 77.31 32.84 47 9
2016-09-30 825.78 2396.94 85.45 36.00 40 3
2016-10-31 792.81 2148.12 82.74 32.75 27 2
2016-11-30 662.76 2000.36 69.73 29.27 15 0
2016-12-31 704.19 2273.12 83.56 33.14 23 0
2017-01-31 555.44 1731.53 65.27 25.12 6 1
2017-02-28 453.55 1290.42 47.37 19.22 14 2
2017-03-31 723.20 2151.33 76.75 31.01 19 5
2017-04-30 797.27 2331.63 81.87 31.47 20 0
2017-05-31 943.92 2899.84 103.62 38.95 49 0
2017-06-30 256.22 821.56 26.54 10.38 12 0
2017-07-31 400.41 1347.42 44.46 17.40 15 0
2017-08-31 15.75 36.01 1.55 0.61 0 0
In [ ]:
 
Advertisements

Getting activity data from my Polar Loop?

I currently use a couple devices to track daily activity, one of them is the Polar Loop. I have been searching for a way to extract my activity data so that I can do some analysis of my own, however I have not found a way to easily do this.

Here is what I would like:

  1. step data
  2. calorie expenditure data

The other data associated with activity tracking would be nice, but not necessary. I also don’t need training data at this time.

I had thought that a potential solution would be connecting Apple’s HealthKit, then extracting the activity data from the HealthKit – however that connection doesn’t seem to be very reliable. I’m pretty confident I don’t average 68,268 steps per day. It also doesn’t go back historically as far as I’d like. The other option might be to use the Polar AccessLink api, however I haven’t tried to attempt that option at this point.

The only other option that I see is going to the web interface and manually getting the data for each day. The idea of going back to November 2013 and manually pulling the information doesn’t seem like a wonderful option, especially as you look at the amount of effort the Polar Flow web app requires just to see a single days step count data.

When I think about the type of device I use or want to use, knowing what access I have to my own information is something I consider to be a key factor. I initially started using the Polar Loop in the hope of collecting heart rate data which was unavailable with other activity tracking devices at the time. Polar is also one of the companies that has done heart rate measurement reliably for a long period of time with implementation of a chest strap (I use the H7 Bluetooth strap).  My goal of using the loop for this purpose was never accomplished, as the loop has not been the best experience for collecting exercise heart rate data and it also isn’t that useful trying to collect all day heart rate data.  I actually find that my few attempts of collecting heart rate data throughout the day is better using the H7 strap with the iOS app, but my phone eventually runs out of battery or I’m not around my phone.

In other words, I never quite achieved what I hoped to achieve using it.  However I continued to wear the tracker as my primary watch which allowed me to continue to collect step data. Now, i just want my information – which hasn’t been easy to obtain. As devices evolve, as web platforms improve – I’d love to know that I can transfer my data to new platforms over time. I’ve struggled with this issue regarding exercise data and logs in the past, I’d prefer my activity and health data not be locked up by a single company.

… If anyone has suggestions or hacks they’ve seen to get the Polar Loop activity data, I’d love to hear them.

Do what I say..

I have this thing, I have had it since the day I was born. Well, at least since the earliest memories I have as a kid.  It becomes most memorable at the point where being a pain in ass stopped being cute and became a problem.  My thing is questioning everything.  I have questioned my parents and teachers, books and movies, friends and strangers, common knowledge and a skeptic’s story.  It has got me in trouble with teachers, the dog house with Nikki – but it has also been a driving factor my unending desire to learn and an unbearable curiosity.

There was an answer that I regularly received that struck me as interesting, yet potentially frustrating too.

“Do as I say, not as I do.”

Keep this in mind as you read my thoughts leading the race tomorrow morning.  I would not completely recommend an athlete go into a race with the training I’ve had, but as I’ve thought through what my personal expectations are for this run; I’ve realized that maybe it hasn’t been optimal but I’ve lived into some of the principles I preach – plus tomorrow is about more than finishing or trying for personal records.

Expectations:

1. Gain back a little bit of the confidence that I lost in New Orleans.  Bad performances haunt me like the plague, which has always been a stumbling block I have to achieve my goals.  Great things often come after big lows, or at least that is the narrative we are told.  I was in the best shape of my life in Feb of 2010, to not execute on that fitness has always haunted me a little.  I thought continuing to race afterward that year would help.  But even though I set a PR at the 10k, 10 mile and ended up running 3:06 at Cincinnati (not a PR, but something to be proud of) – I’ve never been able to let go of New Orleans.  Partly because it was scary.  Partly because my ego was damaged and I haven’t wanted to be vulnerable again.

So this little build up I’ve had to make it here to Arkansas and run, I’ve worked hard on regaining mental focus and discipline.  I have used a specific mantra and visualization for months, it goes like this:

Give me energy, power me up. Give my mind peace, happiness and joy. Give my spirit strength, which carries my body over this roads that I run.

As I get tired, or each day it may not be that phrase word for word – but 99%.  As I say this, I turn my palms up to accept the energy and I visualize myself running an open road in Nebraska or sometimes I see an eagle chasing Billy Mills across the plains of South Dakota.  Or sometimes I’ve even envisioned my body having a power indicator, just like my iphone – and it gets a little more charge.

The biggest goal tomorrow is to regain what was always one of my strength.  Mental strength when I’m physically weak.

I heard on the Joe Rogan Podcast today a discussion of pain.  They were talking of a rite of passage ceremony, though I don’t remember all the details.  The message I took from it was that during the rite of passage the boys were able to take the pain they felt and turn it into energy of a different kind.  That is the essence of running long, in so many ways.

2. A more tangible outcome is to run a negative split.  My longest single run has been 13.4 miles in training, which was done primarily because I knew I couldn’t recover from the longer runs.  I’ve done some of my double longs and triple long stacks, so I’m not terribly nervous – but I also don’t know what is going to happen after 18 or 19 miles.

To be able to run a negative split in this scenario will take a ton of race management, ego checking and execution.  It will happen.

What I didn’t realize until today (zero race prep here!) was that the course was essentially three out and backs.  So I’m thinking each loop should get faster.

3. Check Arkansas off the list.  This alone is worth the trip.

4. Test and experiment with data.  I will be using the following devices:

– Garmin 210
– Runkeeper Iphone App (I have an elite account, so you can track me live if you wanted)
– Fitbit, this will be my second marathon with it so it will be interesting to compare that data
– Polar Loop, my newest toy and I’ll pair it with my Polar H7 to pull heart rate data onto the loop.

You know what…

After writing this little post, I don’t feel quite like the coach that is not following his own advice after all.  Still, it’s often better to do what I say, not what I do.

 

 

Quantified Self Measurements – Q2 2013

Potential things I want to add / do in second quarter of 2013:

– blood sugars (at least for 1 week, multiple times throughout day)
– books read
– lectures listened to / watched (subjects reviewed)
– research articles read
– amount of coffee (because I know that the binary data for each day is ‘yes’)

Also need to get outcomes page created, which will include information I already collect
– weight
– body comp
– body measurements
– run mileage / duration / ctl / tss
– possibly break out steps on treadmill desk (don’t currently track individually)

Tracking 2013 – Important Data and Patterns

This year I have decided to set forth on a journey that is a little different then almost every year for the past 14 years. I have become accustom to setting goals for the upcoming year on January 1st, or soon after. This year I have decided to make a little bit of change in that pattern, primarily because I wanted to start tracking something different – but also because the past two years have not been exceptionally successful for me on a personal level.

They say that stupidity is doing the same thing over and over, yet expecting to get different results. Therefore rather than setting big goals (like Ironman, sub 3 hour marathon, being debt free) and creating a plan to meet those goals, I’ve decided to take a daily commitment approach.

What does this mean?

I am going to track my daily commitment to the behaviors that I believe are the key to a successful year. The thought being that commitment to the these behaviors are going to propel me towards the things I’d like to accomplish. I’ve discussed this idea previously over at Endurance Base Camp, talking about “process goals” versus “outcome goals”.

I (and our culture) am often committed to outcomes. I want to be a successful runner; which I’ve defined as getting my marathon time under 3 hours. I want to be an individual that lives with financial freedom; which I’ve defined as having zero debt. I want to ….

The point is that it is easy to commit to the outcomes we want to have, but it’s a completely different level of commitment to live into the daily patterns that are necessary to make those outcomes become a reality.

What am I committing to?

As I work out what I want my “future self” to be, I’ve come up with a few behaviors I am confident will help that desire become a reality:

  • 30min of Aerobic Exercise – this is a minimum acceptable duration, 4 days a week for Q1 2013
  • Strength Training – the specifics are not as valuable as getting it done twice a week for Q1 2013
  • Yoga, Animal Flow & Daily Steps – supplemental physical parameters that I believe will help
  • 9 Servings of Fruits & Veges, eating breakfast (60min of waking), protein with breakfast
  • Alcohol, water, diet soda and soda – it’s clear that what I drink is bigger need for change than what I eat
  • Bed by 10:30pm and 7.5 hours of sleep – it become incredibly obvious in 2012 that my poor sleep derailed my ability manage stress and train the way I wanted.
  • Meditation & Scripture Reading – two behaviors that are consistently present when I am happy

Those are the behaviors that I have identified for the first quarter of 2013. Some other things that I have identified that are not necessarily daily behaviors, yet I have decided to look at adding them to my 2013 schedule of behaviors:

  1. 4 backpacking, hiking and camping trips — primitive camping always makes me happy
  2. Quarterly long weekends — taking a little bit of a lead from Brad Feld, I’m scheduling a 4 day weekend each quarter.
  3. 1 personal get-a-way — no idea what this means yet, maybe a long camping trip by myself, possibly getting away for a week long bike touring trip (solo of course), who knows?

There are some other things that I’ll look at adding in the second quarter of 2013, depending on how this goes.  I need to add intellectual habits, such as reading books and taking online courses.  I also need to add some financial behaviors, but just don’t want to overload myself right now.

I created a page to share the graphs from my spreadsheet that I’m using to track this data, you can find it here:  Gary’s Behavior Tracking Dashboard

PS, I just noticed that it is 10:33pm EST.  This means that I’m not meeting that behavior for today.  It’s a process.