Interpolate Blank Stop Times User's Guide

Created by Melinda Morang, Esri

Copyright 2017 Esri
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

What this tool does

The Interpolate Blank Stop Times toolset is a utility for estimating arrival_time and departure_time values that have been left blank in the stop_times.txt GTFS file. Values for arrival_time and departure_time are required for certain types of analysis, and you can use this tool to create a new stop_times.txt file with the blank values filled in with estimates.

Why do I have blank arrival_time and departure_time values?

There are two main reasons why your stop_times.txt file might have no values for arrival_time and departure_time for some stops.

The first reason is that your data was purposefully constructed this way to model time points. The transit vehicle (typically a bus) reliably arrives at and leaves the time point stop at a specific time. Other stops in between time points may vary slightly depending on traffic or other conditions, so some transit agencies do not publish exact times for stops that are not time points. When this is the case, typically all or most trips in your data will be constructed this way.

Blank arrival_time and departure_time values could also be a mistake. Values for certain stops could have been accidentally left out due to a data processing error. When this is the case, typically only a small number of stops are affected.

Why would I want to estimate arrival_time and departure_time values?

Although your dataset may have been intentionally constructed with blank arrival_time and depature_time values to model time points, you may still wish to estimate the arrival and departure times for these stops for analysis purposes. Some analysis tools, such as Add GTFS to a Network Dataset and BetterBusBuffers, require an exact time for each stop.

The stop times estimated by this toolset are not guaranteed to be correct or exact. You should consider your data and your analysis carefully in order to decide if this estimate is good enough for you.

Software requirements

Data requirements

Getting started


  1. After preparing the toolbox and your data, run the Preprocess stop_times tool. This step performs some analysis of your data and prepares a database that will be used for interpolation later.
  2. Run the Simple Interpolation Tool to create a new stop_times.txt file with the blank values filled in.

Running Preprocess stop_times

Screenshot of tool dialog



The Simple Interpolation tool

How blank stop times are interpolated

The Simple Interpolation tool uses a rudimentary interpolation method to assign arrival_time and departure_time values. It simply identifies pairs of time points that do have times listed, and it assigns evenly spaced times to all stops in between. This simple method does not consider the distance or drive time between stops.

The arrival_time and departure_time fields are given the same value, as if the transit vehicle spent no time making the stop.

For example, if the trip departs Time Point 1 at 10:00:00 and arrives at Time Point 2 at 10:05:00, and there are four stops in between, the stops will be assigned as follows:

This method is fairly simplistic, but it should provide a reasonable estimate for transit systems in dense areas with frequent stops and time points that are close together.

Screenshot of tool dialog



Troubleshooting & potential pitfalls