vortexasdk.endpoints.origin_breakdown

Try me out in your browser:

Binder

OriginBreakdown

OriginBreakdown(self)

search

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

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'.

  • breakdown_geography: Geography hierarchy of the origin to aggregate upon. Must be one of the following: 'terminal', 'port','country', 'shipping_region', 'region','trading_block','trading_region','trading_subregion','sts_zone','waypoint'.

  • 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 origin terminal of cargoes departing from the port of origin over the last 5 days, in tonnes.

>>> from vortexasdk import OriginBreakdown, Geographies
>>> start = datetime(2019, 11, 10)
>>> end = datetime(2019, 11, 15)
>>> df = OriginBreakdown().search(
...        filter_activity="loading_end",
...        breakdown_geography="terminal",
...        breakdown_unit="t",
...        breakdown_size=5,
...        filter_time_min=start,
...        filter_time_max=end
... ).to_df()

Gives the following:

key label value count
0 c3daea3cc9c5b3bd91c90882d42c2a418c4cf17b90ff12da3ac78444282a238a Juaymah Crude Oil Terminal 3009799 24
1 3a39cf841ece0c7cb879f72af01cb634191142e0de8010d5ef877fd66c2e8605 Houston Enterprise Terminal 776599 17
2 345b7661310bc82a04e0a4edffd02c286c410c023b53edfb90ed3386640c0476 Arzew GL1Z/GL2Z LNG Terminal 381359 24
3 9dfa3be1b42d1f5e80361b6f442b5217b486876ad0c25e382055887c9e231ad2 SabTank (PCQ-1) Al Jubail 238723 21
4 4813dd7209e85b128cc2fbc7c08fef08d26259550210f28a5c7ff3ccd7b2ba61 Mailiao Industrial Park-Formosa Plastics 118285 18