For our first real-time data source, we'll use the excellent NextBus API. NextBus (http://www.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 next bus.
What's even better is that, with the customer's permission, NextBus publishes tracking data through a REpresentational State Transfer (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, you'll see a web interface as shown in the following screenshot, showing data for the city of Los Angeles, California metro system:
The system lets you select several parameters to learn the...