An open source tool for composing transit schedules data in static GTFS standard

8 views
Skip to first unread message

Nikhil VJ

unread,
Apr 24, 2018, 2:50:30 AM4/24/18
to transit-d...@googlegroups.com, open-tr...@lists.okfn.org, buska...@googlegroups.com, pttfgen, making-gtfs-work-for-...@googlegroups.com, kolkata-gtfs-p...@googlegroups.com, kochiopen...@googlegroups.com
Hi Friends,

I have recently worked on a project with WRI (World Resources Institute) and Kochi Metro in Kerala, India (KMRL) to convert their scheduling data to the global standard static GTFS format. 

The first phase of the project was about the data conversion. I wrote a python program that took in KMRL's XML data files and some configuration files, and created a static GTFS feed as output. The fact that the agency itself is fully on board and has dedicated one person on the inside for regular follow-up, has really helped get this project going.

On 17 March this year, Kochi Metro Rail Ltd became India's first transit agency to officially publish static GTFS feed of their system as open data.

See the KMRL open data portal and some news coverage: 1, 2, 3, 4.

See it visualized on a global GTFS feeds map called TRAVIC
(zoom in to kochi and press fast forward. Can adjust time of day.)

Phase 2 of the project aimed higher : we started work on a program with a graphical user interface that would automate several manual processes and help KMRL update their data as the network grows, publish updated feeds on their own without having to rely on any external entity, and very importantly for their case, integrate bus and ferry routes of Kochi in the near future to build towards a unified public transport dataset and facilitate integrated ticketing. As we progressed into this we realised the potential this can have if we generalise it so that any transit agency can use it.

Sharing with you the output of that work so far:




The program runs in the browser (actually, please use Chrome or Chromium and no mobile!) as a website with a server backend created by a Python 3 program. It manages the data in a portable internal database and publishes fresh GTFS feeds whenever wanted.

To play around with a live demo version of the program, see: https://thawing-mountain-46422.herokuapp.com/

Note: If you want to make edits, imports or exports, the password is second paragraph > second line > fifth word of this email. And I won't maintain this instance (made a throwaway one to share with big mailing lists) so go ahead and mess with it at own expense.

Note: while it's compatible to publish this program on a free heroku account, it is currently not designed for multi-user use,  esp for editing/importing where simultaneous sessions can mess things up.

Apart from editing existing GTFS feed, with this it's possible to design a transport system's static GTFS feed from scratch.

---------------------

Invitation for Collaboration

It would be great to get your feedback on this. Inputs from coders, veteran GTFS experts as well as beta testers is most welcome.

Note that this project has started with aiming at simple transit systems, so many sections are simplified to begin with and right now it is oriented for Indian city transit agencies. Especially regarding fare rules, it is targeted at the station pairs model in Example 6 on this explainer wiki.

There is more that can be done with enhancements and integrations, and there are still some limitations that need to be resolved. I'm documenting all I know in the issues section. So I'm reaching out for inviting collaborations on the coding and beta testing front. One motive behind open sourcing is that the community can achieve far more with this project than what any private individual or group can. There's also scope to integrate many other GTFS innovations happening. Please visit the github repo and engage!


Quick links:

--

Cheers,
Nikhil VJ
Pune, India
Email: nikhil.js [at] gmail.com
DataMeet Pune chapter <https://datameet-pune.github.io/>


Nikhil VJ

unread,
Apr 24, 2018, 3:12:02 AM4/24/18
to pttfgen, altforumpune
Hi Friends,

I'm giving a talk on this project, targeted for non-programmer audiences, this Thursday at Bhau COEP, 4pm. If you would like to attend, please sms or call me up on 9665831250 by Thursday noon so I can let the organisers know. My whatsapp is not working.



--
Cheers,
Nikhil VJ
+91-966-583-1250
Pune, India
Website <http://nikhilvj.co.in>
DataMeet Pune chapter <https://datameet-pune.github.io/>
Self-designed learner at Swaraj University <http://www.swarajuniversity.org>

Vijay Patil

unread,
May 25, 2018, 5:10:21 AM5/25/18
to PTTF
Hello Nikhil,

Congratulations to you and team involved. 


KMRL recognizes the criticality of transport services in a city in accessing education and economic opportunities and are in constant pursuit of improving our services for the citizens of Kochi. KMRL also acknowledges the importance of effective communication of information in making the metro more accessible. To further this goal, KMRL has made the metro information available for all. This data can be consumed by developers, entrepreneurs, academia and others to develop innovative applications on smartphones, feature phones, websites and other such platforms to assist commuters in making informed travel decisions. Making this data available can potentially trigger an ecosystem of innovation which can address requirements of different commuter groups.

Hopefully this is beginning of a change in the mindset about publishing schedule data. Is there any example of a big bus operator in India who also publishes schedule data as open data? Unless schedule data (which is basic data) and operational performance (trips, passengers, load factor etc.etc) data is published openly, there will be NO transparency and accountability.  Public transportation must adopt technologies to do more with less, to compete with other "planet destroying" modes of transportation.

Talking about open data, why RTOs are so secretive about the vehicle registration statistics and amount of money collected? Same with expressway toll collected? Shouldn't this money be used for improving/expanding public transportation ?

Thanks
Vijay
Reply all
Reply to author
Forward
0 new messages