Statistics on events
Get events statistics worldwide or for a specific region.
Get events statistics worldwide or for a specific region. The available events to get stats are:
-
Fishing events
-
Encounter events
-
Loitering events
-
AIS Off events (aka GAPs)
-
Port visits
Events Stats POST examples
These examples are available:
- Example 1 (POST) - Get Encounters Stats
- Example 2 (POST) - Get Fishing Events Stats in a Custom Region
- Example 3 (POST) - Get Port Visits Stats in a Region ID (Senegal)
Events Stats POST - Specifications
Authorization
ApiKeyAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Operation to apply to the region after the buffer. Only works together with buffer-value and buffer-unit query param. If not send, the default operation is dissolve
Value in
- "DIFFERENCE"
- "DISSOLVE"
Distance to draw the buffer (negative values are allowed)
Value in
- "MILES"
- "NAUTICALMILES"
- "KILOMETERS"
- "RADIANS"
- "DEGREES"
Distance to draw the buffer (negative values are allowed)
This param applies only to port visits events, check data caveats to understand the different levels. Values go from 2 to 4, where 2 is low confidence, 3 is medium and 4 is high confidence. Values are separated by comma. Possible values: 2, 3, 4
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Specify the datasets that will be used to search the vessel. You can learn more about which are the possible datasets here.
Min duration, in minutes, of the event
Possible values: FISHING-BUNKER, BUNKER-FISHING, FISHING-TANKER, TANKER-FISHING, CARRIER-BUNKER, BUNKER-CARRIER, SUPPORT-BUNKER, BUNKER-SUPPORT, FISHING-NON_FISHING, FISHING-RESEARCH, FISHING-, NON_FISHING-FISHING, NON_FISHING-NON_FISHING, NON_FISHING-SUPPORT, NON_FISHING-CARRIER, NON_FISHING-RESEARCH, NON_FISHING-, SUPPORT-NON_FISHING, SUPPORT-RESEARCH, SUPPORT-, CARRIER-NON_FISHING, CARRIER-CARRIER, CARRIER-RESEARCH, CARRIER-, RESEARCH-FISHING, RESEARCH-NON_FISHING, RESEARCH-SUPPORT, RESEARCH-CARRIER, RESEARCH-RESEARCH, RESEARCH-, -FISHING, -NON_FISHING, -SUPPORT, -CARRIER, -RESEARCH, -, FISHING-FISHING, FISHING-SUPPORT, FISHING-CARRIER, SUPPORT-FISHING, SUPPORT-SUPPORT, SUPPORT-CARRIER, CARRIER-FISHING, CARRIER-SUPPORT
Operators to apply for the filter: [INCLUDE, EXCLUDE]
End date in format YYYY-MM-DD of the end date of the event (exclusive)
Flags in format ISO3.
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Flag to specify if you want to get those gaps that were intentional or not true means that the gap was intentional, false means that the gap was not intentional. If the flag is not present, then the response contains all gaps.
Geojson of the region to filter
Group data by. Options FLAG,GEARTYPE,REGION_EEZ,REGION_EEZ12NM,REGION_FAO,REGION_HIGH_SEAS,REGION_MAJOR_FAO,REGION_MPA,REGION_MPA_NO_TAKE,REGION_MPA_NO_TAKE_PARTIAL,REGION_RFMO,NEXT_PORT_ID
Value in
- "FLAG"
- "GEARTYPE"
- "REGION_EEZ"
- "REGION_EEZ12NM"
- "REGION_FAO"
- "REGION_HIGH_SEAS"
- "REGION_MAJOR_FAO"
- "REGION_MPA"
- "REGION_MPA_NO_TAKE"
- "REGION_MPA_NO_TAKE_PARTIAL"
- "REGION_RFMO"
- "NEXT_PORT_ID"
Data ton include in the response. Options TOTAL_COUNT,TIME_SERIES,EVENTS_GROUPED
If the gap event is closed
Max duration in hours (exclusive)
Min duration in hours (inclusive)
Next port id
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Port ids to filter by
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Geojson of the region to filter
Dataset of regions to filter by
Dataset ids of regions to filter by
Region info to filter
Start date in format YYYY-MM-DD of the start date of the event (inclusive)
Time filter mode
"OVERLAP"Time series granularity. Options HOUR,DAY,MONTH,YEAR
Value in
- "HOUR"
- "DAY"
- "MONTH"
- "YEAR"
Event types. Possible values: ENCOUNTER,FISHING,LOITERING,GAP_START,GAP,PORT_VISIT
Operators to apply for the filter: [INCLUDE, EXCLUDE]
Ids of vessel-groups
Vessel types. Possible values: BUNKER,CARGO,DISCREPANCY,CARRIER,FISHING,GEAR,OTHER,PASSENGER,SEISMIC_VESSEL,SUPPORT,NON_FISHING,RESEARCH,
Operators to apply for the filter: [INCLUDE, EXCLUDE]
List of vessel ids separated by comma. You can get this information using the search endpoints
curl -X POST "https://example.com/api/v3/events/stats" \ -H "Content-Type: application/json" \ -d '{ "datasets": [ "public-global-fishing-events:latest", "public-global-encounter-events:latest" ], "timeseriesInterval": "DAY" }'{ "flags": [ "ESP" ], "groups": [ { "flag": "", "label": "", "name": "", "value": 2 } ], "numEvents": 20, "numFlags": 2, "numVessels": 10, "timeseries": [ { "date": "", "value": 2 } ]}{ "error": "Unauthorized", "messages": [ { "detail": "No authorized", "metadata": {}, "title": "Unauthorized" } ], "statusCode": 401}{ "error": "Forbidden", "messages": [ { "detail": "You do not have permissions to do the action", "metadata": {}, "title": "Forbidden" } ], "statusCode": 403}{ "error": "Unprocessable Entity", "messages": [ { "detail": "Validation exception", "metadata": {}, "title": "Unprocessable Entity" } ], "statusCode": 422}{ "error": "Service Unavailable", "messages": [ { "detail": "Service unavailable", "metadata": {}, "title": "Service Unavailable" } ], "statusCode": 503}Events Stats Response fields
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| flags | [string] | true | none | Distinct flags |
| numEvents | number | true | none | Number of events |
| numFlags | number | true | none | Number of distinct vessel flags |
| numVessels | number | true | none | Number of distinct vessels |
| timeseries | [See Timeseries definition below] | true | none | Timeseries |
Properties Events Stats Response Timeseries
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| date | string(date-time) | true | none | Date |
| value | number | true | none | Number of events |