{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Spectral Products: Vegetation, Water, Urbanization" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Supress Warning \n", "import warnings\n", "warnings.filterwarnings('ignore')\n", "\n", "# Load Data Cube Configuration\n", "import datacube\n", "dc = datacube.Datacube(app = 'my_app')\n", "\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline\n", "import numpy as np \n", "import xarray as xr \n", "\n", "# Import Data Cube API\n", "import utils.data_cube_utilities.data_access_api as dc_api \n", "api = dc_api.DataAccessApi()" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "## LS8 Caqueta\n", "# Latitude: (0.000134747292617865, 1.077843593651382) \n", "# Longitude: (-74.91935994831539, -73.30266193148462) \n", "# '2013-04-13', '2018-03-26'\n", "# Resolution: (-0.000269494585236, 0.000269494585236)\n", "\n", "## LS8 Vietnam\n", "# Latitude: (10.513927001104687, 12.611133863411238) \n", "# Longitude: (106.79005909290998, 108.91906631627438) \n", "# '2014-01-14', '2016-12-21'\n", "# Resolution: (-0.000269494585236, 0.000269494585236)\n", "\n", "## LS7 Caqueta\n", "# Latitude: (0.000134747292617865, 1.077843593651382) \n", "# Longitude: (-74.91935994831539, -73.30266193148462) \n", "# '1999-08-21', '2018-03-25'\n", "# Resolution: (-0.000269494585236, 0.000269494585236)\n", "\n", "## LS7 Lake Baringo\n", "# Latitude: (0.4997747685, 0.7495947795) \n", "# Longitude: (35.9742163305, 36.473586859499996) \n", "# '2005-01-08', '2016-12-24'\n", "# Resolution: (-0.000269493, 0.000269493)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# CHANGE HERE >>>>>>>>>>>>>>>>>\n", "\n", "# Select a Product and Platform\n", "# product = ls7_collection1_AMA_ingest\n", "# platform = \"LANDSAT_7\"\n", "product = 'ls8_collection1_AMA_ingest'\n", "platform = \"LANDSAT_8\"\n", "\n", "output_crs = 'EPSG:4326'\n", "resolution = (-0.000269494585236, 0.000269494585236)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# CHANGE HERE >>>>>>>>>>>>>>>>>>\n", "# Select an analysis region (Lat-Lon) within the extents listed above. \n", "# HINT: Keep your region small (<0.5 deg square) to avoid memory overload issues\n", "# Select a time period (Min-Max) within the extents listed above (Year-Month-Day)\n", "# This region and time period will be used for the cloud assessment\n", "\n", "#Sub-region selection\n", "# LS7 Lake Baringo\n", "#latitude = (0.49964002, 0.76)\n", "#longitude = (36.0, 36.16)\n", "#time_extents = ('2015-01-01', '2018-01-01')\n", "\n", "#LS8 Vietnam\n", "latitude = (11.3124, 10.9124)\n", "longitude = (106.9170, 107.3170) \n", "time_extents = ('2014-01-01', '2016-01-01')" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/html": [ "