queryType: getRouteAnalysis*

The getRouteAnalysis queryType is passed to the API to generate popular route(s) for origin-destination pair(s) that were generated by the getOriginDestinationMatrix API.

Note:

See Special Case APIs for more information. This API is subject to tighter rate limit restrictions.

Note that the sample response below contains just one record/one popular route, but your response will contain all the routes observed between the origin / destination pair that meet privacy requirements. All returned metrics shown in the sample response below will be provided for each route returned.

Parameters

These parameters should be passed to the functionParameters object regardless of which method you choose to make an API request.
Note:

For this API request to work, you must run the getOriginDestinationMatrix API request first.

ParameterDescriptionTypeDefined Value SetValue Req'd
queryTypeMust equal getRouteAnalysis.STRING"getRouteAnalysis"Y
excludeServiceRoadsTrue to exclude service roads, false to include them. Defaults to true.BOOLEAN-N
isMetricTrue if you want the data returned to be metric, false if you want imperial.BOOLEANtrue or falseY
analysisJobIdWhen you generate an origin destination matrix from the getOriginDestinationMatrix API request, it returns a analysisJobId string in the results, which is passed here.STRING-Y
routeGroupingThresholdThe percent similarity threshold for grouping sub-routes under a main route. e.g., 0.9 means that routes that are 90% similar will be grouped together. (defaults to 0.9 if not provided).FLOAT-Y
zonePairIdsWhen you generate an origin destination matrix from the getOriginDestinationMatrix API request, it returns a ZonePairId string for each origin-destination pair. You can pass an array of ZonePairIds to see the popular routes for each pair.ARRAY-Y

Responses

CodeTypeDescription
200JSONThe requested data.
401JSONOccurs for various unauthorized tasks, such as not providing credentials in your parameters.
500JSONOccurs if an internal server error occurs. Contact altitudesupport@geotab.com if this occurs.

Response Schema

AsOfDateThe date for which OSM base map version to use. The value is provided in YYYY-MM-DD string format and reflects the first day of the applicable month.DATE-
DailyJourneyCountAvgThe average daily number of journeys for the route.FLOAT-
DestinationZoneDescription

Description of the origin zone when available. The is based on the type of zone:

  • “State” — state name

  • “County” — county name

  • “City” — city name

  • “CTR” — census tract description

  • “Segment” — road name, if available

  • “Custom” — custom zone name

For all other zones, this attribute is null.

STRING-
Destination_ISO_3166_2Unique ISO 3166-2 identifier representing the state/provincial code of the Destination.STRING-
DestinationPassThroughIndicates the passthrough value applied to the destination.STRING“true”, “false” or “only”
DestinationZoneTypeZone Type of the Destination.STRING-
DestinationZoneIdA unique identifier for the Destination zone.STRING-
DurationAtDestinationAvgThe average stop duration at the destination before the next journey (minutes).FLOAT-
DurationAtDestinationMedThe median stop duration at the destination before the next journey (minutes).FLOAT-
DurationAtDestinationStdevThe standard deviation of the stop duration at the destination before the next journey (minutes).FLOAT-
GeographyA GeoJSON string representing the geography of the route.STRING-
IdleDurationAvgThe average of the total mid-journey idle duration (minutes). The mid-journey idle duration is calculated as a sum of the mid-trip idle duration of all trips that comprise the journey.FLOAT-
IdleDurationMedThe median of the total mid-journey idle duration (minutes). The mid-journey idle duration is calculated as a sum of the mid-trip idle duration of all trips that comprise the journey.FLOAT-
IdleDurationStdevThe standard deviation of the total mid-journey idle duration (minutes). The mid-journey idle duration is calculated as a sum of the mid-trip idle duration of all trips that comprise the journey.FLOAT-
InterTripStopDurationAvgThe average of the total stop duration that occurs during the journey. The stop duration during a journey is calculated as the sum of all stop durations between trips that comprise a journey.FLOAT-
InterTripStopDurationMedThe median of the total stop duration that occurs during the journey. The stop duration during a journey is calculated as the sum of all stop durations between trips that comprise a journey.FLOAT-
InterTripStopDurationStdevThe standard deviation of the total stop duration that occurs during the journey. The stop duration during a journey is calculated as the sum of all stop durations between trips that comprise a journey.FLOAT-
JourneyCountTotalTotal number of journeys for the O/D pair across all routes.INTEGER-
JourneyCountThe number of journeys observed on the route.INTEGER-
JourneyCountByIndustry

Array of objects representing journey count metrics for each NAICS code 1. Each object contains:

  • NAICS_Code_1 (integer) — NAICS code 1.

  • JourneyCount (integer) — number of journeys.

ARRAY-
JourneyCountByVehicleClass

Array of objects representing journey count metrics for each vehicle class. Each object contains:

  • SchemeId (integer) — vehicle class scheme identifier.

  • CategoryIndex (integer) — vehicle class category identifier.

  • VehicleClassIndex (integer) — vehicle class identifier.

  • VehicleClass (string) — vehicle class name.

  • JourneyCount (integer) — number of journeys.

ARRAY-
JourneyCountByVocation

Array of objects representing journey counts for each vocation. Each object contains:

  • VocationId (integer) — unique identifier for the vocation.

  • Vocation (string) — vocation name.

  • JourneyCount (integer) — number of journeys.

ARRAY-
JourneyCountPctOfTotalThe percentage of journeys that the route represents as a product of all journeys for the O/D pair.INTEGER-
JourneyDistanceAvgThe average distance traveled between an O/D pair (kilometers or miles).FLOAT-
JourneyDistanceMedThe median distance traveled between an O/D pair (kilometers or miles).FLOAT-
JourneyDistanceStdevThe standard deviation of the distance traveled between the O/D pair (kilometers or miles).FLOAT-
JourneyDurationAvgThe average journey duration (minutes) between the O/D pair (in minutes).FLOAT-
JourneyDurationMedThe median journey duration (minutes) between the O/D pair (in minutes).FLOAT-
JourneyDurationStdevThe standard deviation of the journey duration (minutes) between the O/D pair (in minutes).FLOAT-
JourneyTripCountAvg

The average number of trips per journey.

If no trip chaining is applied i.e. tripChainDuration is 0, this value will also be 1.

FLOAT-
JourneyTripCountMed

The median number of trips per journey.

If no trip chaining is applied i.e. tripChainDuration is 0, this value will also be 1.

FLOAT-
JourneyTripCountStdevThe standard deviation of the number of trips per journey.FLOAT-
OriginZoneDescription

Description of the origin zone when available. The is based on the type of zone:

  • “State” — state name

  • “County” — county name

  • “City” — city name

  • “CTR” — census tract description

  • “Segment” — road name, if available

  • “Custom” — custom zone name

For all other zones, this attribute is null.

STRING-
Origin_ISO_3166_2Unique ISO 3166-2 identifier representing the state/provincial code of the Origin.STRING-
OriginPassThroughIndicates the passthrough value applied to the origin.STRING“true”, “false” or “only”
OriginZoneTypeZone type of the Origin.STRING-
OriginZoneIdA unique identifier for the Origin zone.STRING-
RouteIdInternally generated unique reference ID for the sequence of segments traversed to form the route.STRING-
RoadNameSequenceString of all the sequential list of road names corresponding to the ordering of segments in the route. Format “<road name>, <road name>, <roadname>.…”.STRING-
RunningSpeedAvgThe average running speed (km/h or mph) for journeys. Running speed is calculated using only the time a vehicle is moving (excluding any time stopped).FLOAT-
RunningSpeedMedThe median running speed (km/h or mph) for journeys. Running speed is calculated using only the time a vehicle is moving (excluding any time stopped).FLOAT-
RunningSpeedStdevThe standard deviation of running speed (km/h or mph) for journeys. Running speed is calculated using only the time a vehicle is moving (excluding any time stopped).FLOAT-
SegmentSequenceString of the sequential segment IDs corresponding to the ordering of segments in the route. Format “<segment ID>, <segment ID>, <segment ID>…”STRING-
TravelSpeedAvgThe average travel speed (km/h or mph) for journeys. Travel speed is calculated as the total distance divided by the journey duration.FLOAT-
TravelSpeedMedThe median travel speed (km/h or mph) for journeys. Travel speed is calculated as the total distance divided by the journey duration.FLOAT-
TravelSpeedStdevThe standard deviation of travel speed (km/h or mph) for journeys. Travel speed is calculated as the total distance divided by the journey duration.FLOAT-
Variants

Array of objects representing the variations of the route that are determined to be within the routeGroupingThreshold. Each object contains:

  • VariantId (string) — unique identifier for the variant.

  • RoadNameSequence (string) — string of all the sequential list of road names corresponding to the ordering of segments in the route. Format “<road name>, <road name>, <roadname>…”

  • SegmentSequence (string) — string of the sequential segment IDs corresponding to the ordering of segments in the route. Format “<segment ID>, <segment ID>, <segment ID>…”

  • JourneyCount (integer) — number of journeys observed on the variant

  • FirstSegmentId (string) — the first segmentId in the variant

  • LastSegmentId (string) — the last segmentId in the variant

  • Geography (string) — a GeoJSON string representing the geography of the variant.

ARRAY-
ZonePairIdUnique identifier representing the O/D pair.STRING-

Sample parameters

{
"queryType": "getRouteAnalysis",
"excludeServiceRoads": true,
"isMetric": true,
"analysisJobId": "<analysisJobId from response of getOriginDestinationMatrix API call>",
"routeGroupingThreshold": 0.9,
"zonePairIds": [<ZonePairIdentification value(s) from response of getOriginDestinationMatrix API call>]
}