vortexasdk.endpoints.voyages_timeseries_v2

Try me out in your browser:

Binder

VoyagesTimeseriesV2

VoyagesTimeseriesV2(self, metric: str, breakdown_property: str)

VoyagesTimeseriesV2 class requires a metric and a breakdown_property to be provided.

Please note: you will require a subscription to our Freight module to access this endpoint.

Arguments

  • metric: Used to build the value of the aggregation. Can be one of: 'voyage-count', 'tonne-miles-sum', 'distance-avg'.

  • breakdown_property: Defines the voyage property to aggregate upon. Can be one of: 'status', 'vessel-class-legacy', 'vessel-class-group', 'vessel-class-coarse', 'vessel-class-granular', 'origin-region', 'origin-shipping-region', 'origin-trading-region', 'origin-trading-sub-region', 'origin-trading-block', 'origin-country', 'origin-port', 'origin-terminal', 'destination-region', 'destination-shipping-region', 'destination-trading-region', 'destination-trading-sub-region', 'destination-trading-block', 'destination-country', 'destination-port', 'destination-terminal', 'product-group', 'product-group-product', 'product-category', 'product-grade', 'corporate-entity-cargo-trader', 'corporate-entity-charterer', 'corporate-entity-effective-controller', 'corporate-entity-vessel-owner', 'corporate-entity-time-charterer'.

search

VoyagesTimeseriesV2.search(self, breakdown_frequency: str = None, breakdown_size: int = None, time_min: datetime.datetime = datetime.datetime(2024, 1, 1, 0, 0), time_max: datetime.datetime = datetime.datetime(2024, 3, 31, 1, 0), voyage_id: Union[str, List[str]] = None, cargo_movement_id: Union[str, List[str]] = None, voyage_status: Union[str, List[str]] = None, voyage_status_excluded: Union[str, List[str]] = None, movement_status: Union[str, List[str]] = None, movement_status_excluded: Union[str, List[str]] = None, cargo_status: Union[str, List[str]] = None, cargo_status_excluded: Union[str, List[str]] = None, location_status: Union[str, List[str]] = None, location_status_excluded: Union[str, List[str]] = None, commitment_status: Union[str, List[str]] = None, commitment_status_excluded: Union[str, List[str]] = None, exclude_overlapping_entries: bool = None, products: Union[str, List[str]] = None, products_excluded: Union[str, List[str]] = None, latest_products: Union[str, List[str]] = None, latest_products_excluded: Union[str, List[str]] = None, charterers: Union[str, List[str]] = None, charterers_excluded: Union[str, List[str]] = None, effective_controllers: Union[str, List[str]] = None, effective_controllers_excluded: Union[str, List[str]] = None, origins: Union[str, List[str]] = None, origins_excluded: Union[str, List[str]] = None, destinations: Union[str, List[str]] = None, destinations_excluded: Union[str, List[str]] = None, voyage_origins: Union[str, List[str]] = None, voyage_origins_excluded: Union[str, List[str]] = None, voyage_destinations: Union[str, List[str]] = None, voyage_destinations_excluded: Union[str, List[str]] = None, locations: Union[str, List[str]] = None, locations_excluded: Union[str, List[str]] = None, congestion_target_location: Union[str, List[str]] = None, congestion_target_location_excluded: Union[str, List[str]] = None, vessels: Union[str, List[str]] = None, vessels_excluded: Union[str, List[str]] = None, flags: Union[str, List[str]] = None, flags_excluded: Union[str, List[str]] = None, ice_class: Union[str, List[str]] = None, ice_class_excluded: Union[str, List[str]] = None, vessel_propulsion: Union[str, List[str]] = None, vessel_propulsion_excluded: Union[str, List[str]] = None, vessel_age_min: int = None, vessel_age_max: int = None, vessel_dwt_min: int = None, vessel_dwt_max: int = None, vessel_cbm_min: int = None, vessel_cbm_max: int = None, vessel_wait_time_min: int = None, vessel_wait_time_max: int = None, vessel_scrubbers: str = None, vessel_tags: Union[vortexasdk.api.shared_types.Tag, List[vortexasdk.api.shared_types.Tag]] = None, vessel_tags_excluded: Union[vortexasdk.api.shared_types.Tag, List[vortexasdk.api.shared_types.Tag]] = None, vessel_risk_level: Union[str, List[str]] = None, vessel_risk_level_excluded: Union[str, List[str]] = None, has_ship_to_ship: bool = None, has_charterer: bool = None, vessel_owners: Union[str, List[str]] = None, vessel_owners_excluded: Union[str, List[str]] = None, time_charterer: Union[str, List[str]] = None, time_charterer_excluded: Union[str, List[str]] = None, intra_movements: str = None, voyage_date_range_activity: vortexasdk.api.shared_types.VoyageDateRangeActivity = None, origin_behaviour: vortexasdk.api.shared_types.OriginBehaviour = None, destination_behaviour: vortexasdk.api.shared_types.DestinationBehaviour = None) -> vortexasdk.endpoints.timeseries_result.TimeSeriesResult

Returns buckets by frequency of specified metric, each bucket includes breakdown by specified breakdown_property of a metric.

Arguments

  • breakdown_frequency: Frequency denoting the granularity of the time series. Must be one of the following: 'day', 'week', 'doe_week', 'month', 'quarter', 'year'.

  • breakdown_size: Optional number of top hits to return.

  • time_min: The UTC start date of the time filter.

  • time_max: The UTC end date of the time filter.

  • voyage_id: An array of unique voyage ID(s) to filter on.

  • cargo_movement_id: An array of unique cargo movement ID(s) to filter on.

  • voyage_status: A voyage status, or list of voyage statuses to filter on. Can be one of: 'ballast', 'laden'.

  • voyage_status_excluded: A voyage status, or list of voyage statuses to exclude.

  • movement_status: A movement status, or list of movement statuses to filter on. Can be one of: 'moving', 'stationary', 'waiting', 'congestion', 'slow'.

  • movement_status_excluded: A movement status, or list of movement statuses to exclude.

  • cargo_status: A cargo status, or list of cargo statuses to filter on. Can be one of: 'in-transit', 'floating-storage', 'loading', 'discharging'.

  • cargo_status_excluded: A cargo status, or list of cargo statuses to exclude.

  • location_status: A location status, or list of location statuses to filter on. Can be one of: 'berth', 'anchorage-zone', 'dry-dock', 'on-the-sea'.

  • location_status_excluded: A location status, or list of location statuses to exclude.

  • commitment_status: A commitment status, or list of commitment statuses to filter on. Can be one of: 'committed', 'uncommitted', 'open', 'unknown'.

  • commitment_status_excluded: A commitment status, or list of commitment statuses to exclude.

  • exclude_overlapping_entries: A boolean to only consider the latest voyage in days where two or more Voyages overlap.

  • products: A product ID, or list of product IDs to filter on.

  • products_excluded: A product ID, or list of product IDs to exclude.

  • latest_products: A product ID, or list of product IDs of the latest cargo on board to filter on.

  • latest_products_excluded: A product ID, or list of product IDs of the latest cargo on board to exclude.

  • charterers: A charterer ID, or list of charterer IDs to filter on.

  • charterers_excluded: A charterer ID, or list of charterer IDs to exclude.

  • time_charterer: A time charterer ID, or list of time charterer IDs to filter on.

  • time_charterer_excluded: A time charterer ID, or list of time charterer IDs to exclude.

  • effective_controllers: A vessel effective controller ID, or list of vessel effective controller IDs to filter on.

  • effective_controllers_excluded: A effective controller ID, or list of effective controller IDs to exclude.

  • vessel_owners: A vessel owner ID, or list of vessel owners IDs to filter on.

  • vessel_owners_excluded: A vessel owner ID, or list of vessel owners IDs to exclude.

  • origins: An origin ID, or list of origin IDs for all the cargoes of a voyage to filter on.

  • origins_excluded: An origin ID, or list of origin IDs for all the cargoes of a voyage to exclude.

  • destinations: A destination ID, or list of destination IDs for all the cargoes of a voyage to filter on.

  • destinations_excluded: A destination ID, or list of destination IDs for all the cargoes of a voyage to exclude.

  • voyage_origins: An origin ID, or list of origin IDs for the first origin of voyage to filter on.

  • voyage_origins_excluded: An origin ID, or list of origin IDs for the first origin of voyage to exclude.

  • voyage_destinations: A destination ID, or list of destination IDs for the last destination of a voyage to filter on.

  • voyage_destinations_excluded: A destination ID, or list of destination IDs for the final destination of a voyage to exclude.

  • locations: A location ID, or list of location IDs to filter on.

  • locations_excluded: A location ID, or list of location IDs to exclude.

  • congestion_target_location: A congestion location ID, or list of congestion location IDs to filter on.

  • congestion_target_location_excluded: A congestion location ID, or list of congestion location IDs to exclude.

  • vessels: A vessel ID or vessel class, or list of vessel IDs/vessel classes to filter on.

  • vessels_excluded: A vessel ID or vessel class, or list of vessel IDs/vessel classes to exclude.

  • flags: A flag, or list of flags to filter on.

  • flags_excluded: A flag, or list of flags to exclude.

  • ice_class: An ice class, or list of ice classes to filter on.

  • ice_class_excluded: An ice class, or list of ice classes to ęxclude.

  • vessel_propulsion: A propulsion method, or list of propulsion methods to filter on.

  • vessel_propulsion_excluded: A propulsion method, or list of propulsion methods to ęxclude.

  • vessel_age_min: A number between 1 and 100 (representing years).

  • vessel_age_max: A number between 1 and 100 (representing years).

  • vessel_dwt_min: A number representing minimum deadweight tonnage of a vessel.

  • vessel_dwt_max: A number representing maximum deadweight tonnage of a vessel.

  • vessel_cbm_min: A number representing minimum cubic capacity of a vessel.

  • vessel_cbm_max: A number representing maximum cubic capacity of a vessel.

  • vessel_wait_time_min: A number representing a minimum number of days until a vessel becomes available.

  • vessel_wait_time_max: A number representing a maximum number of days until a vessel becomes available.

  • vessel_scrubbers: Either inactive 'disabled', or included 'inc' or excluded 'exc'.

  • vessel_tags: A time bound vessel tag, or list of time bound vessel tags to filter on.

  • vessel_tags_excluded: A time bound vessel tag, or list of time bound vessel tags to exclude.

  • vessel_risk_level: A vessel risk level, or list of vessel risk levels to filter on.

  • vessel_risk_level_excluded: A vessel risk level, or list of vessel risk levels to exclude.

  • has_ship_to_ship: Filter data where at least one STS transfer occurs, or none. - one of: 'disabled', 'inc', 'exc'. Passing disabled means the filter is not active.

  • has_charterer: Filter data where at least one charterer is specified, or none. - one of: 'disabled', 'inc', 'exc'. Passing disabled means the filter is not active.

  • intra_movements: Filter movements based on whether the vessel started and ended in the same country, or geographical layer.

  • voyage_date_range_activity: Filter to determine how the voyages should be counted. Must be one of [active, departures, arrivals]

  • origin_behaviour: The origin behaviour determines which departure mode the voyage_date_range_activity should count, must be one of [first_load, any_load].

  • destination_behaviour: The destination behaviour determines which arrival mode the voyage_date_range_activity should count, must be one of [last_discharge, any_discharge].

Returns

BreakdownResult

Example

Sum of vessels split by status between 1st of January 2024 - 29th of Febuary 2024 with a month frequency.

>>> from vortexasdk import VoyagesTimeseriesV2
>>> from datetime import datetime
>>> search_result = VoyagesTimeseriesV2(
...    metric="voyage-count",
...    breakdown_property="status"
... ).search(
...    time_min=datetime(2024, 1, 1),
...    time_max=datetime(2024, 2, 29, 23, 59),
...    breakdown_frequency="month",
...    exclude_overlapping_entries=False
... ).to_df()

Gives the following result:

|    | key                       |   value |   count | breakdown.0.id   | breakdown.0.label   |   breakdown.0.value |   breakdown.0.count | breakdown.1.id   | breakdown.1.label   |   breakdown.1.value |   breakdown.1.count | breakdown.2.id   | breakdown.2.label   |   breakdown.2.value |   breakdown.2.count |
|---:|:--------------------------|--------:|--------:|:-----------------|:--------------------|--------------------:|--------------------:|:-----------------|:--------------------|--------------------:|--------------------:|:-----------------|:--------------------|--------------------:|--------------------:|
|  0 | 2024-01-01 00:00:00+00:00 |   39429 |   39429 | undetermined     | Undetermined        |                  76 |                  76 | ballast          | ballast             |               18933 |               18933 | laden            | laden               |               20420 |               20420 |
|  1 | 2024-02-01 00:00:00+00:00 |   35620 |   35620 | undetermined     | Undetermined        |                  46 |                  46 | ballast          | ballast             |               17152 |               17152 | laden            | laden               |               18422 |               18422 |