queryType: getIdleMetrics*

The getIdleMetrics queryType is passed to the API to get the idle duration (limited to idling at the start or end of trips) for zones of interest.

Parameters

Parameter Description Type Defined Value Set Value Req'd
queryType Must equal getIdleMetrics. STRING getIdleMetrics Y
aggregateAllZones

Whether to aggregate the results over all zones (true) or report the results for each zone provided (false). The default is false.

Note:

If resultsBySegment is set to true, the value of aggregateAllZones is also defaulted to true, and results are returned per segment that intersects input zones.

BOOLEAN true or false N
aggregationUnits

Array of requested time series aggregation units to be included in time series breakdowns. This attribute determines which time series breakdowns are generated if generateTimeSeries is set to true. Supported values (not case-sensitive) are:

  • hour - for a breakdown by hour from 0 to 23.

  • daytype - for a breakdown by day-of-week, where “Weekend” = [1,7] or Saturday through Sunday, and “Weekday” = [2,3,4,5,6] or Monday through Friday.

  • daytypehour - for a breakdown by day type (“Weekend”, “Weekday”) and hour from 0 to 23.

The default is [“hour”, “daytype”, “daytypehour”].

Note: An empty array will return all available time series.
ARRAY

“hour”,

“daytype”,

“daytypehour”

N
dateRange

An object defining the analysis date range. Each object contains:

  • DateFrom (string) - first date in the analysis date range formatted as "yyyy-mm-dd".

  • DateTo (string) - last date in the analysis date range formatted as "yyyy-mm-dd".

OBJECT - Y
daysOfWeekArray of integers representing each week day. Can send an empty array to return all days.ARRAY[1,7] (1 = Sunday, 2 = Monday, etc.)N
excludeServiceRoads True to exclude service roads, false to include them. Defaults to true. BOOLEAN - N
fuelTypesAn array of strings representing the fuel types you want analyzed. Possible values are "Diesel", "Electric", "Flexible", "Gasoline", "Hybrid", "Other" and "Unknown". Refer to the Fuel types table for a description of each option. Can send an empty array to return all fuel types.ARRAYSee Fuel types for a list of fuel types-
generateTimeSeries An indicator of whether to generate a time series breakdown (true) or not (false) as a child analysis. Time series will be generated for each time aggregation in aggregationUnits.

The time series breakdown results can be retrieved using the getSavedResults API. See for more details.

BOOLEAN true or false Y
isMetricTrue for data to be returned in metric units, false for imperial.BOOLEANtrue or falseY
NAICS An array of integers representing industry IDs. Can pass an empty array to return data for all industries. To get a list of available industries, use queryType: getIndustries. ARRAY - N
resultsBySegment Whether to return results by segments that fall within input zones (true) or not (false). BOOLEAN True or false N
roadTypes Array of strings representing the different road types for which you want data. Empty array means all road types. ARRAY See the Road Types table at OSM road types N
timeRange

An object representing the analysis time range. Each object contains:

  • TimeFrom (string) - start of the time range formatted as "hh:mm:ss.ms" string.

  • TimeTo (string) - end of the time range formatted as "hh:mm:ss.ms" string.

The default is “00:00:00” to “23:59:59.999”.

OBJECT - Y
vehicleClassSchemeIdDetermines which vehicle classification scheme you will receive data for. See the Vehicle class schemas for a list of options. The default value is 2.INTEGER[1,4]N
vehicleClasses

An array of vehicle class objects where each object contains VehicleType and WeightClass. To get the list of possible vehicle types and weight classes, refer to Vehicle types and Weight class tables. If a vehicle type does not have any weight classes listed, just pass "*". More information on vehicle classes can be found at AFDC Vehicle Categories. To get all vehicle classes returned, pass an empty array.

ARRAY

See the Vehicle types and Weight class tables.

For Vehicle Type: "Truck", "Passenger", "MPV", "Bus", "Other". More information at AFDC Vehicle Categories.

To get all vehicle types, pass an empty array.

N
vehicleYears

Array of objects representing bin definitions for histogram of vehicle years of the vehicle classes selected. There should be an object for each desired bin for the IdleByVehicleYear output attribute. Each object contains:

  • LowerBound (integer) - lower bound of the bucket.

  • UpperBound (integer) - upper bound of the bucket.

Note:

A null in LowerBound will be treated as 1 and a null in UpperBound will be treated as no upper bound.

For example: [{"LowerBound": 2017, "UpperBound": 2020}, {"LowerBound":2021, "UpperBound": 2022}] will produce 3 objects in the DistanceByVehicleYear field for 2017-2020, 2021-2022 and all others.

ARRAY - N
vocations An array of integers representing vocation ids for vocations of interest. Can pass specific IDs or an empty array to return data for all vocations. ARRAY See Vocation descriptions for a list of vocation ids and their mapping information N
zones

An array of objects representing the zones for which you want information. Each object contains ZoneId, ISO_3166_2, and ZoneType:

  • ZoneId (string) – A custom zone ID, a segment ID, or a standard zone ID such as county ID, city ID, etc.

  • ISO_3166_2 (string) – The ISO code of the standard zone. Does not apply to custom zones, segments or related roads and can be set to null.

  • ZoneType (string) – the type of zone.

ARRAY ZoneType - “Custom” “Segment” “State” “County” “City” “TAZ” “ZIP” “CTR” “FSA” Y

Responses

Code Type Description
200 JSON The requested data.
401 JSON Occurs for various unauthorized tasks, such as not providing credentials in your parameters.
500 JSON Occurs if an internal server error occurs. Contact altitudesupport@geotab.com if this occurs.

Response Schema

Attribute Description Data Type Defined Value Set
IdleDuration

The total idle duration (minutes) in the zone before turning off the ignition at the end of a trip or idling at the start of a trip, summing all vehicle observations in the analysis. Refer to Stop Definition in the Data dictionary to understand more.

Note:

Mid-trip idling is not included. Currently this value only incorporates start of trip and end of trip idling.

FLOAT -
IdleByFuelType

Array of objects representing the idle duration and contributing vehicle count for each fuel type. Each object contains:

  • FuelType (string) - fuel type name.

  • TripCount (integer) - number of trips.

  • VehicleCount (integer) - number of vehicles.

  • IdleDuration (float) - the total idle duration (minutes).

ARRAY -
IdleByIndustry

Array of objects representing the idle duration and contributing vehicle count for each NAICS code 1. Each object contains:

  • NAICS_Code_1 (integer) - NAICS code 1.

  • TripCount (integer) - number of trips.

  • VehicleCount (integer) - number of vehicles.

  • IdleDuration (float) - the total idle duration (minutes).

ARRAY -
IdleByRoadType

Array of objects representing the idle duration and contributing vehicle count for each road type. Each object contains:

  • RoadType (string) - road type name.

  • TripCount (integer) - number of trips.

  • VehicleCount (integer) - number of vehicles.

  • IdleDuration (float) - the total idle duration (minutes).

ARRAY -
IdleByVehicleClass

Array of objects representing the idle duration and contributing vehicle count 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.

  • TripCount (integer) - number of trips.

  • VehicleCount (integer) - number of vehicles.

  • IdleDuration (float) - the total idle duration (minutes).

ARRAY -
IdleByVehicleYear

Array of objects representing the idle duration and contributing vehicle count for each vehicle year bucket. Each object contains:

  • VehicleYear (string) - a string representation of the vehicle year bucket.

  • LowerBound (integer) - the lower bound year.

  • UpperBound (integer) - the upper bound year.

  • TripCount (integer) - number of trips.

  • VehicleCount (integer) - number of vehicles.

  • IdleDuration (float) - the total idle duration (minutes).

ARRAY -
IdleByVocation

Array of objects representing the idle duration and contributing vehicle count for each vocation. Each object contains:

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

  • Vocation (string) - vocation name.

  • TripCount (integer) - number of trips.

  • VehicleCount (integer) - number of vehicles.

  • IdleDuration (float) - the total idle duration (minutes).

ARRAY -
ISO_3166_2 The ISO 3166:2 code of the zone. STRING -
TripCount The total number of trips in the zone. INTEGER -
TripCountTotal The total number of trips in the analysis INTEGER -
VehicleCount The total number of unique vehicles in the zone. INTEGER -
VehicleCountTotal The total number of unique vehicles in the analysis. INTEGER -
ZoneDescription

Description of the 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

STRING -
ZoneId The zone id for which the data is returned. STRING -
ZoneType The zone type of the zone. STRING “Custom”, “Segment”, “State”, “County”, “City”, “TAZ”, “ZIP”, “CTR”, or “FSA”

Time Series Response Schema

This breakdown result is only created if generateTimeSeries value is set to true. The time series breakdown results can be retrieved using the getSavedResults API. See How to Retrieve Time Series Results for more details.

Attribute Description Data Type Defined Value Set
AggregationUnit The time based unit by which to aggregate data. STRING
  • "Hour"

  • "DayOfWeek"

  • "Month"

AggregationValue

The associated AggregationUnit value. The value set is based on the AggregationUnit value. Value format based on AggregationUnit:

  • hour - number of the hour based on 24 hour, e.g. 1 or 16

  • dayofweek - numeric value for day of week where Sunday is 1 and Saturday is 7

  • month - number of the month, e.g. 1 or 12

STRING -
IdleDuration

The total idle duration (minutes) in the zone before turning off the ignition at the end of a trip or idling at the start of a trip, summing all vehicle observations in the analysis. Refer to Stop Definition to understand more.

Note:

Mid-trip idling is NOT included. At present, this value only incorporates start of trip and end of trip idling.

FLOAT -
IdleByFuelType

Array of objects representing the idle duration and contributing vehicle count for each fuel type. Each object contains:

  • FuelType (string) - fuel type name.

  • TripCount (integer) - number of trips.

  • VehicleCount (integer) - number of vehicles.

  • IdleDuration (float) - the total idle duration (minutes).

ARRAY -
IdleByVehicleClass

Array of objects representing the idle duration and contributing vehicle count 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.

  • TripCount (integer) - number of trips.

  • VehicleCount (integer) - number of vehicles.

  • IdleDuration (float) - the total idle duration (minutes).

ARRAY -
IdleByVocation

Array of objects representing the idle duration and contributing vehicle count for each vocation. Each object contains:

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

  • Vocation (string) - vocation name.

  • TripCount (integer) - number of trips.

  • VehicleCount (integer) - number of vehicles.

  • IdleDuration (float) - the total idle duration (minutes).

ARRAY -
TripCount The total number of trips for the aggregation unit and aggregation value. INTEGER -
ISO_3166_2 The ISO 3166:2 code of the zone. STRING -
VehicleCount The total number of unique vehicles for the aggregation unit and aggregation value. INTEGER -
ZoneDescription

Description of the 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

STRING -
ZoneId The zone id for which the data is returned. STRING -
ZoneType The zone type of the zone. STRING "Custom", "Segment", "State", "County", "City", "TAZ", "ZIP", "CTR", or "FSA"

Sample parameters

Sample parameters that should go inside your functionParameters object

{
"aggregationUnits": [],
"dateRange":{"DateFrom":"2023-10-01", "DateTo":"2023-10-07"}, 
"generateTimeSeries": false,
"isMetric":false,
"queryType":"getIdleMetrics",
"timeRange":{"TimeFrom":"00:00:00", "TimeTo":"23:59:59.999"},
"zones":[{
    "ZoneId":"32003", 
    "ISO_3166_2":"US-NV", 
    "ZoneType":"County"
	}]
}