{ "cells": [ { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "from datetime import datetime\n", "from vortexasdk import CargoMovements" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "dt = datetime(2017, 8, 1)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2020-04-21 10:04:27,631 vortexasdk.operations — INFO — Searching CargoMovements with params: {'filter_activity': 'loading_state', 'filter_time_min': '2017-08-01T00:00:00.000Z', 'filter_time_max': '2017-08-01T00:00:00.000Z', 'timeseries_activity_time_span_min': None, 'timeseries_activity_time_span_max': None, 'cm_unit': 'b', 'filter_charterers': [], 'filter_owners': [], 'filter_products': [], 'filter_vessels': [], 'filter_destinations': [], 'filter_origins': [], 'filter_storage_locations': [], 'filter_ship_to_ship_locations': [], 'filter_waypoints': [], 'disable_geographic_exclusion_rules': None, 'size': 500}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\r", "Loading from API: 0%| | 0/837 [00:00\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
events.cargo_port_load_event.0.location.port.labelevents.cargo_port_unload_event.0.location.port.labelproduct.group.labelproduct.grade.labelquantityvessels.0.nameevents.cargo_port_load_event.0.end_timestampevents.cargo_port_unload_event.0.start_timestamp
0Baton Rouge, LA [US]La Libertad [EC]Clean Petroleum ProductsNaN218878CANAL STREET2017-08-01T21:14:22+00002017-08-21T21:22:22+0000
1Taman [RU]Augusta [IT]Dirty Petroleum ProductsNaN201896NAFTILOS AN2017-08-02T09:59:28+00002017-08-11T11:54:11+0000
2NaNCeyhan [TR]Clean Petroleum ProductsNaN265756VIKTOR BAKAEVNaN2017-08-10T08:41:59+0000
3Malacca (Melaka) [MY]Port Kelang [MY]Dirty Petroleum ProductsNaN18944M T SIDRA MESSAIED2017-08-03T11:31:56+00002017-08-03T21:04:35+0000
4Yeosu (Yosu), Gwangyang [KR]Barbers Point-Honolulu, HI [US]Crude/CondensatesSokol (Sakhalin I)720729NEW ACCORD2017-08-02T01:29:38+00002017-08-18T19:55:31+0000
...........................
832Ulsan, Onsan [KR]Pinghu, Jiaxing [CN]Clean Petroleum ProductsNaN13453NO.9 SJGAS2017-08-01T02:34:47+00002017-08-05T03:55:49+0000
833Houston, TX [US]Wakayama [JP]Clean Petroleum ProductsNaN87855IVY EXPRESS2017-08-01T17:36:03+00002017-09-08T02:32:18+0000
834Le Havre [FR]Alexandria [EG]Clean Petroleum ProductsNaN4805ALSIA SWAN2017-08-01T06:10:45+00002017-08-12T19:37:38+0000
835Yeosu (Yosu), Gwangyang [KR]Rotterdam [NL]Clean Petroleum ProductsJet A-1275046EAGLE LYON2017-08-07T03:10:21+00002017-09-15T00:07:54+0000
836Yeosu (Yosu), Gwangyang [KR]Ulsan, Onsan [KR]Clean Petroleum ProductsNaN46720WOOJIN KELLY2017-08-01T17:06:12+00002017-08-02T04:28:11+0000
\n", "

837 rows × 8 columns

\n", "" ], "text/plain": [ " events.cargo_port_load_event.0.location.port.label \\\n", "0 Baton Rouge, LA [US] \n", "1 Taman [RU] \n", "2 NaN \n", "3 Malacca (Melaka) [MY] \n", "4 Yeosu (Yosu), Gwangyang [KR] \n", ".. ... \n", "832 Ulsan, Onsan [KR] \n", "833 Houston, TX [US] \n", "834 Le Havre [FR] \n", "835 Yeosu (Yosu), Gwangyang [KR] \n", "836 Yeosu (Yosu), Gwangyang [KR] \n", "\n", " events.cargo_port_unload_event.0.location.port.label \\\n", "0 La Libertad [EC] \n", "1 Augusta [IT] \n", "2 Ceyhan [TR] \n", "3 Port Kelang [MY] \n", "4 Barbers Point-Honolulu, HI [US] \n", ".. ... \n", "832 Pinghu, Jiaxing [CN] \n", "833 Wakayama [JP] \n", "834 Alexandria [EG] \n", "835 Rotterdam [NL] \n", "836 Ulsan, Onsan [KR] \n", "\n", " product.group.label product.grade.label quantity \\\n", "0 Clean Petroleum Products NaN 218878 \n", "1 Dirty Petroleum Products NaN 201896 \n", "2 Clean Petroleum Products NaN 265756 \n", "3 Dirty Petroleum Products NaN 18944 \n", "4 Crude/Condensates Sokol (Sakhalin I) 720729 \n", ".. ... ... ... \n", "832 Clean Petroleum Products NaN 13453 \n", "833 Clean Petroleum Products NaN 87855 \n", "834 Clean Petroleum Products NaN 4805 \n", "835 Clean Petroleum Products Jet A-1 275046 \n", "836 Clean Petroleum Products NaN 46720 \n", "\n", " vessels.0.name events.cargo_port_load_event.0.end_timestamp \\\n", "0 CANAL STREET 2017-08-01T21:14:22+0000 \n", "1 NAFTILOS AN 2017-08-02T09:59:28+0000 \n", "2 VIKTOR BAKAEV NaN \n", "3 M T SIDRA MESSAIED 2017-08-03T11:31:56+0000 \n", "4 NEW ACCORD 2017-08-02T01:29:38+0000 \n", ".. ... ... \n", "832 NO.9 SJGAS 2017-08-01T02:34:47+0000 \n", "833 IVY EXPRESS 2017-08-01T17:36:03+0000 \n", "834 ALSIA SWAN 2017-08-01T06:10:45+0000 \n", "835 EAGLE LYON 2017-08-07T03:10:21+0000 \n", "836 WOOJIN KELLY 2017-08-01T17:06:12+0000 \n", "\n", " events.cargo_port_unload_event.0.start_timestamp \n", "0 2017-08-21T21:22:22+0000 \n", "1 2017-08-11T11:54:11+0000 \n", "2 2017-08-10T08:41:59+0000 \n", "3 2017-08-03T21:04:35+0000 \n", "4 2017-08-18T19:55:31+0000 \n", ".. ... \n", "832 2017-08-05T03:55:49+0000 \n", "833 2017-09-08T02:32:18+0000 \n", "834 2017-08-12T19:37:38+0000 \n", "835 2017-09-15T00:07:54+0000 \n", "836 2017-08-02T04:28:11+0000 \n", "\n", "[837 rows x 8 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "CargoMovements().search(filter_time_max=dt, filter_time_min=dt, filter_activity=\"loading_state\").to_df()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\tvessels.2.name" ] } ], "metadata": { "kernelspec": { "display_name": "python-sdk", "language": "python", "name": "python-sdk" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.5" } }, "nbformat": 4, "nbformat_minor": 4 }