Untitled-design-Medium-Banner-US-Landscape-.png

Author: Aayush Malik

Data Science Associate

International Initiative for Impact Evaluation

New Delhi | London | Washington DC

Welcome

We welcome you to the 3ie tutorial on applications of remote sensing for impact evaluation. Our hope is that equipped with the theoretical considerations and the practical hands-on code, you will be in a better position to decide which application of remote sensing is suitable for your work and what can be done to calculate the same. Moreover, we believe that laden with this geospatial literacy of earth observation, you can generate evidence faster in a cost-effective manner and over a large area. With extensive on-ground surveys limited by the COVID-19 pandemic and socio-political scenarios, remote sensing can help you to scale your work effectively.

This tutorial uses Python and Jupyter Notebooks. Python is a general purpose programming language that is used extensively in the field of machine learning and data analytics. Jupyter Notebooks are executable notebooks which allow us to document and run our code simultaneoulsy using Markdown. To reduce the access barrier, we are sharing this tutorial as a Google Colab Notebook, so that users can run the code and access the tutorial without downloading any software if they desire to do so.

We provide a general guidance on usage of these software. However, we believe that prior experience of basic programming will be helpful.

Tutorial Structure

The tutorial is divided into four modules. We recommend Module 1 for the audience who are not familiar with the concepts of earth observation using remote sensing. It may include commissioners of evaluation, as well as leadership staff who want to be informed consumers of earth observation services. The module introduces the core concepts, opportunities, and challenges associate with remote sensing. The Modules 2, 3, and 4 are geared more towards an audience who have fundamental familiarity with Python and want to use it for doing earth observation. The only prerequisite for Module 2, 3, and 4 is familiarity with basics of coding, in particular Python, although we believe that those who have worked on languages such as R or Javascript may also find it easy to follow the tutorial.

Hands-on exercises are provided throughout the tutorial to provide readers with ample opportunities for practicing what they are learning. Additional Resources are provided at the end of the tutorial for those who would like to delve deeper into the field of remote sensing and its use for causal inference.

Please note that this tutorial is geared towards an audience which is primarily interested in measuring agriculture and water outcomes using Remote Sensing. Further applications of remote sensing such as population density estimation, urban sprawl measurement, object detection, land cover estimation, district/block level economic activity estimation, measurement of pollution indicators, species and biodiversity classification, city-wide solar power generation estimation, waterlogging estimation post flooding etc are some of the current applications of remote sensing which are not part of the scope of current tutorial, but could be developed if useful.

Tutorial Use-Cases

After completing this tutorial successfully, a learner will be able to do the following:

For instance, one may be interested in measuring the impact of an intervention on developing sustainable agriculture or checking deforestation. In this case counting the number of trees may not always yield into measurable and accurate outcomes, however measuring the greenery as shown by a vegetation around the intervention unit may give us valuable information. Such an information can be easily quanitified alongside other covariates of interest into an econometric model to investigate the causal effects of that intervention.

1. Introduction to Remote Sensing

1.1 What is Remote Sensing?

The term remote sensing is made up of two words: remote and sensing. Remote means being far away from the unit of observation (field, building, person) and sensing means using digital sensors to measure the data across time and space. Thus, remote sensing is the science of collecting measurements on units without coming in touch with them. Satellite Imagery is one form of remotely sensed data. For this tutorial, we will focus on satellite imagery only.

mod1-remote_sensing.png

Source: NASA’s Goddard Space Flight Center. Remotely Sensing Our Planet. 2017. URL: https://svs.gsfc.nasa.gov/30892

1.1.1 Active and Passive Sensors

The sensors on satellites can be classified into two main categories: Passive and Active

  1. Passive Sensors: Passive Sensors record the energy that is naturally reflected from the surface of earth. For example, reflection of sunlight in a desert region will be different from the reflection of sunlight from a water body. Passive Sensors capture this differentiated energy reflection.

  2. Active Sensors: Active Sensors provide their own energy source for differentiated energy reflection. For example, RADARs send out electromagnetic waves via the instrument on board a system and then captures the reflection.

Active-Vs-Passive-Remote-Sensing.png

SOURCE: Unmanned Aerial Vehicles (UAVs): A Survey on Civil Applications and Key Research Challenges, Sawalmeh, Ahmad, April 2018

1.1.2 Electromagnetic Spectrum

The Electromagnetic (EM) Spectrum is the range of all types of EM radiations that exist around us. As humans, our eyes are only sensitive to the visible portion of EM spectrum, which we call as Visible Spectrum. However, there are other waves in the EM Spectrum that are of special use to remote sensing especially Infrared Waves (IR Waves) and Visible Light.

Although most of the satellites use EM for their operations, some satellites have started using RADAR for earth observation. The major advantages of RADAR based systems are their ability to generate an image when there are clouds, so this is particularly helpful for regions with distinct wet and dry season or areas which receive rainfall for whole year, like tropical rainforests. For this tutorial, we will focus on EM-based imagery only.

ems.jpg

SOURCE: Imperial Encyclopedia Traveller, Marc Miller, July 2019

1.1.3 Fundamentals of Remote Sensing

The fundamental technology that is behind the remote sensing is differentiated reflection of EM waves by different objects. The sun's energy which is composed of full EM Spectrum is reflected differently by different objects on the planet. For example, healthy plants that are lush green will reflect the sun's energy in a different way as compared to the plants that are dull and are under stress. The sensors which are on board these satellites capture these differentiated amounts of reflections and use it to construct the satellite imagery as we see. These data help us to identify the changes happening on the planet remotely.

reflection.png

SOURCE: Linking Student Performance in Massachusetts Elementary Schools with the "Greenness'' of School Surroundings Using Remote Sensing, PubMed, DOI

1.2 Why Remote Sensing

Evidence-based decision-making is becoming more and more common in policy, but the cost of generating evidence continues to increase. Add to this fact that some of the regions of the world, where development interventions are most needed may not always be accessible due to natural and social causes. Keeping these issues in mind, remote sensing promises to be an alternative that can be readily used in a cost-effective manner to assist in measuring the impact of development interventions in LMICs. Doing remote sensing is not a replacement for traditional surveys. It is actually a complement to make traditional data collection better and especially useful when any other means of surveying is not possible.

1.3 Benefits of Remote Sensing in Impact Evaluation

There are multiple benefits and applications of using remote sensing data for impact evaluation purposes.

  1. In contrast to ground-based data, remote sensing data allows us to capture larger areas at a relatively lower cost. For example, remote sensing was used to do earthquake damage assessment in Italy as highlighted here.

  2. Remote Sensing allows us to ask more relevant questions where we see a geographic element plays an important role. For example, it may allow us to measure spillover effect, as shown in this study which measured spatial spillover effects of a reclaimed mining subsided lake in China.

  3. The sampling bias is lower as data can be collected for harder to reach areas impacted by geographic or political constraints. Thus, we can have a more credible identification strategy. For example, this study does drought evaluation in the North East Region of Thailand.

  4. Remote sensing data can be used to calculate various indices such as vegetation indices or water indices, or pollutants indices to capture the effects of a treatment in an area remotely. For example, it has been used for detection and monitoring of marine pollution.

  5. Deep Learning (making computers learn on the basis of huge amounts of data) based Computer Vision (making computers see and interpret images like humans do) methods allow us to do efficient program targeting to know where to put in our resources and who are the people who would benefit most from the interventions. For example, deep learning and remote sensing were used to locate the poor in Nigeria.

Note that Deep Learning may not always be need for doing an analysis that requires satellite imagery. For example making a land-usage map using satellite imagery may not always require one to perform deep learning computations. For motivated learners who are interested in knowing what is possible, we recommend going to this resource

It is also worth mentioning that the advanced technologies such as getting high resolution commerical imagery and performing deep learning based computer vision algorithms may have cost and human resources implications which may not always be readily available with organizations based in LMICs.

1.4 Challenges of Remote Sensing

  1. #### Ground Truthing We may always be not sure if what remote sensing shows us is actually true, because it is "remotely sensed". For example, if benefits from a development programme are directed to the households with a straw roof, then we need to ensure that houses below the straw roof are actually mud houses, and have not been masked by straw roofing for getting the benefits. However, if we need to measure impact remotely and there is no chance we can go ground truthing, it will be better to apply remote sensing to measure at least what's possible.

  2. ### Cost Implications for High Resolution Data Because many of the freely available satellite data do not have the granularity that can be used to make the inferences on, let's say smaller plots in LMICs or object detection, remote sensing can have cost and administrative implications. It is worth noting that geospatial analysis is a broad endeavour encompasses many different things. The mapping part and conversion of imagery to numbers within particular user-defined boundaries may be feasible within a few weeks, but extra time may be required for other, more involved work - e.g., spatial statistics.

  3. #### Crop Type and Plot Boundaries (Lack of Vector Datasets) For doing a plot/small area level analysis, one may need to have a clear idea of what the plot boundaries are then turn them into vector formats. Deep Learning methods allow us to do so with reasonable accuracy, and it is expected that it will be better in the long run.

Note that at this point, it would be important to differentiate between raster and vector datasets. The satellite images you get from Google Earth Engine (GEE) are multi-spectral raster datasets. The more you zoom in, the more pixelated an image becomes. You may wish to restrict your retrieval of those images only for your area of interest. This is where vector dataset comes into picture. Geographical vector data can come in various file formats, but the most commonly used is Shapefiles format developed by ESRI. It is easy to find administrative shapefiles from respective government body or private places, but sometimes the administrative shapefile may not match intervention area. For example, if your area of interest is a village, but the shapefiles you have are only at the district level, you may need to create your own shapefile. This may result into additional costs (person time and software). This will help you to aggregate your data. For example, what is the average Normalized Difference Vegetation Index (NDVI) for the year 2020 in the village X of Benin? To answer those questions, you require shapefiles for your intervention areas.

  1. #### Cloud Cover It may so happen that you may not get a satellite image at all because of dense cloud cover in particular months. For example, it is almost impossible to retrieve satellite images during the months of July, August, and September during the Monsoon Season in India. The phenomenon is true for other parts of the world too, where there is a distinct wet season (Kenya, for example). However, this disadvantage is solved by RADAR-based satellites which use RADAR waves for imagery that penetrate clouds.

  2. #### Temporal Compatibility Satellite sensors age over time and are replaced periodically. Thus, the same digital number does not necessarily mean the same level of light intensity across years and satellites. This is an issue especially with the nighttime light data.

1.5 When NOT to use Remote Sensing

  1. #### Lack of geographic dependence When our research question is not expected to be affected by a geographical variation, remote sensing is not a wise thing to do. For example, measuring the effect of training on staff's performance in different offices located in a country may not be affected by where the offices are located.

  2. #### Doing Remote Sensing ONLY We are proponents of using ground truthing always before taking the decisions on the basis of purely remote analysis. Doing so can be a socially, politically, and economically costly affair that can have far and wide repercussions.

  3. #### Measuring variables that cannot be measured from above With all the merits of Remote Sensing, it may not help us with measuring let's say height of a building or how many houses are located in an apartment building very accurately (although, LiDAR remote sensing may help with that). Moreover, variables such as gender, social capital, political participation etc cannot be measured by remote sensing.

1.6 Remote Sensing and Ethical Considerations

Remote Sensing offers a lot of possibility for measurement of developmental outcomes at a relatively lower cost and at a faster speed. However, ethical considerations are needed to be kept in mind so that no damage is done to the privacy and security of the people while doing remote sensing. This section has been adapted from Ethical Considerations When Using Geospatial Technologies For Evidence Generation and we recommend they should be considered before the application of remote sensing for geospatial analytics.

  1. Be clear and write out specific examples of how remotely sensed data will be used for the analysis and where is it that remote procedures will bring a benefit
  2. Acquire consent where relevant and feasible. For example, if you are monitoring private fields and houses of people, it is better to ask them for their consent if it's possible.
  3. Extreme privacy of personally identifiable information should be maintained and in case it's not possible then all data must be deidentified either by geomasking or blurring
  4. If capturing imagery using custom UAVs, the relevant governmental authorities must be informed in advance and all necessary communication protocols must be discussed in advance
  5. Consider the possible discrimination against the people belonging to a particular region while doing predictive analysis

1.7 Summary

Remotely sensed data can be used to augment the traditional methods of impact evaluation to generate evidence faster, at a relatively lower cost, and for a larger area. The publicly available data along with tools such as Google Earth Engine have lowered the barriers to access of using remote sensing data for impact evaluation. The subsequent chapters will allow you to download and use spatial data for your work using Google Earth Engine and Python.

1.8 Resolution in Satellite Imagery (Optional)

Satellite images can have different resolutions depending upon which satellite the images are coming from. Keeping in mind the uses of satellite imagery for a particular use-cases, we may need to have some or other image depending upon the resolution and purpose of the work. Written below are the three types of resolutions we can classify the satellite images into.

1.8.1 Spatial Resolution

Spatial Resolution refers to the size of one pixel on ground. In simple words, objects placed at a distance higher than the spatial resolution of a satellite can be discerned by the satellite. The spatial resolution for SENTINEL is 10 meters. This means that the satellite's sensor would not be able to differentiate between objects less than 10 m apart. For some of the commercial remote sensing products from MAXAR, the spatial resolution is 15 cm.

HD_15cm_Airport.jpg

SOURCE: Maxar Blog

It is important to keep in mind that the higher resolution images may be required to perform some of the analyses that require granularity, for example cattle monitoring via remote sensing requires a very high resolution image. In those cases, it is worthwhile investing in buying higher resolution satellite imagery from commerical providers.

You can also check out this blog that shows how different resolution images look.

1_1efTZg67DtuhY46JOWSQfQ.jpeg

SOURCE: Medium Blog

1.8.2 Temporal Resolution

Temporal Resolution or revisit time is the time it takes for a satellite to image the same area again. The temporal resolution for SENTINEL 2 is 5 days on equator and for LANDSAT 8, it's 16 days on equator. The revisit time is lower on higher latitudes, which means that an area is frequented more often by a satellite for areas closer to poles.

1.8.3 Spectral Resolution

Spectral resolution refers to the number of bands (range of frequencies in an electromagnetic spectrum used for satellite imagery) that there are in a satellite imagery. Because satellite images contain multiple wavelengths images, we are able to compute relevant indices for specific purposes. We will cover more about multispectral images when we learn computing indices using Google Earth Engine. The spectral resolution of LANDSAT 8 is 9 bands, while that of SENTINEL 2 is 13 bands.

mod1-res_tradeoffs.png

Source: Timothy A Warner, M Duane Nellis, and Giles M Foody. Remote sensing scale and data selection issues. The SAGE handbook of remote sensing, 2:568, 2009

There is an inherent tradeoff between spatial, spectral and temporal resolutions. Typically, the higher the spatial resolution, the lower the spectral and the temporal resolution and the higher the temporal resolution, the lower the spatial and spectral resolutions.

2. Introduction to Technology Stack

There are two fundamental technologies we will be using for extracting, processing, analyzing, and exporting satellite spatial data (aka satellite images).

  1. Python - A general purpose programming language used primarily for data analysis and machine learning. The core of Python is very small making it a fast langauge. In addition to this, there are thousands of libraries that can be used to augment the core functionalities making it first choice of data scientists.
  1. Google Earth Engine - According to Google, "Google Earth Engine combines a multi-petabyte catalog of satellite imagery and geospatial datasets with planetary-scale analysis capabilities and makes it available for scientists, researchers, and developers to detect changes, map trends, and quantify differences on the Earth's surface."

The reader is assumed to have a basic familiarity with Python. In case the reader wants to have a refresher training before starting, one can refer to this link for a quick reference.

We will be using Jupyter Notebooks for working with satellite data and analysis. To install Jupyter Notebook, one needs to install Anaconda Distribution. For more information please refer to this link. Alternatively, one may use Google Colab to run the same on cloud and share it with others on the team

Jupyter Notebooks run by connecting to virtual machines (VM) that have maximum lifetimes that can be as much as 12 hours. Notebooks will also disconnect from VMs when left idle for too long. Maximum VM lifetime and idle timeout behavior may vary over time, or based on your usage. This is necessary for Colab to be able to offer computational resources for free.

2.1 Introduction to Google Earth Engine

Google Earth Engine is a cloud based platform for planetary-scale geospatial analysis which allows to process a variety of geographical data at scale and handle large geographical datasets.

The main benefit of using Google Earth Engine is the savings in computational resources needed to do large scale analysis. In addition to this, it is free to use for non-commerical use, i.e. free for educational and research purposes.

GEE contains petabytes of ready-to-use satellite data. The platform can be accessed via two methods.

  1. The first one is using the web version that uses Javascript. To use that users can go to code.earthengine.google.com
  2. The second is using Python API for accessing the platform using Jupyter Notebook.

We will use the second method for our work.

It is important to register on Google Earth Engine before using the platform. To register at Google Earth Engine, users are requested to refer to this link.

Users can also explore features of Google Earth Engine, including browsing case studies and data catalog available.

2.1.1 Installation of Packages

Before proceeding, users are requested to install the following packages

  1. Earth Engine API using command pip install earthengine-api
  2. geemap using command pip install geemap

As a first step, we will teach how to download and visualize map from Google Earth Engine. Before using GEE, you need to authenticate your account. In order to do so, follow these steps.

2.2 Rendering your first Map

In this part of the module, we will learn how to import the necessary packages, authenticate, initialize, and render your first map using Google Earth Engine. We will visualize Addis Ababa, Ethiopia. Before you begin this step, please ensure you have registered for Google Earth Engine. That will allow you to authenticate your session and use GEE. Run the code below when you are running this notebook for each session.

Tip: To find the zoom level and coordinates, it is recommended to look at the address bar and copy the link to see them. For example, https://www.google.com/maps/place/Nagpur,+Maharashtra/@21.1612315,79.0024702,12z/ in this link we see coordinates after the '@' sign and zoom before 'z'. Zoom level is not absolute and depending upon the screen size, different users may need to have different zoom level for their need.

Congratulations on your first map generation using Google Earth Engine and Python. You can explore the panel on the left hand side. In the coming tutorials, we will learn how to select a particular area of interest using custom shape files.

There are a couple of reasons why you may not get the desired output. This will help you troubleshoot the probable problems.

  1. Ensure that Python, Google Earth Engine, and geemap are properly installed.
  2. If you are using Jupyter Labs, please ensure to install node.js beforehand. This will allow you to install pyleaflet easily.
  3. If you are using Google Colab, please install the packages as highlighted earlier.

2.3 Map Rendering Advanced

In this part of the tutorial, you will learn how to find and import the satellite images, draw or select a particular area of interest, import custom shape files, select the time period for which you want the image, and selecting the bands from the satellite images. This will be a long tutorial, so take a small break, grab a cup of coffee, and let's go!

2.3.1 Finding and Importing Satellite Images on Google Earth Engine Catalog

The best way to find a satellite image of interest is to go to Google Earth Engine Catalog and search for the required dataset. A user can go this link to search for the satellite imagery. One needs to enter the name of the satellite in the search bar and they will be shown the relevant results. What we need for our purpose is the unique ID associated with each satellite imagery that one can find in the description after clicking the relevant areas. The visuals below explain the whole process step by step.

  1. Open Google Earth Engine Catalog

ee-catalog.png

  1. Search for the Sentinel Imagery

sentinel-search.png

  1. Click on Sentinel-2 MSI: MultiSpectral Instrument, Level-1C panel and you will come across the following screen. We need the highlighted ID (in red) for our information.