{ "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:33:39.585115Z", "iopub.status.busy": "2021-07-12T13:33:39.584244Z", "iopub.status.idle": "2021-07-12T13:33:40.022714Z", "shell.execute_reply": "2021-07-12T13:33:40.023064Z" }, "tags": [] }, "outputs": [], "source": [ "from datetime import datetime\n", "import vortexasdk as v" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Top 5 countries by number of unique vessels by origin country breakdown, in the last quater." ] }, { "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:33:40.026867Z", "iopub.status.busy": "2021-07-12T13:33:40.026314Z", "iopub.status.idle": "2021-07-12T13:33:54.051454Z", "shell.execute_reply": "2021-07-12T13:33:54.050943Z" }, "tags": [] }, "outputs": [], "source": [ "df = v.FleetUtilisationOriginBreakdown().search(\n", " breakdown_size=5,\n", " breakdown_geography=\"country\",\n", " filter_time_min=datetime(2020,10,18),\n", " filter_time_max=datetime(2021,1,18,23,59)\n", ").to_df()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2021-07-12T13:33:54.061953Z", "iopub.status.busy": "2021-07-12T13:33:54.061372Z", "iopub.status.idle": "2021-07-12T13:33:54.067071Z", "shell.execute_reply": "2021-07-12T13:33:54.067479Z" }, "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 }