{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Try out the VortexaSDK" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First let's import our requirements" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2021-07-12T13:48:39.101785Z", "iopub.status.busy": "2021-07-12T13:48:39.100941Z", "iopub.status.idle": "2021-07-12T13:48:39.505241Z", "shell.execute_reply": "2021-07-12T13:48:39.505601Z" }, "tags": [] }, "outputs": [], "source": [ "from datetime import datetime\n", "import vortexasdk as v" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Utilisation of laden vessels carrying Crude/Condensate, between Middle East and China over the last 7 days, by vessel_class breakdown." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You'll need to enter your Vortexa API key when prompted." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2021-07-12T13:48:39.510487Z", "iopub.status.busy": "2021-07-12T13:48:39.509776Z", "iopub.status.idle": "2021-07-12T13:48:41.414962Z", "shell.execute_reply": "2021-07-12T13:48:41.415556Z" }, "tags": [] }, "outputs": [], "source": [ "df = v.FleetUtilisationTimeseries().search(\n", " filter_time_min=datetime(2021, 1, 11),\n", " filter_time_max=datetime(2021, 1, 18),\n", " filter_vessel_status=\"vessel_status_laden_known\",\n", " filter_products=\"54af755a090118dcf9b0724c9a4e9f14745c26165385ffa7f1445bc768f06f11\",\n", " filter_origins=\"80aa9e4f3014c3d96559c8e642157edbb2b684ea0144ed76cd20b3af75110877\",\n", " filter_destinations=\"934c47f36c16a58d68ef5e007e62a23f5f036ee3f3d1f5f85a48c572b90ad8b2\",\n", " timeseries_property=\"vessel_class\",\n", " timeseries_frequency=\"day\",\n", ").to_df()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2021-07-12T13:48:41.427278Z", "iopub.status.busy": "2021-07-12T13:48:41.426480Z", "iopub.status.idle": "2021-07-12T13:48:41.437110Z", "shell.execute_reply": "2021-07-12T13:48:41.437565Z" }, "tags": [] }, "outputs": [], "source": [ "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "That's it! You've successfully loaded data using the Vortexa SDK. Check out https://vortechsa.github.io/python-sdk/ for more examples" ] } ], "metadata": { "interpreter": { "hash": "d0a480ee27f8d5367d468be4cf8e618aff62fff37975ed624adc4f23b43958cc" }, "kernelspec": { "display_name": "Python 3.7.6 64-bit ('base': conda)", "name": "python3" }, "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.6" } }, "nbformat": 4, "nbformat_minor": 4 }