{ "cells": [ { "cell_type": "markdown", "source": [ "### Try out the VortexaSDK" ], "metadata": {} }, { "cell_type": "markdown", "source": [ "First let's import our requirements" ], "metadata": {} }, { "cell_type": "code", "execution_count": null, "source": [ "from datetime import datetime\n", "import vortexasdk as v" ], "outputs": [], "metadata": { "execution": { "iopub.execute_input": "2021-07-14T15:55:18.067903Z", "iopub.status.busy": "2021-07-14T15:55:18.066636Z", "iopub.status.idle": "2021-07-14T15:55:18.510526Z", "shell.execute_reply": "2021-07-14T15:55:18.510915Z" } } }, { "cell_type": "markdown", "source": [ "Now let's look at the breakdown by destination terminal of cargoes departing from the port of origin over the last 5 days, in tonnes.\n" ], "metadata": {} }, { "cell_type": "markdown", "source": [ "You'll need to enter your Vortexa API key when prompted." ], "metadata": {} }, { "cell_type": "code", "execution_count": null, "source": [ "df = v.DestinationBreakdown()\\\n", " .search(filter_activity=\"loading_end\",\n", " breakdown_geography=\"terminal\",\n", " breakdown_unit=\"t\",\n", " breakdown_size=5,\n", " filter_time_min=datetime(2019, 11, 10),\n", " filter_time_max=datetime(2019, 11, 15)\n", " ).to_df()" ], "outputs": [], "metadata": { "execution": { "iopub.execute_input": "2021-07-14T15:55:18.515504Z", "iopub.status.busy": "2021-07-14T15:55:18.514846Z", "iopub.status.idle": "2021-07-14T15:55:19.577779Z", "shell.execute_reply": "2021-07-14T15:55:19.578265Z" } } }, { "cell_type": "code", "execution_count": null, "source": [ "df.head()" ], "outputs": [], "metadata": { "execution": { "iopub.execute_input": "2021-07-14T15:55:19.589776Z", "iopub.status.busy": "2021-07-14T15:55:19.589153Z", "iopub.status.idle": "2021-07-14T15:55:19.597632Z", "shell.execute_reply": "2021-07-14T15:55:19.598108Z" } } }, { "cell_type": "markdown", "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": {} } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "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 }