Geospatial Cloud Computing with the GEE Python API - Part 2
Earth Engine: https://earthengine.google.com
Geemap: https://geemap.org
Introduction
This notebook contains the materials for the first part of the workshop Geospatial Cloud Computing with the GEE Python API at the University of Alaska Fairbanks.
This workshop provides an introduction to cloud-based geospatial analysis using the Earth Engine Python API. Attendees will learn the basics of Earth Engine data types and how to visualize, analyze, and export Earth Engine data in a Jupyter environment with geemap. In addition, attendees will learn how to develop and deploy interactive Earth Engine web apps with Python. Through practical examples and hands-on exercises, attendees will enhance their learning experience. During each hands-on session, attendees will walk through Jupyter Notebook examples on Google Colab with the instructors. At the end of each session, they will complete a hands-on exercise to apply the knowledge they have learned.
Agenda
The workshop is divided into three parts. The second part will cover the following topics:
Processing of vector data (shapefiles, json, conversion from one format to another)
Processing of raster data: extract pixel value, raster calculator, zonal statistics etc.
Working with local geospatial data in Geemap
Accessing Cloud Optimized GeoTIFF
Exporting EE Image and Feature data
Creating timelapse animations using Landsat or Sentinel 2 for Alaska
Time series analysis: Forest cover change for a test site in Alaska (e.g. Bonanza Creek LTER or Caribou-Poker Creeks Research Watershed)
Prerequisites
To use geemap and the Earth Engine Python API, you must register for an Earth Engine account and follow the instructions here to create a Cloud Project. Earth Engine is free for noncommercial and research use. To test whether you can use authenticate the Earth Engine Python API, please run this notebook on Google Colab.
Technical requirements
Install packages
Import libraries
Processing of vector data
From GeoJSON
From Shapefile
From GeoDataFrame
To GeoJSON
To Shapefile
To GeoDataFrame
To DataFrame
To CSV
Processing of raster data
Extract pixel values
Extracting values to points
Extracting pixel values along a transect
Zonal statistics
Zonal statistics with an image and a feature collection
Zonal statistics by group
Zonal statistics with two images
Map algebra
Exercise 1 - Zonal statistics
Find out which state has the highest mean temperature in the United States on June 28, 2023. Relevant Earth Engine assets:

Working with local geospatial data
Raster data
Single-band raster
Multi-band raster
Vector data
GeoJSON
Shapefile
GeoDataFrame
GeoPackage
CSV to vector
Accessing Cloud Optimized GeoTIFFs
COG
SpatioTemporal Asset Catalog (STAC)
Exporting Earth Engine data
Exporting images
Add a Landsat image to the map.
Add a rectangle to the map.
To local drive
Check image projection.
Specify region, crs, and crs_transform.
To Google Drive
Exporting image collections
To local drive
To Google Drive
Exporting feature collections
To local drive
To Google Drive
Creating timelapse animations
Landsat timelapse
Pan and zoom the map to an area of interest. Use the drawing tools to draw a rectangle on the map. If no rectangle is drawn, the default rectangle shown below will be used.
Sentinel-2
Pan and zoom the map to an area of interest. Use the drawing tools to draw a rectangle on the map. If no rectangle is drawn, the default rectangle shown below will be used.
MODIS
MODIS vegetation indices
MODIS temperature
GOES
Exercise 2 - Creating timelapse animations
Use the geemap timelapse GUI to create a timelapse animation for any location of your choice. Share the timelapse on social media and use the hashtagd such as #EarthEngine and #geemap. See this example.

Time series analysis
Visualizing forest cover
We will use the Hansen Global Forest Change v1.10 (2000-2022) dataset.
Select the imagery for 2000.
Select the imagery for 2022.
Select the tree cover imagery for 2000.
Extract tree cover 2000 by using the threshold of 10%.
Visualizing forest gain and loss
Visualize forest loss.
Compare forest loss and gain.
Calculating forest cover change
Compute zonal statistics to find out which county in Alaska has the largest forest area in 2000.
Add a county boundary layer to the map.
Compute zonal statistics by county.
Create a pie chart to visualize the forest area by county.
Create a bar chart to visualize the forest area by county.
Calculate the forest loss area by county.
Create a bar chart to visualize the forest loss area by county.
Create a bar chart to visualize the forest loss area by county.
Exercise 3 - Analyzing forest cover gain and loss
Find out which US state has the largest forest gain and loss between 2000 and 2022. Create pie charts and bar charts to show the results. Relevant Earth Engine assets:
