Inspiracija i primjerih nekih projekata

Code for Hampton Roads (Code4HR) grupa je civilnih hakera u gradu Hampton Roads koji su kreirali API i responzivnu mobilnu stranicu za javni gradski prijevoz u realnom vremenu.

Koristili su dva seta podataka koje su dobili od tvrtke Hampton Roads Transit:

  • GTFS, planirani vozni red koji koristi Google da prikaze stanice i vozni red na Google Maps (Transit layer)
  • FTP dump u csv formatu sa zadnjom poznatom pozicijom svakog vozila

Dva su dijela potrebna za osiguranje svih potrebnih informacija za krajnje korisnike:

  • REST API, sto je backend aplikaicja koja obtadjuje podatke iz oba izvora GTFS i FTP te odlucuje koji su podaci najpouzdaniji za prikazivanje kroz API sucelje
  • Finder, to je responzivna mobila aplikacija kojoj moze pristupiti bilo koji uredjaj s pristupom na internet (desktop, tablet, mobitel), iako je prvenstveno namjenjena za koristenje na mobitelu.

##hrt-bus-finder
The HRT Bus Finder is the front end / proof-of-concept to the hrt-bus-api. The live demo can be found here: http://hrtb.us.

Requirements
The front end is developed using the following:

  • BackboneJS
    also requires jQuery and UnderscoreJS
  • Twitter Bootstrap
  • and the Google Maps Api

About the API
The hrt-bus-api is a mash-up of two sources provided by Hampton Roads Transport (HRT). Their bus scheduling information, which is published to General Transit Feed Specification (GTFS) and their in-transit routing information which is provided via an alternate source. These two sets of data are pulled into the API and processed, allowing en-route bus tracking.

##hrt-bus-api
HRT Bus API publishes real time bus data from Hampton Roads Transit through an application programming interface for developers to make apps from it.

HRT Bus API consists of Python scripts and a Flask app that transform, store, and expose HRT Bus data through a RESTful API. API’s don’t make for good demos, so we’ve created an HRT Bus Finder App.

Try It

Web App: hrtb.us
REST Api: api.hrtb.us/api

Problem

HRT exposes the real time location of their buses at ftp://216.54.15.3/Anrd/hrtrtf.txt. Unfortunately, this file gives us less than five minutes of data and most of the entries don’t have a route number associated with them. Riders lookup bus information by route number, so without it, the data isn’t very useful.

Github: hrt-bus-api i hrt-bus-finder