via Offloads

Sentiance provides data offloads with driving insights to the clients on a daily basis.

What are Offloads

The Sentiance platform offers various methods to access and analyze your end-users' data, one of which is through offloads—our implementation of a file-based system, typically in CSV format. Offloads generally contain data for all your users over a specific timeframe, by default a 24-hour tumbling window. Detailed field descriptions can be found below.

While offloads contain much of the core data, they do not include certain elements such as predictions, coaching data, or some fine-grained details.

Please consult with your Sentiance contact person to discuss the offloads before implementing.

Accessing Offloads

Access to offloads is managed by the Sentiance Cloud API, with permissions authorized by the API Key Scopes (OFFLOADS_READ and OFFLOADS_GENERATE_URL).

To check available offloads, use an API Key with the OFFLOADS_READ scope. The query example is:

query {
  offloads(from: "2023-06-04", to: "2023-06-04") {
    day
    type
    files {
      format
      link {
        expires_at
        url
      }
      name
      size
    }
  }
}

from and to are always days in the format YYYY-MM-DD. The response looks like the following.

{
  "data": {
    "offloads": [
      {
        "day": "2023-06-04",
        "files": [
          { "format": "csv.gz", "link": null, "name": "transports", "size": 20434 }
        ],
        "type": "OFFLOAD_TYPE_TRANSPORTS"
      },
      {
        "day": "2023-06-04",
        "files": [
          { "format": "csv.gz", "link": null, "name": "driving_events_all", "size": 277423 }
        ],
        "type": "OFFLOAD_TYPE_DRIVING_EVENTS_ALL"
      },
      {
        "day": "2023-06-04",
        "files": [
          { "format": "csv.gz", "link": null, "name": "driving_events_significant", "size": 61428 }
        ],
        "type": "OFFLOAD_TYPE_DRIVING_EVENTS_SIGNIFICANT"
      },
      {
        "day": "2023-06-04",
        "files": [
          { "format": "csv.gz", "link": null, "name": "trajectories", "size": 850284 }
        ],
        "type": "OFFLOAD_TYPE_TRAJECTORIES"
      }
    ]
  }
}

Offloads of several types are available (based on which Sentiance product offering you are using). Each day will contain one offload of each type and each offload item may have one or more associated files to download.

The files list their format, name, size and a link to download that file.

In the response above the link field is null since no links have been generated for these files yet. Link generation is done with an API Key with the scope OFFLOADS_GENERATE_URL.

mutation {
  generate_offload_url(day: "2023-06-04", offload_type: OFFLOAD_TYPE_TRANSPORTS) {
    offload {
      day
      type
      files {
        format
        link {
          expires_at
          url
        }
        name
        size
      }
    }
  }
}

To generate a link to the offload files, you must use the generate_offload_url mutation, giving the day of the offload and the type as input. This will respond with.

{
  "data": {
    "generate_offload_url": {
      "offload": {
        "day": "2023-06-04",
        "files": [
          {
            "format": "csv.gz",
            "link": {
              "expires_at": "2023-06-27T11:32:29Z",
              "url": "https://sentiance-g2-driving-offloads.s3.eu-west-1.amazonaws.com/00000000000000000000000a/2023-06-04_0/transports.csv.gz?..."
            },
            "name": "transports",
            "size": 20434
          }
        ],
        "type": "OFFLOAD_TYPE_TRANSPORTS"
      }
    }
  }
}

Links expire after a set time and must be regenerated if needed. Offloads for the previous day are fully available, while current-day offloads may be incomplete.

Types of Offloads

The following offloads are available based on your product selection on the Sentiance platform.

Driver Passenger

The driver passenger offload contains a list of transports, together with a corresponding prediction of driver or passenger (of the mobile user).

Driving Events (all)

This offload file contains a list of transports, together with their corresponding lists of all driving events. The following driving events are available:

  • accelerating events

  • phone handling events

  • turning events

  • mounted events

  • braking events

  • speeding events

  • call events

  • screen events

All driving events for transports are included in this offload.

Driving Events (significant)

This offload file contains a list of transports, together with their corresponding lists of significant driving events. The following driving events are available:

  • accelerating events

  • phone handling events

  • turning events

  • mounted events

  • braking events

  • speeding events

  • call events

  • screen events

Significant events are a subset of all events, and only driving events that fall under certain thresholds are included (e.g. accelerations that have a high magnitude or calls that have a long duration).

Primary Safety Scores (transports)

These offloads contain a list of transports and their corresponding primary safety scores.

The primary safety scores available are:

  • legal

  • smooth

  • attention

  • overall

Secondary Safety Scores (transports)

These offloads contain a list of transports and their corresponding secondary safety scores.

The secondary safety scores available are:

  • focus

  • harsh acceleration

  • harsh braking

  • harsh turning

  • anticipation

  • mounted

Primary Safety Scores (users)

These offloads contain a list of users and their corresponding primary safety scores, based on their overall driving.

The primary safety scores available are:

  • legal

  • smooth

  • attention

  • overall

Secondary Safety Scores (users)

These offloads contain a list of users and their corresponding secondary safety scores, based on their overall driving.

The secondary safety scores available are:

  • focus

  • harsh acceleration

  • harsh braking

  • harsh turning

  • anticipation

  • mounted

Trajectories

Trajectories are information specific about the route that a transports followed. These offloads contain information such as the total distance traveled, the mapped waypoints of the transport, and the start and end addresses.

Transports

Transports represent the period of time a user moved from one venue to another. The transports offloads contain a list of transports and their corresponding predicted transport mode (e.g. car, train, bus, etc.), duration and top speed.

Custom Scores

These offloads contain the trip by trip scores and their corresponding user scores based on your integration with the Engagement platform. Can be similar to Driving Insights scores or different if you have a custom integration.

Badges

These offloads contain events related to your user’s progress towards achieving Badges. A badge state can change to be ACTIVE, IN_PROGRESS or COMPLETED.

Challenges

These offloads contain events related to your user’s progress towards completing a challenge. A challenge state can change to: ACCEPTED, COMPLETED, IN_PROGRESS, FAILED, ABANDONED.

Streaks

These offloads contain events related to your user’s progress towards continuing and maintaining streaks. A streak state can change to: NEW, CONTINUE, BREAK.

Groups

These offloads contain information about all social groups your users create.

Group Members

These offloads contain information about users who are part of groups and their role in the groups. A user can have one of these roles: ADMIN, MEMBER, PENDING.

Communications

These offloads contain information about each communication message that was generated for your users and whether or not a user interacted with it. A communication message can have one of these states: NEW, MANUALLY_CLOSED, AUTOMATICALLY_CLOSED.

Feedback

These offloads contain information about feedback provided by your users about our transport mode and occupant role predictions.

App Events

These offloads contain events generated by your user by using the mobile app.

Off-the-grids

Off-the-grids correspond to segments of time when the user was offline and not sending data from their mobile device to our platform. For an explanation of the possible of the grid reasons see here.

Last updated