Blog

A Week In The Life of The New York City MTA

 
Each week the buses and trains of the New York City Metropolitan Transportation Authority (MTA) make over 150,000 trips. We thought it would be fun to visualize all these trips in an “animated map application”.

The MTA animated map application shows the scheduled location of every bus and subway train at any time during the week over a map. You can zoom out to look at the entire MTA service area from Staten Island to the Bronx and Manhattan to Queens. When zoomed out you will see thousands of moving vehicles depending on the time of day. You can also zoom in on any part of the city to see the movement on a few bus or subway lines in detail. With the time slider control at the bottom of the screen you may choose any moment in the week to see the location of all buses and trains at that point in time. Select the play button (“>”) to see the movement of all vehicles in an animation. With the time interval control you can set the speed of the animation. Most browsers will update the screen in 1-2 seconds so if you set the speed to 120 seconds you will see the movement of two minutes every 1-2 seconds. A 30-minute trip will now play as an animation in 15-30 seconds on your screen.

You can filter by a single bus or subway line to view only the movement of the vehicles on that line. In the “Label Field” in the side panel you can choose to display a label for each moving object. You can display the next stop name, stop number, line number or head sign. When you are zoomed in you can click on a vehicle to view detailed trip information. When you first open the animation application the trains and buses are colored by their ‘route-type’. Subway trains are displayed in orange and buses are shown in red. Click on the paintbrush to the left of the ‘route-id’ in the side panel to color all vehicles by their route number. By default the MTA animation application shows both directions of every route. Use the ‘direction-id’ filter in the side panel to show only one direction (‘0’) or the other (‘1’).

The MTA animated map application is not meant as a tool to find your way around New York. Google Maps and many other applications solve that problem very elegantly. The animation application is a great visual tool to look at vehicle movements and service patterns.

The animated map application was created in the following way. The MTA publishes its schedule as a GTFS file. Moonshadow used the MTA schedule to calculate the scheduled location of every bus and train every 10 seconds for a full week. We used the schedule for October 2 through October 9, 2016. We stored the position of every vehicle in every trip in DB4IoT. The MTA animation application shows the location where every bus or train is supposed to be according to the schedule. It does not show the actual location where each bus or train was at any moment in time. For TriMet in Portland, Oregon we have created an animation application that shows the actual location of every TriMet bus and light rail since August 16, 2016. You can find this application at the following URL:

viewer.beta.db4iot.net/mta

DB4IoT is a database engine that was specifically developed by Moonshadow to store the movement of objects over time and it is very efficient in storing ‘time-series’ geospatial data. The retrieval speeds in DB4IoT are so fast that we can generate animations of hundreds of thousands of moving objects. The MTA animated map application is running on a single server in the cloud. It uses two different animation modes; smooth animations and image animations. Smooth animations are generated in the browser on your computer and image animations are generated on the DB4IoT server in the cloud.

The number of objects that can be animated on your screen depends on your computer hardware and the web browser you are using. For Chrome, Firefox and Safari on most computers the limit is about 1,500 moving objects. For mobile devices the limit for smooth animations is much lower. Once the number of objects exceeds this limit DB4IoT will automatically switch to image animations. In image animations each image in the animation is created on the DB4IoT server and sent to the browser. The MTA animated map application will automatically switch between these two animation types as you go over or under the threshold. You can click on the moving objects to retrieve data only when smooth animations are shown.

Any GTFS schedule anywhere in the world can be visualized in DB4IoT as an animated map application. Please let us know if you are interested in having your GTFS schedule published as an animated map application. You can also contact Moonshadow if you have the need to track any type of moving assets over time.

 

By |October 20th, 2016|The Internet of Moving Things|

A Day In The Life Of TriMet

TriMet provides bus, light rail and commuter rail transit services in the Portland, Oregon, metro area. This video shows the movement of every Portland Trimet bus, rail and tram for a 24-hour period starting at 3:30 a.m. on Wednesday, September 7, 2016 through 3:30 a.m. on Thursday, September 8, 2016. At 4:00 a.m. there are a few bus routes running. You can see how the number of buses starts to grow quickly around 6:00 a.m. and is reduced at 10:00 a.m. There is an increase again during the afternoon peak. In the evening the number of buses running is slowly decreased until around 3:00 a.m. when only one bus is remaining.

Here’s how the video was created. This video is not using the Trimet bus and lightrail schedule but it is using actual location data from September 7, 2016. All TriMet buses are equipped with GPS sensors that record the bus location and many other measurements. All of this data is sent from each bus to TriMet’s servers on the Internet once every 10 seconds. TriMet makes this available as a live data stream to the public. Moonshadow has developed a database engine, DB4IoT, specifically for working with large numbers of moving objects that report their locations and sensor measurements at a high frequency. Moonshadow downloads the TriMet data every ten seconds and stores it. DB4IoT can generate map, location and sensor data at very high speeds. Because the database technology is so fast it can generate maps with objects that are moving. In DB4IoT you can go back to any point in time and start playing the bus and tram movement as an animation. This animation was created by playing back the location of every bus in DB4IoT for the 24-hour period starting at 3:30 a.m. on Wednesday, September 7, 2016. The video was sped up slightly to fit into three minutes.

The buses not only report their location but they also have sensors to report on many other aspects of the bus. One of the measurements that each bus tracks is the number of people in the bus. This is shown as the ‘loadPercentage’. The graph shows the average loadPercentage in all buses over the 24-hour period. The graph also shows the average delay of all buses. The moving dotted line displays the exact point in time that is shown on the map.

Moonshadow is making DB4IoT with the TriMet data available for free to the public. This means that anyone has access to the tools to create their own TriMet bus or lightrail animation. You can zoom in on any part of town and select any combination of bus routes to create animations interactively at the following site:

viewer.beta.db4iot.net/trimet

DB4IoT can keep track of the location and sensor data of tens of thousands of objects simultaneously. You can include hundreds of different sensor measurements with each object. DB4IoT can accept data streams from GPS sensors as well as from mobile apps. Moonshadow can provide the mobile apps on iPhone or Android devices for your organization or use your own location services enabled mobile app.

 

By |September 14th, 2016|The Internet of Moving Things|

Animating the Internet of Moving Things

TriMet 900x460 10 seconds Endless loops 1.9MB

The “Internet of Moving Things” is taking off. More vehicles are being equipped with connected sensors that collect data and stream it via the Internet. More people use mobile apps that track their location, collect additional data and transmit it via cellular and wifi connections. The result is an enormous wave of time-series data that is geospatial as well. If this data is properly captured and stored very interesting and useful things can be done with it. It is now possible, for instance, to record the location of vehicles as well as their speed, engine temperature, vibration and many other measurements once per second, store this data and play this history back in an animation in a web browser anywhere in the world. Moonshadow has used its DB4IoT technology to create a free interactive site that animates TriMet bus data on maps over time.

TriMet provides bus, light rail and commuter rail transit services in the Portland, Oregon, metro area.

The transit agency has equipped 790 buses with Internet connected sensors that record and upload a wealth of data. From this data TriMet has created a stream that updates the location of their buses and trams once every 10 seconds. This data feed contains around 20 variables including how full the bus is, any delay it may have, if it is in traffic congestion and many other aspects. To browse the bus data through time and space, visit the following free site:

viewer.beta.db4iot.net/trimet

Moonshadow started recording this data on August 16, 2016 at 12:06 and you can choose any starting time after that to view the location of every bus and tram at that moment. Press the play button to start playing an animation from that point forward. The data can be filtered by any combination of the variables that TriMet provided. The demo can generate graphs from the data (in addition to the maps) on several variables at the same time. The graphs show the timestamp so you can see what the situation was on a certain bus route at a certain moment in time on the map as well as in the graphs. The demo uses maps from OpenStreetMaps as the backdrop and you can zoom in anywhere to see the bus movement in detail in an area.

There are, of course, limitations as a result of your Internet connection speed, the hardware on which it is played back and on the data. Moonshadow found that most web browsers can’t handle animation of more than 300 objects simultaneously. So once the number of moving buses exceeds 300 the site switches to showing dots. These still move but it is not as visually compelling. There are also anomalies within the data. Not every bus is reporting its location in every update. If DB4IoT does not receive a new location on a bus it has no choice but to display it at its current location until new data is received. When a new location comes in later the bus is accelerated quickly to be moved to its latest location. This may include an animation that suggests jumping over the river and going through some buildings. TriMet does not report the location of buses after a service route has been finished, so we do not get to see all buses return to the garage at night. Moonshadow decided to fade out buses that have not transmitted new location information for 10 minutes. Conversely buses that are taken into service appear at the beginning of their route once they start reporting their location. These are not caused by limitations in the DB4IoT technology but rather results of the unreported data. When you switch to ‘live’ mode you will see the most recently reported location of every bus. TriMet updates this information once every 10 seconds so the animations will no longer be smooth. In addition not every bus is updated every 10 seconds and the data is not necessarily arriving at the servers in order. It is also possible that the equipment of all buses is not completely synchronized to the second. When in ‘live’ mode you will see a portion of the buses move once every few seconds.

The TriMet demo site gives a nice overview of what can be done now with large volumes of time-series geospatial data and it gives a little peek into the future of things to come.

 

By |September 12th, 2016|The Internet of Moving Things|