{ "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:54:31.300472Z", "iopub.status.busy": "2021-07-14T15:54:31.299713Z", "iopub.status.idle": "2021-07-14T15:54:31.693705Z", "shell.execute_reply": "2021-07-14T15:54:31.694114Z" } } }, { "cell_type": "markdown", "source": [ "Now let's look at the breakdown by origin 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.OriginBreakdown()\\\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:54:31.698339Z", "iopub.status.busy": "2021-07-14T15:54:31.697666Z", "iopub.status.idle": "2021-07-14T15:54:32.228216Z", "shell.execute_reply": "2021-07-14T15:54:32.228892Z" } } }, { "cell_type": "code", "execution_count": null, "source": [ "df.head()" ], "outputs": [], "metadata": { "execution": { "iopub.execute_input": "2021-07-14T15:54:32.238760Z", "iopub.status.busy": "2021-07-14T15:54:32.238022Z", "iopub.status.idle": "2021-07-14T15:54:32.246506Z", "shell.execute_reply": "2021-07-14T15:54:32.246935Z" } } }, { "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 }