Automatic Dashboard

JeffN was kind enough to point out the new Automatic Dashboard. Automatic is a gizmo that plugs into your car service data port and relays data to an iPhone app. It records fuel usage, speed, GPS track, etc. Neat data, but the presentation has been really limited so far to a mobile-only experience. Well now they have a webapp and it looks great.

The map view is most interesting to me. All built using MapBox.js. The data for it is stored in URLs like https://api.automatic.com/v1/trips?page=1&per_page=100&start=1407222000000&end=1409756534672. Requires authentication, my eyebrows slightly raised that my user ID isn’t in the URL: implicit by authentication.

trips returns an array; one example element below. I’ve zeroed some of the IDs. The path data is most interesting to me. It looks to be pre-encoded as a polyline, which the javascript renders in SVG. It doesn’t load more detailed data when you zoom in, I think this is it. A bit of a hassle to reverse engineer this to normal lat/lon data, but it’s probably all some standard MapBox data format so should be possible. Update: apparently it’s the Google Maps polyline format.

The graphs are nice. They’re SVG and I see nvd3 is loaded in the page, so I assume that’s what they’re using.

{
  "vehicle": {
    "uri": "https://api.automatic.com/v1/vehicles/C_0000000000000000",
    "color": "",
    "id": "C_0000000000000000",
    "display_name": "Audi A6 Quattro",
    "year": 2005,
    "model": "A6 Quattro",
    "make": "Audi"
  },
  "score": {
    "score2": 50,
    "score1": 50
  },
  "drive_events": [],
  "average_mpg": 20.803669567728743,
  "uri": "https://api.automatic.com/v1/trips/T_0000000000000000",
  "end_time_zone": "America/Los_Angeles",
  "duration_over_75_s": 0,
  "duration_over_80_s": 0,
  "path": "karlFrrzaVCf@Er@c@Gc@IcAQmAU}Bk@cDw@{D{@qA]oAe@iAo@}@_@]EK~Bg@pHMbBa@Kg@Wi@c@aB{Ae@a@iBsAcBiAgCsByBeBcAo@sHqEWM{Ac@kBg@cCw@_GeD_BeAw@u@mCeDoCeDq@k@e@YiAe@cCm@kA]y@k@KOkCzDu@|Aq@nBShAM~@IfAEpA?hCNxBVpBVjArAbEvCdJbAhDb@|Bj@zDP`CZlGh@~O\\hFTlBb@~CZ|A~@zDfChKb@nBh@xCZhCVjCNfCh@fZh@nSNlFBzCAtCGrDo@nLQjEIxEC~CBjBFbDHT@bD?pIGP?PC|BBlBDhAXElBc@a@iDQ]K_AAg@Fg@N[xCm@JB|ChE^zAa@J",
  "end_location": {
    "lon": -121.0936601,
    "lat": 38.9406032,
    "display_name": "Bell Rd, Auburn, CA",
    "name": "2705 Bell Road, Auburn, CA 95603, USA",
    "accuracy_m": 10
  },
  "distance_m": 6805.27783203125,
  "end_time": 1409172044053,
  "start_time": 1409171491960,
  "id": "T_0000000000000000",
  "duration_over_70_s": 0,
  "fuel_cost_usd": 0.753902077674866,
  "fuel_volume_gal": 0.203262895345688,
  "hard_brakes": 0,
  "hard_accels": 0,
  "user": {
    "id": "00000000000000000000"
  },
  "start_location": {
    "lat": 38.9280456,
    "lon": -121.0552683,
    "display_name": "Lincoln Way, Auburn, CA",
    "name": "13500 Lincoln Way, Auburn, CA 95603, USA",
    "accuracy_m": 50
  },
  "start_time_zone": "America/Los_Angeles"
}

 

Screen Shot 2014-09-03 at 8.16.43 AM