{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### This notebook gives a 30 second introduction to the Vortexa SDK" ] }, { "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:42:05.674362Z", "iopub.status.busy": "2020-12-29T16:42:05.673634Z", "iopub.status.idle": "2020-12-29T16:42:06.068265Z", "shell.execute_reply": "2020-12-29T16:42:06.068667Z" } }, "outputs": [], "source": [ "from datetime import datetime\n", "import vortexasdk as v" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Returns a list of voyages occurring on 1st August 2021." ] }, { "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:42:06.073239Z", "iopub.status.busy": "2020-12-29T16:42:06.072525Z", "iopub.status.idle": "2020-12-29T16:42:10.894568Z", "shell.execute_reply": "2020-12-29T16:42:10.895056Z" } }, "outputs": [], "source": [ "df = v.VoyagesSearchEnriched()\\\n", " .search(\n", " columns=\"all\",\n", " time_min=datetime(2021, 8, 1, 0, 0),\n", " time_max=datetime(2021, 8, 1, 23, 59))\\\n", " .to_df()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2020-12-29T16:42:10.908579Z", "iopub.status.busy": "2020-12-29T16:42:10.907926Z", "iopub.status.idle": "2020-12-29T16:42:10.930443Z", "shell.execute_reply": "2020-12-29T16:42:10.930884Z" } }, "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 }