{ "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:29:02.035140Z", "iopub.status.busy": "2021-07-12T13:29:02.034295Z", "iopub.status.idle": "2021-07-12T13:29:02.448714Z", "shell.execute_reply": "2021-07-12T13:29:02.449053Z" }, "tags": [] }, "outputs": [], "source": [ "from datetime import datetime\n", "import vortexasdk as v" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Time series for the number of vessels available between the next 30 to 35 days, at port Singapore, over the last year." ] }, { "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:29:02.453962Z", "iopub.status.busy": "2021-07-12T13:29:02.453050Z", "iopub.status.idle": "2021-07-12T13:29:03.300602Z", "shell.execute_reply": "2021-07-12T13:29:03.301067Z" }, "tags": [] }, "outputs": [], "source": [ "df = v.VesselAvailabilityTimeseries().search(\n", " filter_port='1b79e18416d358d7e07b978abcab3f17e2ca75085a6d70ce1811cf4eaeaea886',\n", " filter_days_to_arrival={\"min\": 30,\"max\": 35},\n", " filter_time_min=datetime(2021,1,19,11,51),\n", " filter_time_max=datetime(2021,1,19,23,59)\n", ").to_df()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2021-07-12T13:29:03.309919Z", "iopub.status.busy": "2021-07-12T13:29:03.309268Z", "iopub.status.idle": "2021-07-12T13:29:03.316255Z", "shell.execute_reply": "2021-07-12T13:29:03.316705Z" }, "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 }