A Brief Foray into Google Earth Engine: Calculate NDVI from the Cloud

Google Earth Engine (GEE) is a cloud-based platform for planetary-scale environmental data analysis which uses a JavaScript API and an online IDE code editor. In short, you can utilize remotely sensed imagery available in Google’s cloud to run analyses without downloaded the data to your local machine. You’ll need to sign up as a developer to gain access here.

Below is an example from an upcoming lecture to the Anthropology and Geography group of the Social Sciences Department at Cal Poly University. In my talk I showed an example of the Normalized Difference Vegetation Index for Cal Poly’s campus. Here I’ll demonstrate the workflow I used to create NDVI using GEE with data from the cloud.

To execute the example below, please download the campus shapefile here (originally obtained from the campus website). You’ll need to upload the shapefile into GEE using these instructions (see the “Uploading table assets” section) and load the data into your script using these instructions (see the “Importing assets to your script” section). If you’d like to run the example without downloading campus data, skip to the second code block below.

Copy and paste the following code into the Code Editor of GEE:

NDVI derived from color-infrared aerial photos for Cal Poly’s campus. The code block above will produce this image in Google Earth Engine. Dark green pixels indicate high values of NDVI; orange/red pixels indicate low values; grey pixels indicate a mask (values below -0.25).

The code below does not require download of any campus data; however, it will calculate NDVI over the entire extent as opposed to the campus extent in the example above. Copy and paste the following code into the Code Editor of GEE:



RasterViz in R: Drought Anomalies on California’s Central Coast

Below is a brief example of raster visualization in R. It is a more thorough explanation of an example of rasterVIS that I will use in an upcoming lecture to the Anthropology and Geography group of the Social Sciences Department at Cal Poly University. The goal is to gain a brief understanding on vegetation productivity dynamics in the vicinity of San Luis Obispo and the Central Coast using remote sensing and R. I’ve selected 17 HUC 10 watersheds from the National Hydrography Dataset as the area of interest.

We know when the drought hit at a statewide level from the US Drought Monitor. Now let’s use satellite data and R to visualize the drought at a local scale using a reproducible example in R.

Data from US Drought Monitoring Center indicates the Central Coast did not experience drought conditions in mid-August of 2006 (left); whereas it experienced exceptional drought in mid-August of 2014 (right).

I used eMODIS (EROS Moderate Resolution Imaging Spectroradiometer) data to characterize the NDVI derived productivity of the AOI during the month of August. eMODIS is a standardized product which uses MODIS surface reflectance from a 7-day composite period (Brown et al. 2015). I used all eMODIS images from August during the period 2000 through 2016 to calculate the 17-year August mean. I then calculated August productivity anomalies for a dry year (2014) and an average year (2006) to identify the spatial and temporal variability in productivity within the watershed.

To execute the example below, please download the data here. I have not included the base data or code to calculate the global mean and annual anomalies.

Load the required packages in R (note: the Rcolorbrewer library is loaded with the rasterVis library).

Load the required data:

Plot the mean productivity for August (2000-2016):

Note: the NDVI values are scaled by a value of 10000. The gray graphics along the top and left axes represent the mean of the row (right) and column (top) values.

Plot the 2014 and 2006 August productivity anomalies:

Compare drought-year anomalies (top) with average-year anomalies (bottom). The anomalies are analogous to Z-scores and were calculated as the deviation from mean, normalized by the standard deviation. These maps clearly indicate that the majority of the area experienced very strong negative anomalies (dark red) in 2014 and a mix of positive (blue) and subtle negative anomalies (light red) in 2006.

Literature Cited

Brown, J. F., D. Howard, B. Wylie, A. Frieze, L. Ji, and C. Gacke. 2015. Application-ready expedited MODIS data for operational land surface monitoring of vegetation condition. Remote Sensing 7:16226–16240.

*Banner image: MODIS image of central California from NASA Earth Observatory.

Presentation at the WYOMING-TWS Meeting

I will present research on drought-induced variability of sagebrush ecosystem productivity in the Upper Green River Basin at the Wyoming Chapter of The Wildlife Society Annual Meeting in Jackson, WY. My presentation is part of the session entitled: Grassland & Sagebrush Environments. We think this work is noteworthy because it deals with an important disturbance (drought) in an important habitat in the West (the Sagebrush Sea). Such a disturbance can have cascading effects on scores of species that live in the sagebrush ecosystem. The project could not have come to fruition without the collaboration of my partners at the Wyoming Game and Fish and the Natural Resources Conservation Service and funding from the Wyoming Landscape Conservation Initiative. I hope to submit the manuscript for publication shortly.

*Banner image: the Sagebrush Sea at the foot of the Wind River Mountains, Wyoming.

Call for Papers: Bark Beetle Epidemics – causes and consequences

The open access journal Forests has a call for papers related to the causes and consequences of bark beetle epidemics on tree, forest and ecosystem processes. Papers that identify environmental or ecological factors that contributed to the recent epidemic, describe mountain pine beetle impacts on ecosystem processes or identify management opportunities that may prevent or limit the extent of future outbreaks are encouraged. The call is open to a wide variety of subjects including experimental, monitoring and modeling approaches that further our understanding of the causes and consequences of large scale bark beetle epidemics. Full details can be found here.

Deadline for manuscript submissions: 10 June 2018

Dr. Robert M. Hubbard, USDA, Forest Service
Guest Editor
*Banner image: beetle-induced forest mortality on Pine Mountain, Wyoming.

New paper on spruce-beetle outbreak and high-severity wildfire

Our new paper, lead by my colleagues at Colorado State University and published in the journal PLOS ONE,  investigates the short-term compounded effects of spruce beetle and wildfire in subalpine forests in southwestern Colorado. We think this work is noteworthy because areas that were more heavily affected by spruce beetle corresponded to reduced post-fire vegetation. These results suggest vegetation recovery processes may be negatively impacted by severe spruce beetle outbreaks occurring within a decade of stand-replacing fire. Much of the current subalpine forest in this region has been impacted by recent beetle outbreaks. In the future, these areas could experience higher burn severity which has important implications for the structure and composition of future forests.

*Banner image: beetle-induced tree mortality photographed on Little Mountain, Wyoming.

Presentation at the Ecological Society of America 2017 Meeting

I will present research of burn severity controls on post-fire Araucaria-Nothofagus regeneration in the Andean Cordillera at the ESA annual meeting in Portland, OR. My talk is part of the session entitled: (COS 153) – Communities: Spatial Patterns and Environmental Gradients on Thursday afternoon (2:10 pm), August 10th, in the Oregon Convention Center, C120-121.


Burn severity and post-fire regeneration in Chilean AraucariaNothofagus forest (COS 153 – 3)

Araucaria forest mortality in Tolhuaca National Park from the 2002 wildfire. Photo taken in March 2012.

New Paper on Grazing and Sage-grouse

Our new paper, lead by my colleagues at Colorado State University and published in the journal Ecological Applications,  evaluates responses of sage-grouse population trends to the timing and level of grazing at broad spatial and temporal scales. We think this work is noteworthy because it deals with both an important species in the West (Greater Sage-grouse) and an important land-use related to livelihoods (grazing). The work could not have been accomplished without the use of two open data sources: 1) grazing records from the Bureau of Land Management, and 2) productivity data derived from the MODIS archive.

*Banner image: sage-grouse (center of image) photographed on Seedskadee National Wildlife Refuge, Wyoming.

Call for Papers: Remote Sensing of Vegetation Parameters

The open access journal Forests has a call for papers related to remote sensing of leaf area index and other vegetation parameters. The call is open to a wide variety of applications including ecology, agriculture, forestry, food security, etc. Full details can be found here.

Deadline for manuscript submissions: 15 April 2018

Dr. Javier García-Haro
Prof. Dr. Hongliang Fang
Prof. Dr. Juan Manuel Lopez-Sanchez
Guest Editors

*Banner image: aspen canopy on Cold Spring Mountain, Colorado.

Call for Papers: Remote Sensing of Wildfire

The open access journal Remote Sensing has a call for papers related to remote sensing of wildfire. The topics of interest are diverse, ranging from wildfire risk to the ecological effects of fire. Full details can be found here.

Deadline for manuscript submissions: 30 June 2018

Wildfires (which include forest fires, grass fires, brush fires, bush fires, and peat fires, among others) are an integral part of so many ecosystems across the world. In general, these fires are primarily viewed negatively despite their favorable contributions. Here, the purpose is to gather scientists/researchers related to this topic, aiming to highlight ongoing research investigations and new applications in the field. In this framework, the editors of this Special Issue would like to invite both applied and theoretical research contributions; submissions of original works furthering knowledge concerned with any aspect of the use of remote sensing in wildfires. Note that these manuscripts must be, not only unpublished, but also not under consideration for potential publication elsewhere. In addition, the manuscripts must employ one of the following remote sensing data types: Optical, thermal, hyperspectral, active and passive microwave acquired by either airborne or spaceborne remote sensing platforms, dealing with wildfires. The topics of interest include, but not limited to:

  • Comprehending of the pre-fire conditions,
  • Forecasting of wildfire danger/risk,
  • Modelling of wildfire behavior,
  • Fighting the wildfire,
  • Modelling prescribed burning,
  • Relation between vegetation phenology and fire,
  • Monitoring of the vegetation recovery following the fire events,
  • Mapping of burn area and ecological impacts,
  • Modelling of smoke propagation, and
  • Analyzing of historical fire regimes, among others.

Dr. Quazi K. Hassan
Dr. George P. Petropoulos
Guest Editors

*Banner image: Landsat 8 image of the Sand Fire in southern California from NASA Earth Observatory.

Stratified random sampling for Landscape Analysis

Random sampling is common in ecology. We often stratify the sample to ensure an equal (or minimum) amount of plots fall within some category (e.g. soils, elevation, cover type, etc.) that is meaningful to the central question of the study. Ecologists often stratify their study area based on landscape facets (Assal et al. 2014). Furthermore, it can be advantageous to use this approach when working with remotely sensed covariates, as segregating the landscape into sub-regions of similar biophysical characteristics can isolate spectral gradients (Homer et al. 2004)

This can be accomplished very efficiently using a raster-based approach in R. In this example, I will randomly sample 5 cells in three strata, then obtain the coordinates of the cell centroid and convert the points to a SpatialPointsDataFrame using the raster library. The code below is very basic, but it can be modified to work with any discrete raster that represents the complex landscape facets of interest.

Plot of a continuous raster layer.

Plot of reclassified raster into three strata (white, yellow, green).

Plot of reclassified raster with sample points.

The sample points can now be projected and/or exported to another format (e.g. shapefile) for further analysis.

Literature Cited

Assal, T.J., Sibold, J., and R. Reich. 2014. Modeling a Historical Mountain Pine Beetle Outbreak Using Landsat MSS and Multiple Lines of Evidence. Remote Sensing of Environment 155:275-288. 

Homer, C., Huang, C., Yang, L., Wylie, B., & Coan, M. 2004. Development of a 2001 Na- tional Land-Cover Database for the United States. Photogrammetric Engineering & Remote Sensing 70:829-840.

research in spatial ecology