vortexasdk.endpoints.corporations

Corporations Endpoint.

Corporations

Corporations(self)

Corporations Endpoint.

load_all

Corporations.load_all(self) -> vortexasdk.endpoints.corporations_result.CorporationsResult

Load all corporations.

search

Corporations.search(self, term: Union[str, List[str]] = None, exact_term_match: bool = False) -> vortexasdk.endpoints.corporations_result.CorporationsResult

Find all Corporations matching given search terms.

Arguments

  • term: The corporation name(s) we're filtering on

  • exact_term_match: Search on only exact term matches, or allow similar matches. e.g. When searching for "COS" with exact_term_match=False, then the SDK will yield corporations named ['COSCO', 'COSMO OIL'] etc. When exact_term_match=True, the SDK won't yield any results, because no corporations have the exact name "COS".

Returns

List of corporation matching term

Examples

Let's load all corporations

>>> from vortexasdk import Corporations
>>> df = Corporations().search().to_df()

returns

id name corporate_entity_type
0 04f418ee78c1e17744ad653e7815e8e28891ed9ba25a8427030e4478e5c00974 3J ['commercial_owner']
1 b6384cf17f1639a64bbff04cfd32257bf732a3a13e4b0532802a9ae84a36be34 5XJAPANESE ['commercial_owner']

Let's find all corporations with 'do' in the name.

>>> [x.name for x in Corporations().search(term="do").to_list()]
[...]

Further Documentation

VortexaAPI Corporation Reference

reference

Corporations.reference(self, id: str) -> Dict

Perform a corporation lookup.

Arguments

  • id: Corporation ID to lookup

Returns

Corporation record matching the ID

Further Documentation:

VortexaAPI Corporation Reference

Examples

Corporations().reference(id='12345abcdef') # doctest: +SKIP

vortexasdk.endpoints.corporations_result

CorporationsResult

CorporationsResult(self, _records: List) -> None

Container class that holds the result obtained from calling the Vessels endpoint.

to_list

CorporationsResult.to_list(self) -> List[vortexasdk.api.corporation.Corporation]

Represent vessels as a list.

to_df

CorporationsResult.to_df(self, columns=None) -> pandas.core.frame.DataFrame

Represent corporations as a pd.DataFrame.

Arguments

  • columns: The corporation features we want in the dataframe. Enter columns='all' to include all features. Defaults to columns = ['id', 'name', 'corporate_entity_type'].

Returns

pd.DataFrame of corporations.