Last October (2018) I was speaking with a Google Earth Engineer. We were discussing an array of Geo technologies used in the classroom from ESRI’s ArcGIS to QGIS to My Maps and Google Earth. Somehow, we got on the topic of Google Earth Engine and the engineer suggested that there were enough demos out in the wild that I should be able to hack something together. Therefore, during the winter break I put together my first Google Earth Engine app.

What is Google Earth Engine?

First, and most confusing, is that Google Earth Engine is not Google Earth. Most educator’s experience with an Earth Engine app is Google’s TimelapseTimelapse is super cool! Think of it like this: Imagine you took a selfie of yourself every day for a year. Then have a machine, or a lot of machines in my case, analyze each pixel in every image for the best and clearest pixel for that location. Then create a mosaic of with the best pixels of you.  No sleepy eyes, weird smiles, bad hair, scrunched up face etc. This is what Google Timelapse does for the earth. A picture-perfect world with no clouds, haze, smoke, shadows etc. The cool thing is that Google has compiled this, plus more, datasets and allows users to create apps using varying sensors.

Embedded Google Timelapse Shenzhen, Guangdong, China

The ‘Experimental’ product One of the datasets Google has made available via Earth Engine is TerraClimate, a monlthly climate database for terrestrial surfaces. . The temporal range of this dataset is from January 1958 to ‘Present’. That is 60 years of climate data! While there are several data series (bands) in this dataset to map, I chose to map monthly mean max temperature and precipitation accumulation. Like, the project got a bit out of hand.

First curiosity – How do you work this thing?

I can’t even pretend to tell you how the backend of this thing works. However, if you know a bit of JavaScript, the front end is not terrible.  It was also very helpful to have some experience with the Google Maps API. After signing up for an Earth Engine account, users create using the built-in code editor. The editor is simple enough. Left panel options include user scripts/example scripts, documentation, and assets. Center panel is the code editor. Right panel is the ‘console log’ panel. From there you load a dataset and create. Please note…the video below is an overview and not a tutorial.

Second curiosity – Can there be a way to easily flip through 60 years of maps?

Short answer, yes…add a dropdown menu option.

Use dropdown to select a year from 1958 to 2018

Third curiosity – Can I add legends?


Legends boxed in red

Fourth curiosity – Need an opacity slider…wonder if there is one built in because the Maps API can do it?

Sure is.

Opacity slider example video

Fifth curiosity – Wouldn’t it be cool to add a line graph for monthly temperature and bar graph for precipitation for almost any land surface on Earth?

Hell Yes! Plus watch these!

Looking at charts and getting data (**No need to calculate scale anymore*)

Part I: Using charts within Earth Engine Application

A little math and spreadsheet lesson (*No need to calculate scale anymore*)

Part II: Unit Conversions

Sixth curiosity – It would be cool to compare strong El Nino and La Nina precipitation patterns. Therefore, they needed to be labeled in the dropdown menu.

Seventh curiosity – Now that I see these El Nino/La Nina patterns, there should be some elevation data too. Check….Thankfully, Earth Engine also has DEM data from the USGS.

Elevation layer with marker on Himalayas

Lastly, how to share? Earth Engine has a built in create/share app function. It uses Google Cloud Platform (GCP). Thankfully I use GCP for, so setup was easy.

It took a couple, maybe four, days to learn and create. As I always say, I code like a five-year-old, but here is 60 years of monthly temperature and precipitation data. Plus elevation.

Challenges | Issues

1. Mashing together the Google Maps API with Google Charts is not easy. I wish I had more experience. For example, the temperature’s scale is 0.1 so the viewer must move the decimal over. Would prefer to calculate the math within the chart api. I am sure there is a way. I just don’t know it…yet. Figured it out!

2. When app is in an Iframe of a page the ‘greedy’ mouse wheel zoom breaks. Therefore, users have to hold ‘ctrl’ wheel scroll to zoom in and out.

3. The exported app is not smarty phone friendly.

4. Lastly, My grandfather used to always say how he, “was one stripped screw from be a mechanic.” My version is that I am one out of scope var from being a web designer. I ended up coding everything in notepad++ and copy/pasting into the code editor. Let’s just say my eyes are wiser than they used to be?