Data sets
Started: 2013-07-27 23:22:26
Submitted: 2013-07-27 23:49:46
Visibility: World-readable
In which the intrepid narrator tries to figure out how many miles his cars have driven each year
I've been collecting data on my gas mileage and the flights I take for years, but only last week did the perfect way to combine these data-sets strike me: I could correlate the miles I drive per year with the miles I fly per year. This evening I realized I hadn't written any code all week long (possibly excluding a three-line shell script), so I set out to solve both problems at once. (Never mind that my day-job is as a software engineer; I spent the entire week learning about the code my team supports, and maintaining the bug list for my team, rather than actually writing anything.)
My code isn't quite ready for real-time queries; its date handling and database access is fairly inefficient, but here's the static version; I've extrapolated the end-of-year mileages based on a linear extrapolation from the last data point in one calendar year to the first data point in the next calendar year. (All of my data points are times when I stopped for gas when I actually wrote down the cumulative mileage.) Note that the 2013 numbers are year-to-date counting the most recent data I've bothered to enter, which is roughly January, so the number is a bit skewed.
Yoda
Year | End-of-year mileage | Miles/Year |
---|---|---|
2002 | 63757 | 8628 |
2003 | 76701 | 12944 |
2004 | 97242 | 20541 |
2005 | 114992 | 17750 |
2006 | 134779 | 19787 |
2007 | 155004 | 20225 |
2008 | 170324 | 15320 |
2009 | 179549 | 9225 |
2010 | 189074 | 9525 |
2011 | 199262 | 10188 |
2012 | 204189 | 4927 |
2013 | 204371 | 182 |
Lyta
Year | End-of-year mileage | Miles/Year |
---|---|---|
2003 | 193944 | 1688 |
2004 | 200673 | 6729 |
2005 | 217566 | 16893 |
2006 | 226756 | 9190 |
Motoko
Year | End-of-year mileage | Miles/Year |
---|---|---|
2006 | 66179 | 1215 |
2007 | 77020 | 10841 |
2008 | 88699 | 11679 |
2009 | 97479 | 8780 |
2010 | 106515 | 9036 |
2011 | 118064 | 11549 |
2012 | 129115 | 11051 |
2013 | 129474 | 359 |
Finally, here's the table I wanted all along:
Mileage summary
Year | Flights | Yoda | Lyta | Motoko |
---|---|---|---|---|
1990 | 4444 | |||
1992 | 1466 | |||
1993 | 2524 | |||
1997 | 9092 | |||
1998 | 2316 | |||
2001 | 5938 | |||
2002 | 9865 | 8628 | ||
2003 | 6874 | 12944 | 1688 | |
2004 | 3120 | 20541 | 6729 | |
2005 | 28164 | 17750 | 16893 | |
2006 | 22934 | 19787 | 9190 | 1215 |
2007 | 30771 | 20225 | 10841 | |
2008 | 8402 | 15320 | 11679 | |
2009 | 7844 | 9225 | 8780 | |
2010 | 26008 | 9525 | 9036 | |
2011 | 6233 | 10188 | 11549 | |
2012 | 34594 | 4927 | 11051 | |
2013 | 13888 | 182 | 359 |
Last year I flew far more than I drove; this year is likely to be the same.