In this section we highlight preview and upcoming features in the Vessel Insight API.
Time Weighted Average aggregate
In cases where we are interested in accumulating values from e.g. a flow rate sensor or a power sensor and the sampling frequency is irregular, the standard "Average" aggregate is not sufficient. We are providing a Time weighted average as a new aggregate in a preview endpoint. This new aggregate will interpolate values to ensure a proper average. The last observed value is applied as interpolated values which is appropriate to use in cases where sensor values updates at change.
As an example, we will use the time information from a fictitious Voyage to get the data from a path mapped to a mass flow sensor FO_Mass_Flow
This mass flow sensor gives us time irregular data, in this case kg/h, and we are using the preview API endpoint to get the data:
curl --location 'https://api.kognif.ai/galore/v2/timeseries/preview/vesselsensoreventsbypath'
\--header 'Ocp-Apim-Subscription-Key: [YOUR-OCP-APIM-SUBSCRIPTION-KEY]'
\--header 'Authorization: ••••••'
\--data '{<body>]}
We are using a time_weighted_average aggregation to ensure we are getting values for each period within the time interval, this is how body looks like:
{
"from":"2024-11-01T01:01:01Z",
"to":"2024-11-04T10:00:30Z",
"interval":"1m",
"resamplingMethods":[
"time_weighted_average"
],
"paths":[
"/Fleet/imo9307633/Engines/Main/1/FO_Mass_Flow"
]
}
The response, shortened for readability:
{
"intervalInSeconds":60,
"resamplingMethods":[
"time_weighted_average"
],
"time":"2024-11-01T01:00:00Z",
"interval":"1m",
"columns":[
{
"path":"/Fleet/imo9307633/Engines/Main/1/FO_Mass_Flow",
"unit":"kg/h",
"samples":{
"time_Weighted_Average":[
741.6849276974416,
738.2358333333333,
…
]
}
}
],
"errors":[
]
}
When we summarize all 1-hour time weighted averages and divide by 60 to get the accumulated kg.
Data Quality
For vessels with Data Quality rules configured, the preview timeseries API's will include data quality information in response. An example is as follows:
This is the curl for the endpoint:
curl --location 'https://api.kognif.ai/galore/v2/timeseries/preview/vesselsensoreventsbypath'
\--header 'Ocp-Apim-Subscription-Key: [YOUR-OCP-APIM-SUBSCRIPTION-KEY]'
\--header 'Authorization: ••••••'
\--data '{<body>]}
The body :
{
"from":"2024-12-02T09:00:00.000Z",
"to":"2024-12-02T11:00:00.000Z",
"interval":"1h",
"resamplingMethods":[
"avg"
],
"paths":[
"/Fleet/imo9307633/Aux_Engines/3/Generator_Load"
]
}
Response:
{
"intervalInSeconds":3600,
"resamplingMethods":[
"avg"
],
"time":"2024-12-02T09:00:00Z",
"interval":"1h",
"columns":[
{
"path":"/Fleet/imo9307633/Aux_Engines/3/Generator_Load",
"unit":"%",
"samples":{
"avg":[
0,
23.480952380952377,
0
]
},
"dataValidationErrors":{
"rangeLimit":[
0,
2,
0
],
"timeFreeze":[
0,
0,
0
],
"dataFreeze":[
0,
0,
0
]
}
}
],
"errors":[
]
}
The section dataValidationErrors includes information on observed data quality errors per interval in the queried time period.
Currently, we include 3 validation rules which are evaluated in real-time as data are ingested into the Vessel Insight cloud platform:
- rangeLimit shows Data Range errors, configured with a min/max range tolerance
- timeFreeze shows frozen timings errors, Configured with a number of repeated timestamps to tolerate
- dataFreeze shows data freeze errors , configured with a time period tolerance for repeated values
Currently, there are no cleansing or filtering on server-side, so consumers need to do the necessary to avoid bad data in downstream use. Recommendation is to use a reasonable short time interval and exclude intervals with errors.
Summary data
Summary endpoint is available to get vessel-level data quality data:
Rules metadata
Rules metadata will be available in a future release