Configure Transit On-Time Performance

Transit On-Time Performance can be used to track on-time performance metrics in real-time and analyze historical trends in transit system efficiency.

In this topic, you'll learn how to configure the Transit On-Time Performance solution to meet specific needs of your organization.

Tip:
As you configure the solution, record the configurations or alterations you make with each version in a change log. This information will be valuable if you upgrade to a new version and need to evaluate the effort required.

Understand GTFS data requirements

Before configuring the solution, your agency must have up-to-date General Transit Feed Specification (GTFS) Schedule and Realtime data. For more information about GTFS, refer to the GTFS technical documentation.

The agency's GTFS Schedule and GTFS Realtime data requires certain fields to be populated for the solution to function properly. Refer to the tables below for a list of these required fields.

GTFS Schedule stop_times.txt file requirements

The following table describes the fields required in the GTFS Schedule stop_times.txt file:

Field nameDescription

trip_id

Identifies a trip

arrival_time

Indicates the arrival time at the stop for a specific trip

stop_id

Identifies the serviced stop

stop_sequence

Indicates the order of stops for a particular trip

timepoint

Indicates whether arrival and departure times for a stop are strictly adhered to by a vehicle

Note:

For more information, refer to the GTFS Schedule documentation.

GTFS Realtime Vehicle Positions feed requirements

The following table describes the fields required in the GTFS Realtime Vehicle Positions feed:

Field nameDescription

trip_id

Identifies a trip

trip_start_date

Indicates the service date of the trip

trip_route_id

Identifies the route a particular trip adheres to

trip_direction_id

Identifies the direction of travel for a trip

latitude

Indicates Degrees North, in GCS WGS84

longitude

Indicates Degrees East, in GCS WGS84

bearing

Indicates Bearing, in degrees, clockwise from True North, that is, 0 is North and 90 is East

speed

Indicates the momentary speed measured by a vehicle, in meters per second

current_stop_sequence

Indicates the stop sequence index of the current stop

current_status

Indicates the exact status of the vehicle with respect to the current stop

vehicle_position_timestamp

Indicates the moment in time at which the vehicle's position was measured

stop_id

Identifies the serviced stop

vehicle_id

Identifies a vehicle

Note:

For more information, refer to the GTFS Realtime documentation.

Note:

The GTFS Realtime Vehicle Positions feed must be externally accessible on the internet and in protobuf (binary) or JSON format.

Configure feeds and analytics

The Transit On-Time Performance solution uses ArcGIS Velocity to poll a transit agency's GTFS Vehicle Positions realtime feed and automated vehicle location (AVL) system, as well as feature layers from ArcGIS Living Atlas of the World that contain real-time information on traffic and weather incidents. The connections to these sources are managed in ArcGIS Velocity using feeds, which control settings for layer sources, schemas, and polling intervals. Before the solution can be used for the first time, feeds must be configured and started. Learn more about feeds in ArcGIS Velocity.

In addition to feeds, the solution includes two real-time analytics in ArcGIS Velocity to create a spatiotemporal feature layer and calculate on-time performance. Learn more about real-time analytics in ArcGIS Velocity.

Tip:

When setting up feeds and analytics for the first time, complete the following workflows in the order that they are presented.

Run the Create Stop Times in Velocity real-time analytic

The Create Stop Times in Velocity real-time analytic is used to create a spatiotemporal feature layer for storing the agency's stop times information in ArcGIS Velocity. The resulting layer, Stop Times Velocity, is used in the Transit On-Time Performance real-time analytic to calculate on-time performance.

To run the Create Stop Times in Velocity real-time analytic, complete the following steps:

  1. Sign in to your ArcGIS organization and browse to the ArcGIS Velocity app.
  2. From the site menu, click Real-Time.
  3. Click the Create Stop Times in Velocity real-time analytic to launch the analytic Details page.
  4. Click Start.

    The text of the Start button changes to Stop Initialization. You will not proceed until the button displays Stop.

  5. After the analytic has finished initializing, click Stop.
Note:

The Create Stop Times in Velocity real-time analytic only needs to be run once when configuring the solution.

Configure the GTFS Vehicle Positions feed

The GTFS Vehicle Positions feed is used in the Transit On-Time Performance real-time analytic to ingest and display the real-time locations of a transit agency's vehicles.

To configure the GTFS Vehicle Positions feed, complete the following steps:

  1. Verify that you are signed in to your ArcGIS organization and browse to the ArcGIS Velocity app.
  2. From the site menu, click Feeds.
  3. Click GTFS Realtime Vehicle Positions to open its Details page.
  4. Click Edit.
  5. For URL, type the full URL for the externally accessible GTFS endpoint.
  6. Keep GTFS Type set to the default Vehicle positions.
  7. If necessary, click HTTP headers and specify the headers to use for the GTFS endpoint.
  8. Click Next.

    If necessary, click Continue to overwrite the schema.

  9. For Data Format, choose Protobuf or JSON, depending on your GTFS Realtime feed.
  10. For Confirm Schema, verify that example records are displayed; if they are not, click Resample to verify the data schema.

    If no records display, cancel the feed configuration and start over. If example records continue to fail to display, verify that the agency's GTFS Realtime feed is valid.

  11. Click Next.
  12. For Location type, choose X/Y fields.
  13. Verify that X (longitude) is set to longitude and Y (latitude) is set to latitude.
  14. For Does your data have date and time fields, choose Yes.
  15. For Start time, choose vehicle_position_timestamp.
  16. For Date format, choose Epoch seconds.
  17. For Track ID, choose vehicle_id.
  18. Click Next.
  19. Accept the defaults for Feed Polling Interval and click Next.
  20. Click Complete to finish configuring the feed.
  21. Click Start to start the feed, and view the map on the Details page to validate that records are being ingested.

Configure the World Traffic Service feed

The Transit On-Time Performance solution includes a feed that polls features from the World Traffic Service from the ArcGIS Living Atlas.

To configure the World Traffic Service feed, complete the following steps:

  1. Verify that you are signed in to your ArcGIS organization and browse to the ArcGIS Velocity app.
  2. From the site menu, click Feeds.
  3. Click World Traffic Service to open its Details page.
  4. Click Edit.

    The Configure Feature Layer dialog box appears.

  5. For Select Layer, choose the Traffic Incidents Detailed feature layer that corresponds to your region using the following table as a guide:
  6. RegionFeature layer

    North America

    Traffic Incidents Detailed (4)

    South America

    Traffic Incidents Detailed (12)

    Europe

    Traffic Incidents Detailed (20)

    Middle East and Africa

    Traffic Incidents Detailed (28)

    Asia Pacific

    Traffic Incidents Detailed (48)

    Note:

    There is no Traffic Incidents Detailed feature layer for the India and South East Asia regions. Check the service coverage web map to determine availability in your area of interest. The support for traffic incidents can be determined by identifying a country.

  7. Click Next.
  8. For Filter Data, click Configure Extent.
  9. Click the Edit button to draw an extent on the map that covers the agency's transit system.
  10. Click Next.
  11. Leave the default parameters for Confirm Schema and click Next.
  12. Leave the default parameters for Timestamp Field and click Next.
  13. Leave the default parameters for Identify Key Fields and click Next.
  14. Leave the default parameters for Feed Polling Interval and click Next.
  15. Click Complete to finish configuring the feed.
  16. Click Start to start the feed, and view the map on the Details page to validate that records are being ingested.

Configure the USA Weather Watches and Warnings feed

The Transit On-Time Performance solution includes a feed that polls features from the USA Weather Watches and Warnings service from the ArcGIS Living Atlas. This feed only applies to transit agencies in the United States. If your agency is outside the United States, skip this workflow and move to the next configuration topic.

  1. Verify that you are signed in to your ArcGIS organization and browse to the ArcGIS Velocity app.
  2. From the site menu, click Feeds.
  3. Click USA Weather Watches and Warnings to open its Details page.
  4. Click Edit.
  5. For Select Layer, verify the Events Ordered by Size and Severity layer is selected, and click Next.
  6. For Filter Data, click Configure Extent.
  7. Click the Edit button to draw an extent on the map that covers the agency's transit system.
  8. Click Next.
  9. For Confirm Schema, correct the errors for using a reserved field name for Shape__Area and Shape__Length by renaming them.
  10. Click Next.
  11. Leave the default parameters for Timestamp Field and click Next.
  12. Leave the default parameters for Identify Key Fields and click Next.
  13. Leave the default parameters for Feed Polling Interval and click Next.
  14. Click Complete to finish configuring the feed.
  15. Click Start to start the feed, and view the map on the Details page to validate that records are being ingested.

Configure the Transit AVL feed

Note:
This workflow is optional and does not need to be completed to work with the solution.

Transit agencies often use Automatic Vehicle Location (AVL) technology on their vehicles to track and report additional information, such as an operator ID or a unique identification number that corresponds to the driver of the vehicle. The Transit On-Time Performance solution can be used to track the on-time performance of individual operators when an AVL feed has been configured.

To configure an AVL feed, complete the following steps:

  1. Verify that you are signed in to your ArcGIS organization and browse to the ArcGIS Velocity app.
  2. On the Home page, click Create feed to create a new feed.

    The Select a feed type window appears, displaying several categories for the types of feeds available in Velocity.

  3. Browse the groups of feeds or search by using a keyword.

    The feed types needed to connect to your vendor AVL are grouped into the following categories:

    • Cloud
    • Web and Messaging
    • Data Providers
  4. Choose the feed type you want to create.
  5. Enter the feed configuration details.
    Note:

    Configuration parameters vary depending on the feed type that you selected.

  6. Click Next to continue with the remaining steps, including confirming the schema, identifying key fields, and defining the polling interval.
    Note:

    The AVL feed must contain fields for Trip ID and Operator ID.

  7. Name your feed and click Complete to finish configuring the feed.
  8. Click Start to start the feed, and view the map on the Details page to validate that records are being ingested.
    Note:

    For more information, see Configure input data and the Create a feed quick lesson.

Modify the Transit On-Time Performance real-time analytic

The Transit On-Time Performance real-time analytic ingests vehicle positions from the agency's GTFS Realtime feed, calculates on-time performance based on expected arrival times, and detects nearby traffic and weather incidents. The results of the analytic are stored in two spatiotemporal feature layers: one for current on-time performance and one for historical on-time performance. The current on-time performance layer shows current vehicle positions and on-time performance and is updated every 30 seconds by default. The historical on-time performance layer archives vehicle positions and on-time performance over time as long as the analytic is running.

Note:

All feature layer outputs generated by the analytic have specific data retention settings—and where applicable, archiving settings—already configured. Any modifications to data retention and archiving settings should be made before the analytic runs for the first time, and after reading the guidance in the following workflows. Read more about data retention in ArcGIS Velocity.

The Transit On-Time Performance real-time analytic is designed to ingest traffic and weather feeds from ArcGIS Living Atlas, as well as an optional transit AVL feed to report operator ID information. The analytic will need to be modified to meet the needs of your organization.

To modify the Transit On-Time Performance real-time analytic, complete the following steps:

  1. Verify that you are signed in to your ArcGIS organization and browse to the ArcGIS Velocity app.
  2. From the site menu, click Real-Time.
  3. Click the Edit button Edit for the Transit On-Time Performance real-time analytic.
  4. Double-click the Calculate field - tripseq, tzoffset node to open the tool's properties.
  5. In the properties panel, click the tzoffset Arcade expression.
  6. Click Configure an Arcade expression.
  7. On line 2 of the Arcade expression, modify the timezoneOffset value with the UTC offset for your time zone (for example, -7 for Mountain Standard Time).
  8. If your agency is in an area that does not observe daylight saving time, on line 5 of the Arcade expression, set the observeDST value to "no".
  9. Click OK.
  10. Click Update field calculation.
  11. Click Apply.
  12. Click Save to commit the changes.
  13. Double-click the Stop Times Velocity node to open the feature layer properties.
  14. In the properties panel, click Edit
  15. For Select Layer on the Configure Feature Layer dialog box, select the Stop Times Velocity_{solutionid} feature layer.
  16. Click Next.
  17. Leave the default parameters for Filter Data and click Next.
  18. Leave the default parameters for Confirm Schema and click Next.
  19. Leave the default parameters for Identify Key Fields and click Complete.
  20. Click Save to commit the changes.
  21. Right-click the Transit AVL Feed Placeholder node.

    The Transit AVL Feed Placeholder node is used to optionally replace and connect with your AVL provider to report operator ID information.

  22. Click Remove node and complete one of the following options:
    • If you have configured a Transit AVL feed, complete the following steps:
      1. Click Add Node, click Feeds, and click Select existing feed.
      2. Choose your AVL from the list and click Confirm.
      3. Connect your feed as the Target in the Join Transit AVL tool.
      4. Double-click the Join Transit AVL node to open its properties.
      5. For Join field, choose the trip ID field in your Transit AVL feed.
      6. Under Summary fields, choose operator_id.
      7. For Attribute, choose the operator ID field in your transit AVL feed.
      8. Click Update summary field, and click Apply.
    • If you have not configured a Transit AVL feed, complete the following steps:
      1. Right-click the Join Transit AVL node, and click Remove node.
      2. Connect the Join Weather node as the target in the Map Fields node.
      3. Double-click the Map Fields node.
      4. Delete the operator_id field from the fields list, and click Apply.
  23. Click Save to commit the changes.
  24. Double-click the Filter Current Stop Sequence node to open the tool's properties.

    The Filter Current Stop Sequence node in the Transit On-Time Performance real-time analytic is configured by default to filter out transit vehicles that are reporting their current_stop_sequence as equal to 0. This prevents on-time performance metrics from being skewed, as a current_stop_sequence equal to 0 cannot be compared to a stop sequence in the agency's stop_times.txt file. An agency may want to filter out other conditions that might impact the accuracy of on-time performance metrics.

  25. In the Filter Current Stop Sequence tool's properties, click Configure an Arcade expression to modify the expression.
  26. Optionally, modify the Arcade expression to filter out other conditions that might impact on-time performance metrics.
    Note:

    For more information, see the Filter by Expression and Use Arcade expressions help topics.

  27. Click OK.
  28. Click Apply.
  29. Double-click the Calculate Field - OTP node to open the tool's properties.
  30. In the properties panel, click the otptext Arcade expression.
  31. Click Configure an Arcade expression.
  32. Modify the expression to reflect the transit agency's benchmarks for early, on-time, and late, using the example statements in the following table as a guide:

    Early is more than 2 minutes before expected arrival time.

    OTP >=2, 'Early'

    On-Time is within 2 minutes before and 10 minutes after expected arrival time.

    OTP >=-10 && OTP <=2, 'On-Time'

    Late is more than 10 minutes after expected arrival time.

    OTP >=-30 && OTP <=-11, 'Late'
  33. Click OK.
  34. Click Update field calculation.
  35. Click Apply.
  36. The Calculate Field - Bunching node is used to identify vehicles that have bunched together along a common route. While this is a common issue for bus transit systems, it is less relevant for other transit modes, such as trains or ferries. Depending on the mode of transit, an organization may want to remove this node from the analytic.
  37. If vehicle bunching is not relevant to your organization's needs, right-click the Calculate Field - Bunching node, and click Remove node. Repeat this for the Calculate Distance and Calculate Field - Route Direction nodes as well.

    The Calculate Distance and Calculate Field - Route Direction nodes are used to determine route direction and distance between vehicles to identify bunched vehicles.

  38. If you removed the nodes that are used to identify bunched vehicles, connect the Calculate Field - OTP node to the Current Transit OTP and Historical Transit OTP outputs.
  39. Click Save to commit the changes to the analytic.

Load stop times

The Transit On-Time Performance Center includes a web tool for loading and updating the stop times that define the scheduled arrival times for each stop on a trip. The Manage Stop Times web tool is used to load initial stop times when first configuring the solution, as well as update stop times when new service schedules are published. Before uploading stop times, the agency's GTFS schedule stop_times.txt file must be converted to a .csv file. The .csv file is then used to update a placeholder stop_times.csv deployed with the solution. The Manage Stop Times web tool updates the Stop Times Velocity spatiotemporal feature layer with the stop times in the .csv file. The web tool also stops and restarts the Transit On-Time Performance real-time analytic to reflect the changes.

To load stop times, complete the following steps:

  1. In a browser, verify that you are signed in to your ArcGIS organization and browse to the Transit On-Time Performance Center.
  2. From the item page, click View.

    The dashboards in the Transit On-Time Performance Center show data errors. This is expected, since the Transit On-Time Performance real-time analytic has not been started yet. The analytic will start automatically after running the Manage Stop Times web tool.

  3. In the menu, click Manage Stop Times.
  4. Follow the instructions outlined on the Manage Stop Times page to load stop times.

Modify dashboards

The Transit On-Time Performance solution includes two dashboards for measuring current and historical on-time performance.

The dashboards include feature layers for transit stops and transit route lines submitted through Esri's Community Maps Program, U.S. Department Of Transportation (USDOT), and publicly available datasets from agencies, municipalities, and countries around the world. Transit agencies can submit their data as GTFS text files to the Community Maps Program, which is then processed and published by Esri as ready-to-use maps and layers. Learn more about the requirements for contributing transit data to the Community Maps Program.

The following workflows will help you modify the dashboards to meet the needs of your organization.

Modify the Current On-Time Performance Dashboard

The Current On-Time Performance Dashboard includes Esri-provided feature layers for transit stops and route lines, as well as the ArcGIS Living Atlas USA Weather Watches and Warnings feature layer. By default, the dashboard also displays additional information provided by your agency's GTFS Realtime feed that is not directly related to on-time performance. The dashboard also includes a filter to show vehicles by operator. If this information is not relevant to your organization's needs, you can modify or remove the layers and elements from the dashboard.

To modify the Current On-Time Performance Dashboard, complete the following steps:

  1. In a browser, verify that you are signed in to your ArcGIS organization and browse to the Current On-Time Performance Dashboard web map.
  2. From the item page, click Open in Map Viewer.

    The Layers pane on the left shows all layers in the map.

  3. If your agency is outside the United States or you do not want to use the USA Weather Watches and Warnings layer in your map, click the Options button next to the layer, and click Remove.
  4. If you removed the nodes in the Transit On-Time Performance real-time analytic used to identify bunched vehicles, click the Options button next to the Bunching layer, and click Remove.
  5. Select the Vehicle Positions layer.
  6. In the right panel, click Pop-ups.
  7. In the Pop-ups pane, click the Additional GTFS-RT Details Arcade pop-up element.
  8. Click Edit expression.

    The Arcade expression is used to display additional details sourced from the agency's GTFS Realtime feed that is not directly related to on-time performance.

  9. If you do not want to display additional GTFS-RT details, set the showFields value on line 4 to false.
  10. Click Done.
  11. Repeat steps 5 through 10 for the Follow Vehicle layer if you do not want to show additional GTFS-RT details.
  12. If your agency has contributed transit data to the Community Maps Program, you may want to filter the layers in the maps to show just your agency's transit stops and route lines. Conversely, if your agency has not contributed transit data to the Community Maps Program, your transit stops and routes may not be shown on the maps included in the solution's dashboards. In this case, you can remove the feature layers from the maps.
  13. If you have contributed your GTFS data to the Community Maps Program, verify that your agency's transit stops and route lines appear on the map. If you have not, complete the following:
    1. Click the Options button for the World Transit Stops layer.
    2. Click Remove.
    3. Repeat for the World Transit Lines by Agency Color layer and continue to step 18.
  14. To filter the World Transit Stops layer, click it in the layer list.
  15. In the right pane, click Filter.
  16. Click Add new.
  17. In the filter configuration, set Condition to Agency Name (Esri) is <your agency>.
  18. In the Filter pane, click Save.
  19. Repeat steps 5 through 9 to set a filter on the World Transit Lines by Agency Color layer.
  20. On the left, click Save and open, and click Save to save your map.
  21. Next, you will modify the Current On-Time Performance Dashboard app.
  22. Verify that you are signed in to your ArcGIS organization and browse to the Current On-Time Performance Dashboard app.
  23. From the item page, click Edit Dashboard.
  24. If you have not configured a Transit AVL feed to report on Operator ID, hover over the Operator selector in the header and click the Delete button .
  25. If you removed the nodes in the Transit On-Time Performance real-time analytic used to identify bunched vehicles, hover over the Bunching selector in the header and click the Delete button . Repeat this for the Bunched Vehicles indicator element.
  26. If you removed any of the nodes for traffic, weather, or bunching in the Transit On-Time Performance real-time analytic, the Arcade script in the Active Vehicles list will be unable to execute. Complete the following steps to correct the errors:
  27. Hover over the Active Vehicles list and click the Configure button .
  28. Click List.
  29. Click the Pop out editor button to edit the advanced formatting of the list.
  30. If necessary, remove the variables and attributes for traffic_badge, weather_badge, distanceid, and bunching, depending on which are identified as invalid or not defined.
  31. Click Done to close the Advanced formatting editor.
  32. Click Done to close list element configuration.
  33. Click Save.

Modify the Historical On-Time Performance Dashboard

The Historical On-Time Performance Dashboard includes Esri-provided feature layers for transit stops and route lines. By default, the dashboard also displays additional information provided by your agency's GTFS Realtime feed that is not directly related to on-time performance. The dashboard also includes elements to show on-time performance metrics by operator, as well as weather impacts sourced from the USA Weather Watches and Warnings feature layer from ArcGIS Living Atlas. If this information is not relevant to your organization's needs, you can modify or remove the layers and elements from the dashboard.

To modify the Historical On-Time Performance Dashboard, complete the following steps:

  1. In a browser, verify that you are signed in to your ArcGIS organization and browse to the Historical On-Time Performance Dashboard web map.
  2. From the item page, click Open in Map Viewer.

    The Layers pane on the left shows all layers in the map.

  3. Select the Historical On-Time Performance layer.
  4. In the right pane, click Pop-ups.
  5. In the Pop-ups pane, click the Additional GTFS-RT Details Arcade pop-up element.
  6. Click Edit expression.

    The Arcade expression is used to display additional details sourced from the agency's GTFS Realtime feed that is not directly related to on-time performance.

  7. If you do not want to display additional GTFS-RT details, set the showFields value on line 4 to false.
  8. Click Done.
  9. If your agency has contributed transit data to the Community Maps Program, you may want to filter the layers in the maps to show just your agency's transit stops and route lines. Conversely, if your agency has not contributed transit data to the Community Maps Program, your transit stops and routes may not be shown on the maps included in the solution's dashboards. In this case, you can remove the feature layers from the maps.
  10. If you have contributed your GTFS data to the Community Maps Program, verify that your agency's transit stops and route lines appear on the map. If you have not, complete the following:
    1. Click the Options button for the World Transit Stops layer.
    2. Click Remove.
    3. Repeat for the World Transit Lines by Agency Color layer and continue to step 16.
  11. To filter the World Transit Stops layer, click it in the layer list.
  12. In the right pane, click Filter.
  13. Click Add new.
  14. In the filter configuration, set Condition to Agency Name (Esri) is <your agency>.
  15. In the Filter pane, click Save.
  16. Repeat steps 5 through 9 to set a filter on the World Transit Lines by Agency Color layer.
  17. On the left, click Save and open, and click Save to save your map.
  18. Next, you will modify the Historical On-Time Performance Dashboard
  19. Verify that you are signed in to your ArcGIS organization and browse to the Historical On-Time Performance Dashboard
  20. From the item page, click Edit Dashboard.
  21. If you have not configured a Transit AVL feed to report on Operator ID, click the Operators tab.
  22. Hover over the Operators element and click the Delete button .
  23. If your agency is outside the United States, or you otherwise don't want to use the USA Weather Watches and Warnings feature layer, click the Weather tab.
  24. Hover over the Weather Impacts element and click the Delete button .
  25. If you removed the nodes in the Transit On-Time Performance real-time analytic used to identify bunched vehicles, click the Bunching tab.
  26. Hover over the Bunching element and click the Delete button .
  27. If you removed the nodes in the Transit On-Time Performance real-time analytic used to identify bunched vehicles, hover over the Bunching selector in the header and click the Delete button . Repeat this for the Vehicle Bunchings by Hour of Day serial chart element.
  28. Click Save.