Travel Timetables

From OpenOrg
Revision as of 18:52, 11 January 2011 by WikiSysop (talk | contribs) (Created page with "Some notes of ideas basic on the http://www.unilinkbus.co.uk/times.shtml timetable. ** This page is just notes for now, not a meaningful recipe ** The first issue is do you sto...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Some notes of ideas basic on the http://www.unilinkbus.co.uk/times.shtml timetable.

    • This page is just notes for now, not a meaningful recipe **

The first issue is do you store the stock timetables, and link them to days?

How do you handle the date on buses which run after midnight? (guessing the service will have a line between night and morning, but may vary between companies). Does a bus starting on one date follow the entire path of that date, or does it switch to the next date at midnight or at the company date rollover line, eg 4am?

Each day of the year the unilink bus service runs one of what is, in effect, a fixed set of services:

  • Monday in University Termtime
  • Tuesday in University Termtime
  • Wednesday in University Termtime
  • Thursday in University Termtime
  • Friday in University Termtime
  • Saturday in University Termtime
  • Sunday in University Termtime
  • Monday out of University Termtime
  • Tuesday out of University Termtime
  • Wednesday out of University Termtime
  • Thursday out of University Termtime
  • Friday out of University Termtime
  • Saturday out of University Termtime
  • Sunday out of University Termtime
  • Public Holidays (basically same as sunday service) (note to self, are public holidays in term time treated like sundays in term time etc.?)
  • Special Holidays (Chistmas) which have no buses at all

A single bus service is, I think, one bus running from the start to end of a route (with a single bus route ID number, like U1C). The physical bus can then start providing another service, eg. U1H. It would be associated with a number of events which are a bus-stop ID and a time (or datetime?)

Very adaptable simple model: Just say describe every single day and make every single bus service occur once. The same bus with the same number making the same stops at the same time, but on a different day, is an entirely new bit of data. This is horrifically verbose, but would work combined with an API to request buses for day X. It would be a nightmare to work with in SPARQL etc.

More compact notation: A bus service (identified by a URI) has a number, and lost of stop events (busstop/time (not date)). A days timetable is comprised of a set of specific bus service URIs, but the same bus service can appear in more than one timetable (eg. Monday and Tuesday). Each date is associated with one or more timetables.

It would be theoretically possible to use goodrelations, but it does not have a very smart handling of special cases, and while shop or coffeebar opening hours can be treated with some common sense on Christmas Day, bus and train timetable data remains of much more importance to people. Hence the value in linking to each days' timetable.