Zones

Note

available on platforms : Platform.Liquids, Platform.LNG, Platform.LPG, Platform.Dry

class kpler.sdk.resources.zones.Zones(configuration, column_ids=True, log_level=None)[source]

The Zones endpoint allows to perform full-text search on zones, in order to find names used in Kpler referential.

get(columns=None, ancestor_id=None, ancestor_name=None, ancestor_type=None, descendant_id=None, descendant_name=None, descendant_type=None)[source]
Parameters
  • ancestor_id – Optional[int] IDs ancestor zones. Can be separated by a coma.

  • ancestor_name – Optional[str] Names ancestor zones. Can be separated by a coma.

  • ancestor_type – Optional[str] Type of ancestor zones. Can be separated by a coma. e.g. continent, subcontinent, region, subregion, country, port, custom, bay, cape, gulf, ocean, sea, strait, …

  • descendant_id – Optional[str] IDs descendant zones. Can be separated by a coma.

  • descendant_name – Optional[int] Names descendant zones. Can be separated by a coma.

  • descendant_type – Optional[int] Type of descendant zones. Can be separated by a coma. e.g. continent, subcontinent, region, subregion, country, port, custom, bay, cape, gulf, ocean, sea, strait, …

  • columns – Optional[List[str]] Retrieve all available columns when set to “all”

Examples

>>> from kpler.sdk.resources.zones import Zones
... zones_client = Zones(config)
... zones_client.get(ancestor_id=[515])

ancestor_id

ancestor_name

ancestor_type

descendant_id

descendant_name

descendant_type

515;Latin America

custom

209

Chile

country

515

Latin America

custom

283

East Coast Mexico

subregion

515

Latin America

custom

177

Caribbean Islands

subcontinent

515

Latin America

custom

187

Cayman Islands

country

515

Latin America

custom

239

Curacao

country

Return type

DataFrame

get_columns()[source]

This endpoint returns a recent and updated list of all columns available for the endpoint zones.

Examples

>>> from kpler.sdk.resources.zones import Zones
... zones_client = Zones(config)
... zones_client.get_columns()

id

name

description

deprecated

type

ancestor_id

Ancestor Id

Identifier in the database of Kpler

False

long

ancestor_name

Ancestor Name

Name of the Ancestor Zone

False

string

ancestor_type

Ancestor Type

Ancestor Zone Type

False

string

descendant_id

Descendant Id

Identifier in the database of Kpler

False

long

descendant_name

Descendant Name

Name of the Descendant Zone

False

string

Return type

DataFrame

search(q)[source]
Parameters

q – str Argument to search by in zones names

Examples

>>> from kpler.sdk.resources.zones import Zones
... zones_client=Zones(config)
... zones_client.search("oecd europe")

zones

OECD Europe

NON-OECD Europe

Return type

DataFrame