Free to good home: mileage.project specification

I've spoken a few times with my roommate about gas mileage, so now that Lifehacker's mentioned some tips on boosting your mileage, I should finally write up this idea for a web site I don't have time to build. If you think it's cool, feel free to build it.

mileage.project is a web site for recording and storing users' gas mileage data. I have called it "mileage.project" in here in spite of thinking of it as "mileage.info" because the actual mileage.info domain is for sale by a squatter.

User story

Alice is a cost-conscious consumer who, with gas prices rising, wants to know more about what mileage she's getting. She has a cell phone with SMS service, and can SMS to internet email addresses.

Alice signs up for an account at mileage.project. She already has a LiveJournal account, so she clicks the "Register with OpenID" option and enters the URL to her LiveJournal. After agreeing to share her OpenID with mileage.project, a new account is created and Alice is signed in.

She is then presented with the setup help screen. This screen describes the process of actually using the service. Alice configures her phone and is all set.

Several months later, Alice is buying gas and remembers she wants to record her mileage. After gassing up, she takes her receipt back to her car. Using her cell phone, she pulls up the mileage.project entry of her address book and composes an SMS. She reset her trip odometer the last time she got gas, so she enters the current trip distance reading. From the receipt she enters the number of gallons gas she bought, and the total price of the gas she just purchased:

247.7 11.472 35.09

She sends the SMS, resets her trip odometer, and goes for a latte on the way to work.

When Alice gets to her desk, she visits mileage.project. She's already signed in, so she is immediately presented with her current stats page, updated with the morning's purchase. She sees a graph of her mileage for the past several months as she's used the service. The graph compares her mileage against other mileage.project users with the same type of car. (It's also very coarse and curves widely, due to the low resolution of data.) A bump in the graph is marked in the middle with a flyout Alice entered; it says she drove on a trip that week.

She sees a smaller graph of the gas price per gallon of her purchases over the past few months; the same graph displays average gas prices for her zip code on her purchase dates.

Moving parts

mileage.project comprises several systems:

User authentication and configuration

You must authenticate to configure an account. Authentication should be local (username and password) or with OpenID. Being able to later assign an OpenID to a local account would be nice.

When registering, and later after following an "About you" link, the user can configure eir account. There are several data the user can give:

  • SMS email address
  • zip code
  • vehicle make, model, and year
  • mileage at last fuel
  • blog posting info (either email or Atom endpoint, user, and password)

The user should also be able to set eir SMS email address by sending an SMS to mileage.project containing a unique code given via that page.

The My Mileage page

The main page of the app is the My Mileage page where users see pretty graphs. There are many data to illustrate:

  • calculated mileage (user's and average for other users with user's make of car)
  • miles driven (user's and average for other users in user's zip code)
  • gas price (user's and average for user's zip code)

The gas price data should be provided by a partner web service such as GasBuddy.

Users should be able to annotate their graphs with events and explanations. The annotations can be displayed as callouts. If the message is long, it can be abbreviated until the viewer's cursor hovers over it.

Users should be able to opt to share their data publicly, if they wish.

Email component

mileage.project serves two important services by SMS-email gateway: email registration and data recording. (Email registration is described in "User authentication" above.)

When an SMS is received, mileage.project should find the appropriate user record for the From header in the email. If none is found, the email should be discarded (though it would be nice to keep one or two emails per address in case a user registers or changes to that address after sending).

The service should parse out a sequence from the text body of the email described by the regular expression:

( \d+ ( \.\d+ )? \s* ){3}

One would expect this to occur as early as possible in the text, as the phone service provider may add a signature block to the mail.

These data are interpreted as the miles, gallons, and total price respectively, and are recorded as a data point for that user. These are the data used in all calculations and graphs on the site.

If the user has saved blog posting info, mileage.project should compose a short message describing the new data point and showing a small graph of the most recent activity. mileage.project should then use the blog posting info to post the announcement. Any photo attachments in the original SMS email should also be posted.

Reminders

It would be nice for mileage.project to provide helpful advice and reminders. For example, if low tire pressure reduces mileage, then the service should remind users to check their tire pressure periodically, with a message on the My Mileage page:

Have you checked your tire pressure lately? [Yes]

mileage.project might provide an even stronger reason to do so by asking to record the pressure. That is, if a user has reached a certain number of miles since last reading after reporting eir mileage, mileage.project might respond to the report with another SMS:

check tire pressure

to which the user should respond with two pressure readings (before and after). mileage.project can then include the pressure data in the graph, albeit at a lower data resolution than the mileage data.

Other reminders might be to buy gas when half empty to increase mileage data resolution, reaching and maintaining mileage goals, and reaching a total mile count ("Time for your 40,000 mile service!").

While mileage.project might send a "need gas?" message when your history shows you're ready to fill up again, users should be able to opt out (at least) of receiving any SMSes from the service except in immediate response to an SMS sent to the service.

mileage.project might also provide a reminder feed, which affects what reminders are possible and appropriate.

Comments

comment

I like the idea! I think I’ll build this.

comment

I imagined a similar thing at my site http://bigasterisk.com/gasuse. I also tried http://www.oaklandgasprices.com/ which does some tracking and mpg calculations.