Inspiration
There are 80 bus lines serving Baltimore's public transportation needs, along with other services that include the Light Rail, Metro Subway, and MARC Train. With nearly half the population of Baltimore residents lacking access to a car, the MTA is an important part of the regional transit picture.
There are currently several ways to access bus schedule information but all require using a specific app or visiting a website. For the hackathon I attempted to integrate that information into a more casual, friendly and direct experience with the Amazon Alexa.
MTA publishes schedule and real time information data online for use by developers in the in General Transit Specification Feed static and real time (GTFS and GTFS-RT) data formats. GTFS-RT is realtime is a feed specification that allows public transportation agencies to provide application developers with real-time updates about their fleet.
What it does
Amazon Alexa skill using open transit data (GTFS, GTFS-RT) to provide MTA (bus, light rail, Metro, and MARC) transit updates,service updates, and vehicle information. For example, a user could say "Alexa, ask Maryland Transit when the next 8 will be at Greenmount & North." Alexa would then say "The next 8 will arrive at Greenmount & North in 20 minutes."
How I built it
Amazon allows users to create new capabilities for Alexa known as "skills" that can be downloaded/utilized by other users. I set up the skill interaction model in the developer portal (eg. the infrastructure for Alexa to know what to listen for and what user inputs to store) created the skill logic using AWS Lambda with the Alexa Skills Kit SDK for Node.js (eg. programmed the algorithms that run inthe cloud to access the Maryland GTFS-RT data), added the Lambda function to the skill (connected the algorithms to the Echo's actions using event handlers).
Challenges I ran into
creating node.js deployment package for AWS lambda
What's next for Maryland Transit Alexa Skill
The new Baltimore Link will be launching on June 18, 2017. So my goal is to continue to learn how to synthesize the current static and dynamic GTFS formats with the Amazon Alexa in anticipation of the new data sets.
Built With
- amazon-alexa
- aws-lambda
- gtfs
- gtfs-rt
- javascript
- node.js
Log in or sign up for Devpost to join the conversation.