vortexasdk.endpoints.vessels
Try me out in your browser:
Vessels
Vessels(self)
Vessels endpoint.
load_all
Vessels.load_all()
Load all vessels.
search
Vessels.search(
term: typing.Union[str, typing.List[str], NoneType] = None,
ids: typing.Union[str, typing.List[str], NoneType] = None,
vessel_classes: typing.Union[str, typing.List[str], NoneType] = None,
vessel_scrubbers: str = 'disabled',
exact_term_match: bool = False)
Find all vessels matching given search arguments. Search arguments are combined in an AND manner.
Arguments
-
term: The name(s) (or partial name(s)) of a vessel we'd like to search
ids: ID or IDs of vessels we'd like to search
vessel_classes: vessel_class (or list of vessel classes) we'd like to search. Each vessel class must be one of
"oil_coastal", "oil_intermediate", "oil_flexi", "oil_handysize", "oil_mr1","oil_handymax", "oil_mr2", "oil_panamax", "oil_lr1", "oil_aframax", "oil_lr2", "oil_suezmax","oil_lr3", "oil_vlcc","lpg_coasters", "lpg_handysize", "lpg_mgc", "lpg_lgc", "lpg_vlgc", "lpg_vlec", "lng_small_scale_lng", "lng_mid_scale_lng", "lng_two_stroke", "lng_tfde_dfde", "lng_steam", "lng_ssd", "lng_q_flex", "lng_q_max", "oil_coastal", "oil_specialised", "oil_handysize_mr1", "oil_handymax_mr2", "oil_panamax_lr1", "oil_aframax_lr2", "oil_suezmax_lr3", "oil_vlcc","lpg_sgc", "lpg_mgc", "lpg_lgc", "lpg_vlgc_vlec","lng_small_scale_lng", "lng_mid_scale_lng","lng_conventional_lng", "lng_q_fleet", "oil", "lpg", "lng",
. Refer to VortexaAPI Vessel Entities for the most up-to-date list of vessel classes.vessel_scrubbers: An optional filter to filter on vessels with or without scrubbers. To disable the filter (the default behaviour), enter 'disabled'. To only include vessels with scrubbers, enter 'inc'. To exclude vessels with scrubbers, enter 'exc'.
exact_term_match: Search on only exact term matches, or allow similar matches. e.g. When searching for "Ocean" with
exact_term_match=False
, then the SDK will yield vessels named ['Ocean', 'Ocean Wisdom', ...] etc. Whenexact_term_match=True
, the SDK will only yield the vessel namedOcean
.
Returns
List of vessels matching the search arguments.
Examples
- Let's find all the VLCCs with 'ocean' in their name, or related names.
>>> from vortexasdk import Vessels
>>> vessels_df = Vessels().search(vessel_classes='oil_vlcc', term='ocean').to_df(columns=['name', 'imo', 'mmsi', 'related_names'])
name | imo | mmsi | related_names | |
---|---|---|---|---|
0 | OCEANIS | 9532757 | 241089000 | ['OCEANIS'] |
1 | AEGEAN | 9732553 | 205761000 | ['GENER8 OCEANUS'] |
2 | OCEANIA | 9246633 | 205753000 | ['OCEANIA' |
3 | ENEOS OCEAN | 9662875 | 432986000 | ['ENEOS OCEAN'] |
4 | OCEAN LILY | 9284960 | 477178100 | ['OCEAN LILY'] |
5 | SHINYO OCEAN | 9197868 | 636019316 | ['SHINYO OCEAN'] |
6 | NASHA | 9079107 | 370497000 | ['OCEANIC'] |
7 | HUMANITY | 9180281 | 422204700 | ['OCEAN NYMPH'] |
Note the term
search also looks for vessels with matching related_names
Further Documentation
reference
Vessels.reference(id: str)
Perform a vessel lookup.
Arguments
- id: Vessel ID to lookup
Returns
Vessel record matching the ID
Further Documentation:
vortexasdk.endpoints.vessels_result
VesselsResult
VesselsResult(*, records: typing.List,
reference: typing.Dict[str, typing.Any])
Container class that holds the result obtained from calling the Vessels
endpoint.
model_config
to_list
VesselsResult.to_list()
Represent vessels as a list.
to_df
VesselsResult.to_df(
columns:
typing.Union[typing_extensions.Literal['all'], typing.List[str], NoneType] = ['id', 'name', 'imo', 'vessel_class']
)
Represent vessels as a pd.DataFrame
.
Arguments
- columns: The vessel features we want in the dataframe. Enter
columns='all'
to include all features. Defaults tocolumns = ['id', 'name', 'imo', 'vessel_class']
.
Returns
pd.DataFrame
of vessels.