Visualizing Air Pollution over Houston, TX

Intro

Satellites track more than just the weather. In an upcoming class project, I’m going to be working with Google Earth Engine to combine various open-source satellite datasets for predictive analysis, so I wanted to spend a little time getting more familiar with the platform. Google Earth Engine is an incredible tool that pulls open-source datasets directly from Google Cloud, reducing the friction for combining geospatial datasets from different organizations. You can even add your own dataset to customize your analysis.

In this demo, I will show how to visualize nitrogen dioxide (a common pollutant) for a particular area of interest (in my case, Houston, TX). To do this, I’m following along with this article. What makes Google Earth Engine such a good tool is that this can be done with only 6 lines of code. To do this same visualization in python would take me several hours.

Demo

I first uploaded the shape file for the geographical coordinates of the boundaries of Houston and added this external dataset to as a new layer for the visualization.

Map.addLayer(Houston,{},"Houston");

I then referenced the Sentinel-5P NO2 dataset and filtered for all the data in this year.

var no2 = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_NO2').select('tropospheric_NO2_column_number_density').filterDate('2021-01-01', '2021-09-03');

This is another feature that makes Google Earth Engine really interesting. Open-source satellite datasets are typically pretty clunky. They are large, difficult to download and are in a diverse array of file or compression formats. But in Google Earth Engine, all of the major publicly available satellite datasets are available with a simple unique identifier. In this case: ‘COPERNICUS/S5P/OFFL/L3_NO2’. The entire catalogue of datasets available on the platform can be found here: https://developers.google.com/earth-engine/datasets/catalog

I then took the average of the NO2 values over this time period.

var no2_data = no2.mean();

Then, “clipped” the dataset to the `Houston` layer that I added in the first line. If I didn’t include this line, Google Earth Engine would attempt to execute the procedure for the entire dataset. The previous line reduced my dataset in the time domain. This line reduces the dataset in the spatial domain.

var study_area = no2_data.clip(Houston);

Then I manually set the color map for visualization.

var band_viz = { min: 0,  max: 0.00012,  palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red'] };

Finally, I displayed the final layer and gave the layer a title: ‘S5P NO2’, after the name of the dataset.

Map.addLayer(study_area, band_viz, 'S5P N02');

And that’s it! Just 6 lines of JavaScript code. You can see the concentration of NO2 is highest in the downtown region and spreads laterally away from the bay. There is also signification pollution north of the city, but the wind off the bay seems to push it westward.

I played around with visualizing this dataset for all of Texas by simply replacing the boundaries for my clipping layer:

Unsurprisingly, Houston appears to have the worst air in the state. This isn’t surprising considering it has the highest population in the state. As I mentioned above, Google Earth Engine has a whole catalogue of publicly available geospatial datasets, so I also plotted a high resolution population map for the state of Texas and you can see the similarities with the population map.

I played around with a few of them including the following:

Google Earth Engine is an incredibly interesting tool, and I’m expecting to spend much more time with it in the future.

Here are some Google Earth Engine tutorials:

And to get inspired, here are some projects that other people have built on Google Earth Engine:

Leave a comment