{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### First create the erddapy object\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "slideshow": { "slide_type": "-" } }, "outputs": [], "source": [ "from erddapy import ERDDAP\n", "\n", "server = \"https://ferret.pmel.noaa.gov/pmel/erddap\"\n", "e = ERDDAP(server=server, protocol=\"tabledap\")\n", "\n", "e.dataset_id = \"sd1060_hurricane_2021\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], "source": [ "e.variables = [\n", " \"trajectory\",\n", " \"latitude\",\n", " \"longitude\",\n", " \"TEMP_SBE37_MEAN\",\n", "]" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], "source": [ "df = e.to_pandas()\n", "df.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], "source": [ "import cartopy.crs as ccrs\n", "import matplotlib.pyplot as plt\n", "\n", "fig, ax = plt.subplots(figsize=(9, 9), subplot_kw={\"projection\": ccrs.PlateCarree()})\n", "\n", "subset = 100\n", "\n", "cs = ax.scatter(\n", " df[\"longitude (degrees_east)\"][::subset],\n", " df[\"latitude (degrees_north)\"][::subset],\n", " s=20,\n", " c=df[\"TEMP_SBE37_MEAN (degree_C)\"][::subset],\n", ")\n", "\n", "ax.coastlines(\"10m\")\n", "\n", "plt.colorbar(cs)" ] } ], "metadata": { "_draft": { "nbviewer_url": "https://gist.github.com/b5810e707f01556eb006c7bac351d1ba" }, "celltoolbar": "Slideshow", "gist": { "data": { "description": "saildrone_arctic_data.ipynb", "public": true }, "id": "b5810e707f01556eb006c7bac351d1ba" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.10.5" } }, "nbformat": 4, "nbformat_minor": 2 }