Caltrain timetable is a hassle, and Facebook's newest Messenger Platform seems like a great solution to this. We are heavily inspired by Poncho's (the weather cat, or bot) friendly user experience.

What it does

CalBot is built on top of CaltrainDB.

CaltrainDB collates the information of the Caltrain timetable schedule and updates users on whether the Caltrain is arriving on time or delayed, real time. It also updates the real time schedule in a SQL database and is hosted as a RESTful API for the public to use.

How we built it


  • We grabbed the data provided on the [Caltrain Developer]'s website, since Open Data doesn't provide train schedules for us to use
  • Parsed the CSV into Python lists and stored it into a SQL database (and because we're lazy, SQLite was the way we did it)
  • Serve the database as JSON via Django app endpoints


  • Hook up Facebook Messenger Platform with our Django app via a webhook
  • Hook up NLP parser for conversational interface to our Django app and responses to Facebook Messenger Platform
  • Come up with the cool little conversations that you can have with CalBot. :3

Accomplishments that we're proud of

  • We designed a cute Caltrain Robot Logo!
  • Wrote a Python script that can be run as a cron job to constantly update the Caltrain GTFS information. Which means we can control how frequently we want to update the database
  • Built a working MVP for our CalBot, which returns you the timing of the next train from where you want to go

What's next for Calbot

  • Host CaltrainDB and make it publicly accessible for developers who wish to contribute in making transportation more convenient for the residents of San Mateo County, and the Bay Area
  • Polish up the interactions with CalBot and make it publicly available for everyone to use! :)
  • One of the features we're most excited about is the ability to fetch Twitter tweets of train delays, and use that to inform users of a delay

Built With

Share this project: