{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Session 2 Solution - Loading data exercise" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Set up notebook" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load packages and functions" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/env/lib/python3.6/site-packages/geopandas/_compat.py:88: UserWarning: The Shapely GEOS version (3.7.2-CAPI-1.11.0 ) is incompatible with the GEOS version PyGEOS was compiled with (3.9.1-CAPI-1.14.2). Conversions between both will be slow.\n", " shapely_geos_version, geos_capi_version_string\n" ] } ], "source": [ "%matplotlib inline\n", "\n", "import datacube\n", "\n", "from deafrica_tools.plotting import rgb\n", "from deafrica_tools.plotting import display_map" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Connect to the datacube" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/env/lib/python3.6/site-packages/datacube/drivers/postgres/_connections.py:87: SADeprecationWarning: Calling URL() directly is deprecated and will be disabled in a future release. The public constructor for URL is now the URL.create() method.\n", " username=username, password=password,\n" ] } ], "source": [ "dc = datacube.Datacube(app=\"Load_data\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load Landsat 8 data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Set area of interest and view on map" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "