This tutorial was developed using a real-world use case for a project being completed by the NASA DEVELOP Node at the Marshall Space Flight Center. NASA Develop is a program aimed at integrating NASA Earth observations with society to foster future innovation and cultivate the professionals of tomorrow by addressing diverse environmental issues today.
The example use case comes from a project titled, "Utilizing NASA Earth Observations to Assess Coastline Replenishment Initiatives and Shoreline Risk along Delaware's Coasts". The group is partnering with the Delaware Department of Natural Resources and Environmental Control, Division of Watershed Stewardship for this project. The goals for the project include to identify areas of current and potential shoreline loss along the coast of Delaware, assess the current restoration efforts, and create time-series coastline maps.
To access AρρEEARS, visit: https://lpdaacsvc.cr.usgs.gov/appeears/
Throughout the exercise, specific sections of the API documentation can be accessed by clicking the hyperlinked text.
It is recommended to use Conda, an environment manager to set up a compatible Python environment. Download Conda for your OS here: https://www.anaconda.com/download/. Once you have Conda installed, Follow the instructions below to successfully setup a Python environment on MacOS or Windows.
This Python Jupyter Notebook tutorial has been tested using Python versions 3.6, 3.6.6 and 3.7.
Conda was used to create the python environment.
conda env create -f environment.yml
conda create -n ardtutorial python=3.6
conda update -n base -c defaults conda
conda config --add channels conda-forge
conda install requests
conda install pandas
conda install geopandas
conda install xarray
conda install numpy
conda install netcdf4
conda install holoviews
conda install -c pyviz hvplot
If you encounter an issue downloading hvplot using conda, try
pip install pyviz hvplot
Once you are signed in, click the Manage User icon in the top right portion of the AρρEEARS landing page screen and select Settings.
Select the Enable API box to gain access to the AρρEEARS API.
To submit a request, you must first login to the AρρEEARS API using your Earthdata login credentials. We’ll use the
getpasspackage to conceal our Earthdata login username and password. When executed, the code below will prompt you to enter your username followed by your password and store them as variables.
# Import required Python packages import requests import getpass import time import os import cgi import json import pandas as pd import geopandas as gpd import xarray import numpy as np import hvplot.xarray import holoviews as hv