VIA Rail Open Data

As I write, I’m on board VIA Rail train 644 from Toronto to Kingston. I have, somehow, come across this useful train status page from VIA that provides real time updates on train location and scheduled and estimated arrival times and upcoming stations. As near as I can tell, VIA doesn’t link to this page from its website, which is odd given how useful it is.

If you open up the hood of this web app, you’ll find this handy resource: status information for all the trains in the Québec City to Windsor corridor as JSON. Here’s our train:

 "644": {
    "lat": 44.10003,
    "lng": -77.615228,
    "speed": 114,
    "departed": true,
    "times": [
      {
        "station": "OTTAWA",
        "estimated": "2017-06-24T21:57:31Z",
        "scheduled": "2017-06-24T21:50:00Z",
        "eta": "3h01",
        "diff": "med",
        "diffMin": 7
      },
      {
        "station": "FALLOWFIELD",
        "estimated": "2017-06-24T21:31:31Z",
        "scheduled": "2017-06-24T21:24:00Z",
        "eta": "2h35",
        "diff": "med",
        "diffMin": 7
      },
      {
        "station": "BELLEVILLE",
        "estimated": "2017-06-24T19:09:31Z",
        "scheduled": "2017-06-24T19:02:00Z",
        "eta": "13 mins",
        "diff": "med",
        "diffMin": 7
      },
      {
        "station": "KINGSTON",
        "estimated": "2017-06-24T19:47:31Z",
        "scheduled": "2017-06-24T19:40:00Z",
        "eta": "51 mins",
        "diff": "med",
        "diffMin": 7
      }
    ]
  }

Our diffMin is currently 7 minutes, meaning we’ll be 7 minutes late getting in to Kingston; the values for diff, which I assume is a rating for the degree of lateness, seem to be goo for good, med for medium, and bad for, well, bad. Right now, of the 46 trains currently in transit, there are 13 trains showing goo, 24 trains showing med, and 9 showing bad.

Comments