Trips Data Set Tutorial

📘

New Attribute in the generated report

The "metadata_reason_for_selection_geographic_filter" attribute is added to the generated report by default

Parameters

start_datetime & end_datetime

The start and end parameters of a trip request provides a list of all the vehicles whose trip duration took place between the starting and ending times.

For example, if the start time of a request is 2019-06-21 07:00:00 (YYYY-MM-DD HH:MM:SS) and the end time is 2019-06-21 12:00:00, the response will include all the vehicles whose trip duration was between 7am and 12pm of June 21, 2019.

If a vehicle's trip duration started before 7:00 or ended after 12:00, it will not be included in the response. Only vehicles whose start and end times are both within the specified time period will be included.

Both the start_datetime and end_datetime parameters are required for each trip request.

country_codes

The country code parameter filters a trip request to include vehicles only within a certain country. More than one country may be selected per trip.

If a vehicle's trip began in one country and ended in another, it will only appear in the response if both countries are listed as parameters. In other words, vehicles whose country is not listed in the request will not be provided, regardless if the trip started or ended within a certain country.

The country_codes parameter is optional. Here is a list of every Country Code.

cities

The cities parameter of a trip request includes all vehicles that drove within a certain city during the entire duration of the vehicle's trip. More than one city may be included in each trip request.

Trips report includes cities that were not listed within the request as well, if a vehicle's trip began, ended, or passed through such a city.

The cities parameter is optional. When using the cities parameter, the coutry_codes parameter must be used as well to ensure the right city is chosen per country.

cars_limit

The cars limit parameter filters the generated report to include only a certain number of vehicles. This amount cannot be above the number of connected cars associated with your app or Workspace.

start_at

The start_at parameter filters the generated report to include only Trips that were started within the selected geography boundaries (Country, State, City, or Polygon). The default value is 'true'

pass_through

The pass_through parameter filters the generated report to include only Trips that were started within the selected geography boundaries (Country, State, City, or Polygon). The default value is 'true'

end_at

The end_at parameter filters the generated report to include only Trips that were started within the selected geography boundaries (Country, State, City, or Polygon). The default value is 'true'

polygon

When using the polygon filter, the report includes any trip that started, ended, or passed through the mentioned polygon properties (draw or WKT file).

The multipolygon filter can be used to generate bulk data and data queries that are more granular and data specific. The purpose of this filter is to allow consumers to obtain data from a very specific and predefined location.

In order for this filter to be used properly, the country_codes parameter must be included in the payload as well.

To utilize the multipolygon filter:

  1. Open your favorite map application or browser.
  2. Search the name of the location you are interested in.
  3. Select a minimum of 3 latitudinal and longitudinal points (3 sets of X,Y coordinates) that create a polygon shape.
  4. Place the lat/long points you have chosen into one of the 2 formats: 1. WKT format 2. The specified format below. The points should be provided in such a way that if a line were to be drawn, a polygon shape would be created.
“POLYGON ((45.552447 12.180835, 45.468362 12.178028, 45.505942 12.303683, 45.466989 12.22971  ))"
"MULTIPOLYGON (((45.552447 12.180835, 45.468362 12.178028, 45.505942 12.303683,  45.466989 12.22971)), ((46.552449 11.180835, 468365 12.178028, 45.575943 14.303683, 45.466989 12.2297 )))"
[
      {
        "lon": 45.552447,
        "lat": 12.180835
      },
      {
        "lon": 45.468362,
        "lat": 12.178028
      },
      {
        "lon": 45.505942,
        "lat": 12.303683
      },
      {
        "lon": 45.466989,
        "lat": 12.22971
      }
    ]