Fares parser?

Discussion in 'Fares Advice & Policy' started by Doctor Fegg, 22 Apr 2015.

Thread Status:
Not open for further replies.
  1. Doctor Fegg

    Doctor Fegg Member

    Messages:
    537
    Joined:
    9 Nov 2010
    What open-source parsers exist that can take the ATOC fare database and munge it into a more-or-less queryable form?

    Ideally something that can be installed on a *nix box, rather than Windows. I've seen Matthew Somerville's code at https://github.com/dracos/split-ticket but wonder if there are others.
     
  2. Llanigraham

    Llanigraham Established Member

    Messages:
    2,843
    Joined:
    23 Mar 2013
    Location:
    Powys
  3. Doctor Fegg

    Doctor Fegg Member

    Messages:
    537
    Joined:
    9 Nov 2010
    Not yn Gymraeg then?

    It's one of those questions where "if you know the answer, you understand the question", but if you insist... :)

    I am looking for some computer code, with liberal copyright restrictions, that can take the fares data published by the Association of Train Operating Companies, and adapt it into a format where you can ask it to "tell me the fares from London to Birmingham". This computer code should run on a computer based on the Unix family of operating systems, principally Linux and Mac.
     
  4. RJ

    RJ Established Member

    Messages:
    6,749
    Joined:
    25 Jun 2005
    Location:
    Rail replacement bus cab
    I don't know, but I get on well with it being imported into a SQL database. "soil" provided the means to do this a couple of years ago, for which I am ever grateful. Unfortunately, it's no longer as simple as importing new fare datasets in - I had to make some amendments in order to get it working for more recent fare rounds.
     
    Last edited: 22 Apr 2015
  5. Doctor Fegg

    Doctor Fegg Member

    Messages:
    537
    Joined:
    9 Nov 2010
    That looks great - but Windows-only, sadly. Worth knowing though, thanks!
     
  6. yorkie

    yorkie Administrator Staff Member Administrator

    Messages:
    34,930
    Joined:
    6 Jun 2005
    Location:
    Yorkshire
    I'm not sure if we'll run any more or not, but if we do, would you (or anyone else) be interested in our software development & open data fares workshops?

    By the way have you seen http://www.farehistory.info/ ?
     
  7. Doctor Fegg

    Doctor Fegg Member

    Messages:
    537
    Joined:
    9 Nov 2010
    Could be - my weekends tend to be fairly booked up but do let me know if/when another one is organised.

    Oooh, no, I hadn't. That's very neat.

    I've been experimenting with making very basic maps out of fare data (as parsed by Matthew Somerville's train split code), for example showing points for each station colour-coded by SOR price - from light grey for cheap up to black for expensive. Quite an good way to spot peculiarities and anomalies...
     
  8. kieron

    kieron Established Member

    Messages:
    1,701
    Joined:
    22 Mar 2012
    Location:
    Connah's Quay
    And, sadly, the files in the archive give no hint as to what the schema actually is.
     
  9. Doctor Fegg

    Doctor Fegg Member

    Messages:
    537
    Joined:
    9 Nov 2010
  10. headshot119

    headshot119 Established Member

    Messages:
    1,544
    Joined:
    31 Dec 2010
    Location:
    Cardiff
    A very simple (In principle, not in terms of programming), but genius idea of how to spot anomalies!
     
Thread Status:
Not open for further replies.

Share This Page