{ "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": "2020-12-29T16:41:45.923895Z", "iopub.status.busy": "2020-12-29T16:41:45.923102Z", "iopub.status.idle": "2020-12-29T16:41:46.444710Z", "shell.execute_reply": "2020-12-29T16:41:46.445866Z" } }, "outputs": [], "source": [ "from datetime import datetime\n", "import vortexasdk as v" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now let's load a dataframe of cargo movements that loaded at the start of August, 2017." ] }, { "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": "2020-12-29T16:41:46.453677Z", "iopub.status.busy": "2020-12-29T16:41:46.452767Z", "iopub.status.idle": "2020-12-29T16:41:50.550570Z", "shell.execute_reply": "2020-12-29T16:41:50.551095Z" } }, "outputs": [], "source": [ "df = v.CargoMovements()\\\n", " .search(filter_activity='loading_state',\n", " filter_time_min=datetime(2017, 8, 1),\n", " filter_time_max=datetime(2017, 8, 2))\\\n", " .to_df()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2020-12-29T16:41:50.562065Z", "iopub.status.busy": "2020-12-29T16:41:50.561348Z", "iopub.status.idle": "2020-12-29T16:41:50.576344Z", "shell.execute_reply": "2020-12-29T16:41:50.576779Z" } }, "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": { "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.9" } }, "nbformat": 4, "nbformat_minor": 4 }