Giter Site home page Giter Site logo

ztm-warsaw-timetable-parser's Introduction

ztm-warsaw-timetable-parser

Parsing script for data from Warsaw's public transit authority. If you need GTFS look here at MKuran's work.

This converts from Warsaw's proprietary format to my proprietary™ format thats json based. This includes (in output/):

  • stop_groups.json - list of all stops and related data
  • routes.json - descripton of bus and tram routes
  • timetables.json - departure times for each stop on each route. Useful since you can serve this directly to users with little processing. Also includes symbols and their explanations, as well as other 'comments' normally left on a physical timetable.
  • stop_times.json - a simple dump of all stops of each trip. Analogous to GTFS's stop_times.txt.
  • calendar.json - lists what type of day each line runs on today.
  • brigades.json - connects trip_ids to brigades to use with realtime data, aswell as headings from their online API that includes headings to depots.

brigades.json is in beta right now!

This format preserves more information about the data, like above mentioned symbols and their explenations, but also descriptive stop locations (street name or 'under bridge'), general travel directions from stops (this stop has busses towards X), road names on route, detailed information about semi-permament detours, permament route changes and shortened routes. This is very specific to Warsaw transit authority and their setup. As a bonus (or a penalty?) it includes timetables for every stop on every route already pre-proccessed for you!

However, it lacks frequencies.txt, line coloring, and universal adoption of GTFS. (possibly more if you want to include station layouts that dont exist for Warsaw and their somewhat advanced fare system)

Coverage of data from source open data is at about 75ish%

Usage

To generate static files (everything except brigades.json) you will use python parser.py. Generally it should work out of the box and download everything for you. There is helpful -h flag that shows some options (like not generating some files, or using patrticular file)

For brigades.json you need to create apikey.txt that contains just your apikey from api.um.warszawa.pl. After that it should work on its own just by running first running the static portion, as this depends on it, and then python brigades.py. Again, -h is available for more options.

ztm-warsaw-timetable-parser's People

Contributors

1116574 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

qkurdej

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.