Code Monkey home page Code Monkey logo

martaio's Introduction

martaio

Gitter

Marta.io is currently a dashboard for Marta's realtime train API, and shows train arrival estimates:

screenshot

Implementation

It's a simple Nodejs app that uses AngularJS on the client-side. It has no database or other server-side storage. The server-side simply serves as a cache of a single API endpoint from Marta. The client-side code consumes that proxied data and does the rest of the work. We scaffolded this app using Yeoman's Angular Fullstack Generator.

As of March 2015, there now exists a dev-only task that parses MARTA's GTFS files (CSV format), and creates JSON files for schedule-related data. See here or here for more information.

FAQ

Can you add a map so I can see the train?

I can, but all the ideas I have for this suck. I'll need a designer to figure out a couple things for me (hopefully with comps, but I'll take what I can get). We don't have GPS data for trains. For a given train, we can only say, "this train is between these two stations" or "this train is at this station." All the ideas I have for showing those two states on a map have been messy and kind of useless.

Forking your own

  1. You need an API key from Marta to run this app. You can request one from Marta.
  2. Set the MARTA_TRAIN_API_KEY environment variable to the key you received from Marta.
  3. Run the App.
  • While developing, you use grunt serve to start things up.
  • When deploying to a hosting service, you use grunt build to generate a deployable version in the /dist directory, and then deploy the contents of that directory.

For example, after setting up a heroku app to deploy to heroku, I run:

  • grunt build
  • cd dist
  • git commit [...]
  • git remote add heroku [email protected]:your-heroku-app.git (if I haven't already run this)
  • git push heroku master to deploy to Heroku.
Optional Newrelic Integration

I installed newrelic on this app today, to see how well it works for Node apps. If you're running your own and want to start reporting to newrelic, set the NEWRELIC_LICENSE_KEY environment variable to your newrelic key.

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.