For our first real-time data source, we'll use the excellent NextBus API. Nextbus.com is a commercial service that tracks public transportation for municipalities, including buses, trolleys, and trains. People riding these transit lines can then track the arrival time of the NextBus. What's even better is that with the customer's permission, NextBus publishes tracking data through a Representational State Transfer or REST API. Using URL API calls, developers can request information about a vehicle and receive an XML document about its location. This API is a straightforward way to begin using real-time data.
If you go to Nextbus.com (http://www.nextbus.com/#!/mu-rht/1/portlouis/margstan_o), there is a web interface to the data as well, as shown in the following screenshot, of the city of Los Angeles, California's metro system: