Get your personal Signal Ocean API subscription key (acquired here) and replace it below:
In [15]:
Copied!
signal_ocean_api_key = '' # replace with your subscription key
signal_ocean_api_key = '' # replace with your subscription key
Setup¶
In [4]:
Copied!
%%capture
!pip install signal-ocean
from signal_ocean import Connection
from signal_ocean.voyages import VoyagesAPI
from signal_ocean.voyages import Vessel, VesselFilter
from signal_ocean.voyages import VesselType, VesselTypeFilter
from signal_ocean.voyages import VesselClass, VesselClassFilter
import pandas as pd
%%capture
!pip install signal-ocean
from signal_ocean import Connection
from signal_ocean.voyages import VoyagesAPI
from signal_ocean.voyages import Vessel, VesselFilter
from signal_ocean.voyages import VesselType, VesselTypeFilter
from signal_ocean.voyages import VesselClass, VesselClassFilter
import pandas as pd
In [6]:
Copied!
connection = Connection(signal_ocean_api_key)
api = VoyagesAPI(connection)
connection = Connection(signal_ocean_api_key)
api = VoyagesAPI(connection)
Vessel Filter Functions¶
In [2]:
Copied!
def get_vessel_types(name_like = None):
if name_like:
vessel_types = api.get_vessel_types(VesselTypeFilter(name_like))
else:
vessel_types = api.get_vessel_types()
return pd.DataFrame(v.__dict__ for v in vessel_types)
def get_vessel_classes(name_like = None):
if name_like:
vessel_classes = api.get_vessel_classes(VesselClassFilter(name_like))
else:
vessel_classes = api.get_vessel_classes()
return pd.DataFrame(v.__dict__ for v in vessel_classes)
def get_vessels(name_like = None):
if name_like:
vessels = api.get_imos(VesselFilter(name_like))
else:
vessels = api.get_imos()
return pd.DataFrame(v.__dict__ for v in vessels)
def get_vessel_types(name_like = None):
if name_like:
vessel_types = api.get_vessel_types(VesselTypeFilter(name_like))
else:
vessel_types = api.get_vessel_types()
return pd.DataFrame(v.__dict__ for v in vessel_types)
def get_vessel_classes(name_like = None):
if name_like:
vessel_classes = api.get_vessel_classes(VesselClassFilter(name_like))
else:
vessel_classes = api.get_vessel_classes()
return pd.DataFrame(v.__dict__ for v in vessel_classes)
def get_vessels(name_like = None):
if name_like:
vessels = api.get_imos(VesselFilter(name_like))
else:
vessels = api.get_imos()
return pd.DataFrame(v.__dict__ for v in vessels)
Results¶
VesselTypes¶
Get all avalable vessel types¶
In [3]:
Copied!
get_vessel_types()
get_vessel_types()
Out[3]:
vessel_type_id | vessel_type | |
---|---|---|
0 | 1 | Tanker |
1 | 3 | Dry |
2 | 5 | LNG |
3 | 6 | LPG |
Get avalable vessel types using VesselTypeFilter¶
In [4]:
Copied!
get_vessel_types('Tank')
get_vessel_types('Tank')
Out[4]:
vessel_type_id | vessel_type | |
---|---|---|
0 | 1 | Tanker |
VesselClasses¶
Get all avalable vessel classes¶
In [5]:
Copied!
get_vessel_classes()
get_vessel_classes()
Out[5]:
vessel_class_id | vessel_class_name | vessel_type_id | vessel_type | |
---|---|---|---|---|
0 | 60 | VLGC | 6 | LPG |
1 | 61 | Midsize/LGC | 6 | LPG |
2 | 62 | Handy | 6 | LPG |
3 | 63 | Small | 6 | LPG |
4 | 69 | VLOC | 3 | Dry |
5 | 70 | Capesize | 3 | Dry |
6 | 72 | Post Panamax | 3 | Dry |
7 | 74 | Panamax | 3 | Dry |
8 | 75 | Supramax | 3 | Dry |
9 | 76 | Handymax | 3 | Dry |
10 | 77 | Handysize | 3 | Dry |
11 | 84 | VLCC | 1 | Tanker |
12 | 85 | Suezmax | 1 | Tanker |
13 | 86 | Aframax | 1 | Tanker |
14 | 87 | Panamax | 1 | Tanker |
15 | 88 | MR2 | 1 | Tanker |
16 | 89 | MR1 | 1 | Tanker |
17 | 90 | Small | 1 | Tanker |
18 | 91 | LNG | 5 | LNG |
19 | 92 | Small | 3 | Dry |
Get avalable vessel classes using VesselClassFilter¶
In [6]:
Copied!
get_vessel_classes('max')
get_vessel_classes('max')
Out[6]:
vessel_class_id | vessel_class_name | vessel_type_id | vessel_type | |
---|---|---|---|---|
0 | 72 | Post Panamax | 3 | Dry |
1 | 74 | Panamax | 3 | Dry |
2 | 75 | Supramax | 3 | Dry |
3 | 76 | Handymax | 3 | Dry |
4 | 85 | Suezmax | 1 | Tanker |
5 | 86 | Aframax | 1 | Tanker |
6 | 87 | Panamax | 1 | Tanker |
In [7]:
Copied!
get_vessel_classes('Afra')
get_vessel_classes('Afra')
Out[7]:
vessel_class_id | vessel_class_name | vessel_type_id | vessel_type | |
---|---|---|---|---|
0 | 86 | Aframax | 1 | Tanker |
Vessels¶
Get all avalable vessels¶
In [8]:
Copied!
get_vessels()
get_vessels()
Out[8]:
imo | vessel_name | |
---|---|---|
0 | 1013391 | Hyundai Vietnam S560 |
1 | 1013638 | Imabari Saijo 8256 |
2 | 1013781 | Eems Boxer |
3 | 1013793 | Eems Bulldog |
4 | 1013808 | Eems Balder |
... | ... | ... |
49820 | 9999802 | Tsuneishi Zhoushan Ss-364 |
49821 | 9999814 | Tsuneishi Zhoushan Ss-375 |
49822 | 9999826 | Tsuneishi Zhoushan Ss-376 |
49823 | 9999981 | Yard: Hyundai Samho Hull: 8206 |
49824 | 9999993 | French Warship |
49825 rows × 2 columns
Get avalable vessels using VesselFilter¶
In [10]:
Copied!
get_vessels('First')
get_vessels('First')
Out[10]:
imo | vessel_name | |
---|---|---|
0 | 7601451 | Firstec |
1 | 8204406 | First Clarity |
2 | 8307404 | Firstsea |
3 | 8608353 | Medelin First |
4 | 8711007 | PSU First |
5 | 9071727 | First Kasih |
6 | 9115690 | Guofeng First |
7 | 9124108 | First Ai |
8 | 9151242 | Firstec |
9 | 9197129 | First Bridge |
10 | 9266140 | First Brother |
11 | 9330056 | Star First |
12 | 9357901 | First Angel |
13 | 9473119 | Harbour First |
14 | 9520728 | Shagangfirst Star |
15 | 9567752 | First Lion |
16 | 9713909 | Glory First |
17 | 9767405 | PSU First |
18 | 9772864 | RGL First |
19 | 9782247 | First Sky |
20 | 9856139 | BLC First |
21 | 9864083 | First Angelus |
22 | 9871775 | First Phoenix |
23 | 9908243 | New First |
24 | 9911422 | First Dyquem |
25 | 9920667 | First Eternity |
26 | 9922691 | First Penguin |
27 | 9933250 | First Margaux |
28 | 9956159 | Apollo First |
29 | 9974084 | First Falcon |
30 | 9982665 | Emc First |