diff --git a/notebooks/contributions/TDM_Tokyo.ipynb b/notebooks/contributions/TDM_Tokyo.ipynb new file mode 100644 index 00000000..77d9a89d --- /dev/null +++ b/notebooks/contributions/TDM_Tokyo.ipynb @@ -0,0 +1,478 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "fd967380", + "metadata": { + "tags": [ + "papermill-error-cell-tag" + ] + }, + "source": [ + "An Exception was encountered at 'In [3]'." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "16302e51", + "metadata": { + "execution": { + "iopub.execute_input": "2021-06-28T17:20:17.192352Z", + "iopub.status.busy": "2021-06-28T17:20:17.191600Z", + "iopub.status.idle": "2021-06-28T17:20:17.284582Z", + "shell.execute_reply": "2021-06-28T17:20:17.283864Z" + }, + "papermill": { + "duration": 0.109895, + "end_time": "2021-06-28T17:20:17.284723", + "exception": false, + "start_time": "2021-06-28T17:20:17.174828", + "status": "completed" + }, + "tags": [] + }, + "outputs": [ + { + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "This notebook is compatible with this base image version (user-0.24.5)." + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "\n", + "\n", + "---------\n", + "\n", + "The following environment variables are available:\n", + "\n", + "* `SH_CLIENT_ID`, `SH_INSTANCE_ID`, `SH_CLIENT_NAME`, `SH_CLIENT_SECRET`\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from edc import check_compatibility\n", + "check_compatibility(\"user-0.24.5\", dependencies=[\"SH\"])" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "557aeb71", + "metadata": { + "execution": { + "iopub.execute_input": "2021-06-28T17:20:17.318115Z", + "iopub.status.busy": "2021-06-28T17:20:17.317199Z", + "iopub.status.idle": "2021-06-28T17:20:20.283189Z", + "shell.execute_reply": "2021-06-28T17:20:20.284178Z" + }, + "papermill": { + "duration": 2.987778, + "end_time": "2021-06-28T17:20:20.284387", + "exception": false, + "start_time": "2021-06-28T17:20:17.296609", + "status": "completed" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "id": "ad44255a", + "metadata": { + "tags": [ + "papermill-error-cell-tag" + ] + }, + "source": [ + "Execution using papermill encountered an exception here and stopped:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "67dfee78", + "metadata": { + "execution": { + "iopub.execute_input": "2021-06-28T17:20:20.338696Z", + "iopub.status.busy": "2021-06-28T17:20:20.337473Z", + "iopub.status.idle": "2021-06-28T17:20:20.521518Z", + "shell.execute_reply": "2021-06-28T17:20:20.520025Z" + }, + "papermill": { + "duration": 0.217632, + "end_time": "2021-06-28T17:20:20.521865", + "exception": true, + "start_time": "2021-06-28T17:20:20.304233", + "status": "failed" + }, + "tags": [] + }, + "outputs": [ + { + "ename": "ImportError", + "evalue": "Failed to import any qt binding", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mget_ipython\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_line_magic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'matplotlib'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'qt'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpyplot\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmpl_toolkits\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmplot3d\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/IPython/core/interactiveshell.py\u001b[0m in \u001b[0;36mrun_line_magic\u001b[0;34m(self, magic_name, line, _stack_depth)\u001b[0m\n\u001b[1;32m 2346\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'local_ns'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_local_scope\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstack_depth\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2347\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbuiltin_trap\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2348\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2349\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2350\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/decorator.py\u001b[0m in \u001b[0;36mfun\u001b[0;34m(*args, **kw)\u001b[0m\n\u001b[1;32m 230\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mkwsyntax\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 231\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkw\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfix\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkw\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msig\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 232\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mcaller\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mextras\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 233\u001b[0m \u001b[0mfun\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__name__\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__name__\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 234\u001b[0m \u001b[0mfun\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__doc__\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__doc__\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/IPython/core/magic.py\u001b[0m in \u001b[0;36m\u001b[0;34m(f, *a, **k)\u001b[0m\n\u001b[1;32m 185\u001b[0m \u001b[0;31m# but it's overkill for just that one bit of state.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 186\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mmagic_deco\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 187\u001b[0;31m \u001b[0mcall\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 188\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 189\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcallable\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/IPython/core/magics/pylab.py\u001b[0m in \u001b[0;36mmatplotlib\u001b[0;34m(self, line)\u001b[0m\n\u001b[1;32m 97\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Available matplotlib backends: %s\"\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0mbackends_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 98\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 99\u001b[0;31m \u001b[0mgui\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbackend\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshell\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0menable_matplotlib\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgui\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlower\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgui\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgui\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 100\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_show_matplotlib_backend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgui\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbackend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 101\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/IPython/core/interactiveshell.py\u001b[0m in \u001b[0;36menable_matplotlib\u001b[0;34m(self, gui)\u001b[0m\n\u001b[1;32m 3528\u001b[0m \u001b[0mgui\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbackend\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfind_gui_and_backend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpylab_gui_select\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3529\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3530\u001b[0;31m \u001b[0mpt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mactivate_matplotlib\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbackend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3531\u001b[0m \u001b[0mconfigure_inline_support\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbackend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3532\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/IPython/core/pylabtools.py\u001b[0m in \u001b[0;36mactivate_matplotlib\u001b[0;34m(backend)\u001b[0m\n\u001b[1;32m 322\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpyplot\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 323\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 324\u001b[0;31m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mswitch_backend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbackend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 325\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 326\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshow\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_needmain\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/matplotlib/pyplot.py\u001b[0m in \u001b[0;36mswitch_backend\u001b[0;34m(newbackend)\u001b[0m\n\u001b[1;32m 275\u001b[0m \u001b[0mbackend_name\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcbook\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_backend_module_name\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnewbackend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 276\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 277\u001b[0;31m \u001b[0;32mclass\u001b[0m \u001b[0mbackend_mod\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackend_bases\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_Backend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 278\u001b[0m \u001b[0mlocals\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvars\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mimportlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mimport_module\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbackend_name\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 279\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/matplotlib/pyplot.py\u001b[0m in \u001b[0;36mbackend_mod\u001b[0;34m()\u001b[0m\n\u001b[1;32m 276\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 277\u001b[0m \u001b[0;32mclass\u001b[0m \u001b[0mbackend_mod\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackend_bases\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_Backend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 278\u001b[0;31m \u001b[0mlocals\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvars\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mimportlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mimport_module\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbackend_name\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 279\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 280\u001b[0m \u001b[0mrequired_framework\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_get_required_interactive_framework\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbackend_mod\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/importlib/__init__.py\u001b[0m in \u001b[0;36mimport_module\u001b[0;34m(name, package)\u001b[0m\n\u001b[1;32m 125\u001b[0m \u001b[0;32mbreak\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0mlevel\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 127\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m_bootstrap\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_gcd_import\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mlevel\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpackage\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlevel\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 128\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 129\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/importlib/_bootstrap.py\u001b[0m in \u001b[0;36m_gcd_import\u001b[0;34m(name, package, level)\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/importlib/_bootstrap.py\u001b[0m in \u001b[0;36m_find_and_load\u001b[0;34m(name, import_)\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/importlib/_bootstrap.py\u001b[0m in \u001b[0;36m_find_and_load_unlocked\u001b[0;34m(name, import_)\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/importlib/_bootstrap.py\u001b[0m in \u001b[0;36m_load_unlocked\u001b[0;34m(spec)\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/importlib/_bootstrap_external.py\u001b[0m in \u001b[0;36mexec_module\u001b[0;34m(self, module)\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/importlib/_bootstrap.py\u001b[0m in \u001b[0;36m_call_with_frames_removed\u001b[0;34m(f, *args, **kwds)\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/matplotlib/backends/backend_qt5agg.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mcbook\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mbackend_agg\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mFigureCanvasAgg\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 11\u001b[0;31m from .backend_qt5 import (\n\u001b[0m\u001b[1;32m 12\u001b[0m \u001b[0mQtCore\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mQtGui\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mQtWidgets\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_BackendQT5\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFigureCanvasQT\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFigureManagerQT\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m NavigationToolbar2QT, backend_version)\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/matplotlib/backends/backend_qt5.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0m_Backend\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFigureCanvasBase\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFigureManagerBase\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mNavigationToolbar2\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 12\u001b[0m TimerBase, cursors, ToolContainerBase, StatusbarBase, MouseButton)\n\u001b[0;32m---> 13\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackends\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mqt_editor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfigureoptions\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mfigureoptions\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 14\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackends\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mqt_editor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_formsubplottool\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mUiSubplotTool\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mqt_compat\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/matplotlib/backends/qt_editor/figureoptions.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mcbook\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcolors\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mmcolors\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmarkers\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mimage\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mmimage\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 11\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackends\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mqt_compat\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mQtGui\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 12\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackends\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mqt_editor\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0m_formlayout\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/conda/envs/eurodatacube-0.24.5/lib/python3.8/site-packages/matplotlib/backends/qt_compat.py\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 177\u001b[0m \u001b[0;32mbreak\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 178\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 179\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mImportError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Failed to import any qt binding\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 180\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;31m# We should not get there.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 181\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mAssertionError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Unexpected QT_API: {}\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mQT_API\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mImportError\u001b[0m: Failed to import any qt binding" + ] + } + ], + "source": [ + "%matplotlib qt\n", + "import pandas as pd\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "from mpl_toolkits import mplot3d\n", + "import seaborn as sns\n", + "plt.rc('figure',figsize=(10,8))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "afc7abd6", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "df = pd.read_csv(r\"D:\\Tokyo, TSM_2021-06-21_JP07-N3b.csv\")\n", + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3a640864", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "df['time'] = pd.to_datetime(df['time'])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "beb6a521", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "df.info()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a84a1057", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "df.describe()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1fac00f8", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "df.columns" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "da8a2866", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cc907990", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "# Convert date to int\n", + "#df[\"time\"] = pd.to_datetime(df[\"time\"]).dt.strftime(\"%Y%m%d\")\n", + "df['time'] = pd.to_numeric(df.time.str.replace('-',''))\n", + "print(df['time'])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bbb6f411", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "time = df[\"time\"]\n", + "measurement= df[\"measurement\"]\n", + "long_1=df[\"Longitude\"]\n", + "lat=df[\"Latitude\"]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7e5cfb06", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "print(time)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fb221595", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "fig = plt.figure()\n", + "ax1 = fig.add_subplot(111,projection = \"3d\")\n", + "xpos = long_1\n", + "ypos = lat\n", + "zpos = measurement\n", + "\n", + "dx = time\n", + "dy = np.ones(93)\n", + "dz = np.ones(93)\n", + "\n", + "ax1.bar3d(xpos, ypos, zpos, dx, dy, dz, color=\"#00ceaa\", shade= True)\n", + "ax1.set_xlabel(\"Longitude\")\n", + "ax1.set_ylabel(\"Latitude\")\n", + "ax1.set_zlabel(\"Measurement\")\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dd528006", + "metadata": { + "papermill": { + "duration": null, + "end_time": null, + "exception": null, + "start_time": null, + "status": "pending" + }, + "tags": [] + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "interpreter": { + "hash": "f7497bbdf9b17297f5881f7cace63ab96967d00c733902badb5c9c800271cd50" + }, + "kernelspec": { + "display_name": "Python 3.7.9 64-bit", + "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.8.10" + }, + "papermill": { + "default_parameters": {}, + "duration": 5.220981, + "end_time": "2021-06-28T17:20:21.027568", + "environment_variables": {}, + "exception": true, + "input_path": "/tmp/tmpfj5a0j_r", + "output_path": "/tmp/notebook_output.ipynb", + "parameters": {}, + "start_time": "2021-06-28T17:20:15.806587", + "version": "2.3.3" + }, + "properties": { + "authors": [ + { + "id": "1e90517e-372c-4725-83a3-dda3beed3ddc", + "name": "mohan.kshirsagar@onmyowntechnology.com" + } + ], + "description": "First steps on the Euro Data Cube platform", + "id": "4a7cae13-d390-48db-950a-397452c25a03", + "license": null, + "name": "EDC First Steps", + "requirements": [ + "eurodatacube", + "eoxhub" + ], + "tags": [ + "EO Data", + "Getting started", + "Sentinel Hub", + "xcube" + ], + "tosAgree": true, + "type": "Jupyter Notebook", + "version": "1.0.0" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} \ No newline at end of file diff --git a/notebooks/getting-started/EDC_first-steps.ipynb b/notebooks/getting-started/EDC_first-steps.ipynb deleted file mode 100644 index 392c7bb3..00000000 --- a/notebooks/getting-started/EDC_first-steps.ipynb +++ /dev/null @@ -1,857 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-11T14:58:59.873063Z", - "iopub.status.busy": "2021-05-11T14:58:59.872452Z", - "iopub.status.idle": "2021-05-11T14:58:59.923501Z", - "shell.execute_reply": "2021-05-11T14:58:59.922910Z" - }, - "papermill": { - "duration": 0.062413, - "end_time": "2021-05-11T14:58:59.923608", - "exception": false, - "start_time": "2021-05-11T14:58:59.861195", - "status": "completed" - }, - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "This notebook is compatible with this base image version (user-0.24.5)." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/markdown": [ - "\n", - "\n", - "---------\n", - "\n", - "The following environment variables are available:\n", - "\n", - "* `SH_CLIENT_ID`, `SH_INSTANCE_ID`, `SH_CLIENT_NAME`, `SH_CLIENT_SECRET`\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "from edc import check_compatibility\n", - "check_compatibility(\"user-0.24.5\", dependencies=[\"SH\"])" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "papermill": { - "duration": 0.007248, - "end_time": "2021-05-11T14:58:59.938089", - "exception": false, - "start_time": "2021-05-11T14:58:59.930841", - "status": "completed" - }, - "tags": [] - }, - "source": [ - "# First steps on the Euro Data Cube platform\n", - "\n", - "Euro Data Cube provides a JupyterLab environment, which automatically provides **credentials** for services with **active subscriptions** as **environment variables.**" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "papermill": { - "duration": 0.008222, - "end_time": "2021-05-11T14:58:59.953326", - "exception": false, - "start_time": "2021-05-11T14:58:59.945104", - "status": "completed" - }, - "tags": [] - }, - "source": [ - "## Setup\n", - "\n", - "As you can see here, the credentials for your subscriptions are automatically part of your environment variables. \n", - "You can also print them, but make sure to **keep them confidential**!\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-11T14:58:59.970447Z", - "iopub.status.busy": "2021-05-11T14:58:59.969948Z", - "iopub.status.idle": "2021-05-11T14:58:59.972513Z", - "shell.execute_reply": "2021-05-11T14:58:59.972085Z" - }, - "papermill": { - "duration": 0.012367, - "end_time": "2021-05-11T14:58:59.972602", - "exception": false, - "start_time": "2021-05-11T14:58:59.960235", - "status": "completed" - }, - "tags": [] - }, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "import os\n", - "'SH_CLIENT_SECRET' in os.environ" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "papermill": { - "duration": 0.007371, - "end_time": "2021-05-11T14:58:59.987275", - "exception": false, - "start_time": "2021-05-11T14:58:59.979904", - "status": "completed" - }, - "tags": [] - }, - "source": [ - "Usually, it is not even necessary to access the credentials. \n", - "Many libraries such as `xcube_sh` or `xcube_geodb` load them directly from the environment by default.\n", - "\n", - "## Retrieving data\n", - "\n", - "Let's say you want to retrieve some Sentinel Data as defined by the following cube (don't worry if you don't understand all the details here, it will be explained here):" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-11T14:59:00.005525Z", - "iopub.status.busy": "2021-05-11T14:59:00.005013Z", - "iopub.status.idle": "2021-05-11T14:59:00.353022Z", - "shell.execute_reply": "2021-05-11T14:59:00.352478Z" - }, - "papermill": { - "duration": 0.358654, - "end_time": "2021-05-11T14:59:00.353132", - "exception": false, - "start_time": "2021-05-11T14:58:59.994478", - "status": "completed" - }, - "tags": [] - }, - "outputs": [], - "source": [ - "from xcube_sh.config import CubeConfig\n", - "cube_config = CubeConfig(\n", - " dataset_name=\"S2L2A\",\n", - " band_names=[\"B04\", \"B08\"],\n", - " tile_size=[512, 512],\n", - " bbox=(10.00, 54.27, 10.30, 54.50),\n", - " spatial_res=0.00018,\n", - " time_range=[\"2018-05-02\", \"2018-05-26\"],\n", - " time_period=\"3D\",\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "papermill": { - "duration": 0.007471, - "end_time": "2021-05-11T14:59:00.368117", - "exception": false, - "start_time": "2021-05-11T14:59:00.360646", - "status": "completed" - }, - "tags": [] - }, - "source": [ - "The following `xcube` call will fetch the data using your active SentinelHub subscription automatically using the credentials from the environment variables:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-11T14:59:00.385840Z", - "iopub.status.busy": "2021-05-11T14:59:00.385331Z", - "iopub.status.idle": "2021-05-11T14:59:01.419451Z", - "shell.execute_reply": "2021-05-11T14:59:01.419794Z" - }, - "papermill": { - "duration": 1.044348, - "end_time": "2021-05-11T14:59:01.419921", - "exception": false, - "start_time": "2021-05-11T14:59:00.375573", - "status": "completed" - }, - "tags": [] - }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
<xarray.DataArray 'lat' (lat: 1536)>\n",
-       "array([54.54639, 54.54621, 54.54603, ..., 54.27045, 54.27027, 54.27009])\n",
-       "Coordinates:\n",
-       "  * lat      (lat) float64 54.55 54.55 54.55 54.55 ... 54.27 54.27 54.27 54.27\n",
-       "Attributes:\n",
-       "    units:          decimal_degrees\n",
-       "    long_name:      latitude\n",
-       "    standard_name:  latitude
" - ], - "text/plain": [ - "\n", - "array([54.54639, 54.54621, 54.54603, ..., 54.27045, 54.27027, 54.27009])\n", - "Coordinates:\n", - " * lat (lat) float64 54.55 54.55 54.55 54.55 ... 54.27 54.27 54.27 54.27\n", - "Attributes:\n", - " units: decimal_degrees\n", - " long_name: latitude\n", - " standard_name: latitude" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from xcube_sh.cube import open_cube\n", - "cube = open_cube(cube_config)\n", - "cube.B04.lat" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "papermill": { - "duration": 0.00794, - "end_time": "2021-05-11T14:59:01.435926", - "exception": false, - "start_time": "2021-05-11T14:59:01.427986", - "status": "completed" - }, - "tags": [] - }, - "source": [ - "## Explicit credential handling for advanced libraries\n", - "\n", - "Some libraries such as the EO-Learn ML library do require you to set up credentials manually. Since the credentials are available using environment variables, there are different means of using them.\n", - "\n", - "If you plan to use for instance the SentinelHub command line configuration tool (as recommended by EO-learn), you can make use of the environment variable expansion of the shell:" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-11T14:59:01.455125Z", - "iopub.status.busy": "2021-05-11T14:59:01.454524Z", - "iopub.status.idle": "2021-05-11T14:59:02.695793Z", - "shell.execute_reply": "2021-05-11T14:59:02.695127Z" - }, - "papermill": { - "duration": 1.252091, - "end_time": "2021-05-11T14:59:02.695903", - "exception": false, - "start_time": "2021-05-11T14:59:01.443812", - "status": "completed" - }, - "tags": [] - }, - "outputs": [], - "source": [ - "!sentinelhub.config --sh_client_id $SH_CLIENT_ID > /dev/null" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "papermill": { - "duration": 0.008023, - "end_time": "2021-05-11T14:59:02.712064", - "exception": false, - "start_time": "2021-05-11T14:59:02.704041", - "status": "completed" - }, - "tags": [] - }, - "source": [ - "See this notebook for a complete example.\n", - "\n", - "If you need to pass the credentials in Python, the IPython magic command `%env` is a means of achieving that:" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-11T14:59:02.731378Z", - "iopub.status.busy": "2021-05-11T14:59:02.730840Z", - "iopub.status.idle": "2021-05-11T14:59:02.732449Z", - "shell.execute_reply": "2021-05-11T14:59:02.732820Z" - }, - "papermill": { - "duration": 0.01311, - "end_time": "2021-05-11T14:59:02.732926", - "exception": false, - "start_time": "2021-05-11T14:59:02.719816", - "status": "completed" - }, - "tags": [] - }, - "outputs": [], - "source": [ - "client_id = %env SH_CLIENT_ID" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "papermill": { - "duration": 0.008523, - "end_time": "2021-05-11T14:59:02.749318", - "exception": false, - "start_time": "2021-05-11T14:59:02.740795", - "status": "completed" - }, - "tags": [] - }, - "source": [ - "You can however also access the credentials using idiomatic python:" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "execution": { - "iopub.execute_input": "2021-05-11T14:59:02.776030Z", - "iopub.status.busy": "2021-05-11T14:59:02.775379Z", - "iopub.status.idle": "2021-05-11T14:59:02.777149Z", - "shell.execute_reply": "2021-05-11T14:59:02.777525Z" - }, - "papermill": { - "duration": 0.016408, - "end_time": "2021-05-11T14:59:02.777661", - "exception": false, - "start_time": "2021-05-11T14:59:02.761253", - "status": "completed" - }, - "tags": [] - }, - "outputs": [], - "source": [ - "client_id = os.environ['SH_CLIENT_ID']" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Adding custom credentials e.g. for S3 buckets\n", - "\n", - "If you want to use external services, such as Amazon S3 buckets, you can also manage the relevant credentials via the app [edc-my-credentials](https://eurodatacube.com/marketplace/apps/edc-my-credentials) on eurodatacube.com. Those credentials will be automatically injected just like for purchased services.\n", - "\n", - "[See this guide](https://eurodatacube.com/documentation/credentials-on-edc) for step by step instructions on how to add your custom credentials." - ] - }, - { - "cell_type": "markdown", - "metadata": { - "papermill": { - "duration": 0.007875, - "end_time": "2021-05-11T14:59:02.825761", - "exception": false, - "start_time": "2021-05-11T14:59:02.817886", - "status": "completed" - }, - "tags": [] - }, - "source": [ - "## Conclusion\n", - "\n", - "The Euro Data Cube platform allows you to focus on your data without needing to think about authentication and login credentials.\n", - "\n", - "You can even **share notebooks** in the Euro Data Cube marketplace without any changes required. If anyone else runs this notebook on this platform, their respective API service credentials will be used automatically." - ] - }, - { - "cell_type": "markdown", - "metadata": { - "papermill": { - "duration": 0.007938, - "end_time": "2021-05-11T14:59:02.842257", - "exception": false, - "start_time": "2021-05-11T14:59:02.834319", - "status": "completed" - }, - "tags": [] - }, - "source": [ - "To learn more about using **SentinelHub** or **GeoDB** on the Euro Data Cube platform, check out **these notebooks** in the marketplace." - ] - } - ], - "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.8.5" - }, - "papermill": { - "duration": 5.071222, - "end_time": "2021-05-11T14:59:04.148366", - "environment_variables": {}, - "exception": null, - "input_path": "/tmp/tmp8bcmj5a0", - "output_path": "/tmp/cur_notebook.ipynb", - "parameters": {}, - "start_time": "2021-05-11T14:58:59.077144", - "version": "2.1.0" - }, - "properties": { - "description": "First steps on the Euro Data Cube platform", - "id": "4a7cae13-d390-48db-950a-397452c25a03", - "license": null, - "name": "EDC First Steps", - "requirements": [ - "eurodatacube" - ], - "tags": [ - "EO Data", - "Getting started", - "Sentinel Hub", - "xcube" - ], - "tosAgree": true, - "type": "Jupyter Notebook", - "version": "0.2.0" - }, - "pycharm": { - "stem_cell": { - "cell_type": "raw", - "metadata": { - "collapsed": false - }, - "source": [] - } - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}