vortexasdk.endpoints.movement_status_breakdown

Try me out in your browser:

Binder

MovementStatusBreakdown

MovementStatusBreakdown(self)

search

MovementStatusBreakdown.search(
  timestamp: datetime = datetime.datetime(2019, 10, 1, 0, 0),
  breakdown_unit_average_basis: typing.Optional[str] = None,
  filter_activity: str = 'any_activity',
  breakdown_unit: str = 'b',
  disable_geographic_exclusion_rules: typing.Optional[bool] = None,
  breakdown_size: typing.Optional[int] = None,
  filter_time_min: datetime = datetime.datetime(2019, 10, 1, 0, 0),
  filter_time_max: datetime = datetime.datetime(2019, 10, 1, 1, 0),
  filter_products: typing.Union[str, typing.List[str], NoneType] = None,
  filter_charterers: typing.Union[str, typing.List[str], NoneType] = None,
  filter_vessels: typing.Union[str, typing.List[str], NoneType] = None,
  filter_vessel_classes:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_owners: typing.Union[str, typing.List[str], NoneType] = None,
  filter_effective_controllers:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_vessel_flags:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_vessel_ice_class:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_vessel_propulsion:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_origins: typing.Union[str, typing.List[str], NoneType] = None,
  filter_destinations:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_storage_locations:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_waypoints: typing.Union[str, typing.List[str], NoneType] = None,
  filter_ship_to_ship_locations:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_vessel_age_min: typing.Optional[int] = None,
  filter_vessel_age_max: typing.Optional[int] = None,
  filter_vessel_scrubbers: str = 'disabled',
  filter_vessel_tags:
    typing.Union[typing.List[vortexasdk.api.shared_types.Tag], vortexasdk.api.shared_types.Tag, NoneType] = None,
  exclude_products: typing.Union[str, typing.List[str], NoneType] = None,
  exclude_vessels: typing.Union[str, typing.List[str], NoneType] = None,
  exclude_vessel_classes:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_owners: typing.Union[str, typing.List[str], NoneType] = None,
  exclude_effective_controllers:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_charterers:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_vessel_flags:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_destinations:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_origins: typing.Union[str, typing.List[str], NoneType] = None,
  exclude_waypoints: typing.Union[str, typing.List[str], NoneType] = None,
  exclude_storage_locations:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_ship_to_ship_locations:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_vessel_ice_class:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_vessel_propulsion:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_vessel_tags:
    typing.Union[typing.List[vortexasdk.api.shared_types.Tag], vortexasdk.api.shared_types.Tag, NoneType] = None,
  intra_movements: typing.Optional[str] = None)

Origin locations breakdown aggregation by geographic area

Arguments

breakdown_unit_average_basis: Per day metrics only - movement activity on which to base the average metric. Can be one of state properties of a cargo movement: `identified_for_loading_state`, `loading_state`, `transiting_state`, `storing_state`, `ship_to_ship`, `unloading_state`, `unloaded_state`, `oil_on_water_state`, `unknown_state`, or one of time properties of a cargo movement: `identified_for_loading_at`, `loading_start`, `loading_end`, `storing_start`, `storing_end`, `ship_to_ship_start`, `ship_to_ship_end`, `unloading_start`, `unloading_end`.

breakdown_unit: Units to aggregate upon. Must be one of the following: `'b'`, `'t'`, `'cbm'`, `'bpd'`, `'tpd'`, `'mpd'`.

timestamp: The UTC date of the specific movement status to search.

breakdown_size: Number of top geographies to return. Default is 5.

disable_geographic_exclusion_rules: A boolean which specifies whether certain movements should be excluded, based on a combination of their origin and destination.

intra_movements: This enum controls a popular industry term intra-movements and determines the filter behaviour for cargo leaving then entering the same geographic area.
 One of `all`, `exclude_intra_country` or `exclude_intra_geography`

filter_activity: Cargo movement activity on which to base the time filter. The endpoint only includes cargo
movements matching that match this filter in the aggregations. Must be one of ['loading_state',
 'loading_start', 'loading_end', 'identified_for_loading_state', 'unloading_state', 'unloading_start',
  'unloading_end', 'storing_state', 'storing_start', 'storing_end', 'transiting_state'].

filter_time_min: The UTC start date of the time filter.

filter_time_max: The UTC end date of the time filter.

filter_effective_controllers: An effective controller ID, or list of effective controller IDs to filter on.

filter_vessel_flags: A vessel flag ID, or list of vessel flag IDs to filter on.

filter_vessel_ice_class: An ice class ID, or list of ice class IDs to filter on.

filter_vessel_propulsion: An propulsion means ID, or list of propulsion means IDs to filter on.

filter_charterers: An commercial entity ID, or list of commercial entity IDs to filter on.

filter_origins: A geography ID, or list of geography IDs to filter on.

filter_destinations: A geography ID, or list of geography IDs to filter on.

filter_storage_locations: A geography ID, or list of geography IDs to filter on.

filter_waypoints: A geography ID, or list of geography IDs to filter on.

filter_ship_to_ship_locations: A geography ID, or list of geography IDs to filter on.

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

filter_vessels: A vessel ID, or list of vessel IDs to filter on.

filter_vessel_classes: A vessel class, or list of vessel classes to filter on.

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

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

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

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

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

exclude_vessel_flags: A vessel flag ID, or list of vessel flag IDs to exclude.

exclude_vessel_ice_class: An ice class ID, or list of ice class IDs to exclude.

exclude_vessel_propulsion: An propulsion means ID, or list of propulsion means IDs to exclude.

exclude_vessels: A vessel ID, or list of vessel IDs to exclude.

exclude_vessel_classes: A vessel class, or list of vessel classes to exclude.

exclude_effective_controllers: An effective controller ID, or list of effective controller IDs to exclude.

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

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

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

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

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

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

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

Returns

ReferenceBreakdownResult

Example

Breakdown by movement status of cargoes in tonnes.

>>> from vortexasdk import MovementStatusBreakdown
>>> start = datetime(2019, 11, 10)
>>> timestamp = datetime(2019, 1, 19)
>>> end = datetime(2033, 11, 15)
>>> df = MovementStatusBreakdown().search(
...        filter_activity="loading_end",
...        timestamp=timestamp,
...        breakdown_unit="t",
...        breakdown_size=5,
...        filter_time_min=start,
...        filter_time_max=end
... ).to_df()

Gives the following:

key value count
0 transiting_state 3009799 24
1 identified_for_loading_state 776599 17
2 loading_state 381359 24
3 unloading_state 238723 21
4 storing_state 118285 18
4 ship_to_ship 118285 18