Deforestation & Forest Monitoring

Tropical forests store roughly 250 billion tons of carbon and are home to over half of all terrestrial species on Earth. And yet, every year, millions of hectares disappear for agriculture, logging, and development.

Here's the good news: we can watch it happen from space. In this module, we'll use the Hansen Global Forest Change dataset to map, measure, and chart forest loss at any scale. Let's get started.

Learning objectives

  • Load and explore the Hansen Global Forest Change (GFC) dataset.
  • Map tree cover, forest loss, and forest gain.
  • Calculate forest loss area in hectares and square kilometers.
  • Create a deforestation time series chart grouped by year.

Why it matters

Deforestation is the second-largest source of human-caused greenhouse gas emissions, right behind fossil fuels. It destroys biodiversity, displaces indigenous communities, disrupts water cycles, and degrades soils.

Here's where remote sensing gets powerful: satellite-based monitoring is the only practical way to track forest loss across entire countries and continents in near-real time. No boots on the ground required.

Key vocabulary

Hansen GFC
The Global Forest Change dataset produced by the University of Maryland (Hansen et al., 2013). Updated annually using Landsat imagery at 30-meter resolution.
Tree cover (treecover2000)
Percentage canopy cover for the year 2000. Values range from 0 (no trees) to 100 (complete canopy closure).
Loss
A binary band indicating whether a pixel experienced forest loss during the study period (1 = loss, 0 = no loss).
Loss year (lossyear)
The year in which forest loss occurred, encoded as years since 2000 (1 = 2001, 23 = 2023).
Gain
A binary band indicating forest gain between 2000 and 2012 (1 = gain, 0 = no gain). This band has not been updated since the original publication.

Your First Look: Forest Loss in Rondonia, Brazil

The state of Rondonia in the Brazilian Amazon is one of the most actively deforested regions on Earth. Think of it like a fishbone: roads branch outward from highways into intact forest, carving patterns that are clearly visible from space.

Let's map the damage.

// Visualize forest loss in Rondonia, Brazil
var rondonia = ee.Geometry.Point([-62.0, -10.5]);

// Load the Hansen Global Forest Change dataset
var gfc = ee.Image('UMD/hansen/global_forest_change_2023_v1_11');

// Tree cover in 2000 (green gradient)
var treeCover = gfc.select('treecover2000');
Map.addLayer(treeCover, {min: 0, max: 100, palette: ['black', '076B07', '0FA00F']}, 'Tree Cover 2000');

// Forest loss (red overlay)
var loss = gfc.select('loss');
Map.addLayer(loss.selfMask(), {palette: ['FF0000']}, 'Forest Loss');

// Loss year (rainbow palette showing when loss occurred)
var lossYear = gfc.select('lossyear');
Map.addLayer(lossYear.selfMask(), {
  min: 1, max: 23,
  palette: ['FFFF00', 'FF8800', 'FF0000', 'FF00FF', '0000FF']
}, 'Loss Year (2001-2023)');

Map.centerObject(rondonia, 9);

What you should see

Three layers will appear. First, a green tree cover base map showing dense forest as it looked in 2000. Next, a red loss overlay that reveals the fishbone deforestation pattern. Finally, a rainbow loss year layer where yellow means early deforestation (2001) and blue means recent deforestation (2023).

Toggle layers on and off to see how deforestation has expanded over time. It's striking.

The Global Picture

Between 2001 and 2023, the world lost approximately 450 million hectares of tree cover. That's an area larger than the entire European Union.

The drivers vary by region: industrial agriculture in Southeast Asia and Latin America, subsistence farming in Central Africa, and wildfire in boreal forests. But the consequences are universal:

  • Carbon emissions: Tropical deforestation releases roughly 4.8 billion tons of CO₂ annually.
  • Biodiversity: Tropical forests harbor an estimated 50-80% of terrestrial species. Forest loss directly threatens extinction.
  • Indigenous communities: Over 370 million indigenous people worldwide depend on forests for their livelihoods and cultural identity.
  • Water cycles: Forests regulate rainfall patterns. Large-scale deforestation in the Amazon is linked to reduced rainfall in Brazil's agricultural heartland.

What's Inside the Hansen Dataset?

The Hansen Global Forest Change dataset was first published in 2013 by a team led by Matthew Hansen at the University of Maryland. Think of it as a 30-meter-resolution "before and after" of every forest on Earth, built from Landsat imagery and updated every year.

The dataset defines "tree cover" as canopy closure for vegetation taller than 5 meters. Let's take a look at what bands we have to work with.

// Explore the dataset bands
var gfc = ee.Image('UMD/hansen/global_forest_change_2023_v1_11');
print('GFC band names:', gfc.bandNames());
// Bands: treecover2000, loss, gain, lossyear, first_b30,
//        first_b40, first_b50, first_b70, last_b30, last_b40,
//        last_b50, last_b70, datamask

Here are the key layers we'll use most often:

  • treecover2000: Tree canopy cover percentage in the year 2000 (0 to 100).
  • loss: Binary forest loss mask (1 = loss occurred at some point from 2001 to 2023).
  • lossyear: Year of loss encoded as years since 2000 (1 = 2001, 23 = 2023).
  • gain: Binary forest gain from 2000 to 2012 (not updated annually).
  • datamask: Distinguishes mapped land (1) from water (2) and no data (0).

Common mistakes

  • The dataset defines "tree cover" as any vegetation taller than 5 meters. This includes plantations and orchards, not just natural forest. Keep that in mind when interpreting your results.
  • lossyear values are years since 2000, not calendar years. Value 15 means 2015, not year 15. This trips people up all the time.
  • The gain band only covers 2000 to 2012 and has not been updated.

From Canopy Percentage to Forest Map

The treecover2000 band gives us a continuous measure of canopy closure. But what counts as "forest"? That depends on who's asking.

To create a forest/non-forest map, we apply a threshold. A common choice is 50% canopy cover, but the appropriate threshold depends on the forest definition used in your study area. Let's see it in action.

// Create a forest mask using a 50% canopy threshold
var treeCover = gfc.select('treecover2000');
var forest2000 = treeCover.gte(50);

Map.addLayer(treeCover, {
  min: 0, max: 100,
  palette: ['FFFFCC', '006600']
}, 'Tree Cover (continuous)');

Map.addLayer(forest2000.selfMask(), {
  palette: ['006600']
}, 'Forest > 50% (binary)');

Pro tips

  • The UN FAO uses a 10% canopy cover threshold for "forest." Brazil's official definition uses 80%. Same dataset, very different maps!
  • Always state your threshold when reporting results. The threshold choice significantly affects the final area calculation.

Mapping Where and When Forests Disappeared

The loss band is a simple yes/no: did this pixel lose its forest at any point between 2001 and 2023? The lossyear band adds the "when" by recording the exact year it happened.

Together, they let us both map and date deforestation. Here's the cool part: we can filter the loss to only include pixels that were actually forested in the first place.

// Map loss within forests (only pixels that had > 50% cover in 2000)
var loss = gfc.select('loss');
var lossYear = gfc.select('lossyear');

// Loss only within original forest
var forestLoss = loss.and(forest2000);

Map.addLayer(forestLoss.selfMask(), {palette: ['FF0000']}, 'Forest Loss (>50% baseline)');

// Show loss by year with a color ramp
Map.addLayer(lossYear.updateMask(forestLoss), {
  min: 1, max: 23,
  palette: ['#FFFFB2', '#FECC5C', '#FD8D3C', '#F03B20', '#BD0026']
}, 'Loss Year (2001-2023)');

Try it: Isolate a single year

Let's zoom in on just one year. Create a map showing only the forest loss that occurred in 2020 using lossYear.eq(20). Then try 2010 (lossYear.eq(10)). How do the two compare?

// Loss in 2020 only
var loss2020 = lossYear.eq(20).and(forest2000);
Map.addLayer(loss2020.selfMask(), {palette: ['orange']}, 'Loss in 2020');

Putting Numbers on the Loss

A map is powerful, but sometimes we need a number. How many hectares of forest were actually lost?

To measure deforestation in physical units, we multiply the loss mask by ee.Image.pixelArea() and sum the result over our region of interest. Don't worry, we'll break it down.

// Calculate total forest loss area in hectares
var roi = ee.Geometry.Rectangle([-64, -12, -60, -8]); // Rondonia region

var forestLoss = gfc.select('loss').and(treeCover.gte(50));
var lossArea = forestLoss.multiply(ee.Image.pixelArea());

var totalLoss = lossArea.reduceRegion({
  reducer: ee.Reducer.sum(),
  geometry: roi,
  scale: 30,
  maxPixels: 1e9
});

// Convert m² to hectares (1 hectare = 10,000 m²)
var lossHectares = ee.Number(totalLoss.get('loss')).divide(1e4);
print('Total forest loss (hectares):', lossHectares);
print('Total forest loss (km²):', lossHectares.divide(100));

Charting the Story Over Time

A single number tells us "how much," but a time series chart tells us "when." We can group the loss area by lossyear to build an annual bar chart that reveals trends over two decades.

This requires creating an image with loss year as one band and pixel area as another, then using a grouped reducer. Let's see it in action.

// Create annual deforestation chart
var roi = ee.Geometry.Rectangle([-64, -12, -60, -8]);
var lossYear = gfc.select('lossyear');
var forest2000 = gfc.select('treecover2000').gte(50);

// Build an image with loss year and area
var lossAreaImage = ee.Image.pixelArea()
  .addBands(lossYear)
  .updateMask(gfc.select('loss').and(forest2000));

// Group by loss year
var stats = lossAreaImage.reduceRegion({
  reducer: ee.Reducer.sum().group({
    groupField: 1,
    groupName: 'year'
  }),
  geometry: roi,
  scale: 30,
  maxPixels: 1e9
});

// Convert to a feature collection for charting
var groups = ee.List(stats.get('groups'));
var chartData = groups.map(function(item) {
  var dict = ee.Dictionary(item);
  var year = ee.Number(dict.get('year')).add(2000);
  var areaHa = ee.Number(dict.get('sum')).divide(1e4);
  return ee.Feature(null, {year: year, area_ha: areaHa});
});
var fc = ee.FeatureCollection(chartData);

// Create the chart
var chart = ui.Chart.feature.byFeature(fc, 'year', 'area_ha')
  .setChartType('ColumnChart')
  .setOptions({
    title: 'Annual Forest Loss in Rondonia (2001-2023)',
    hAxis: {title: 'Year'},
    vAxis: {title: 'Forest Loss (hectares)'},
    colors: ['#CC0000']
  });
print(chart);

What you should see

A bar chart in the Console showing annual deforestation in hectares from 2001 to 2023. You'll see variation year to year, with certain years showing deforestation spikes that may correspond to policy changes or enforcement gaps. This is a powerful insight: we can connect satellite data to real-world decisions.

Quick self-check

  1. What does a lossyear value of 18 mean?
  2. Why should we apply a tree cover threshold before analyzing the loss band?
  3. How do we convert pixel area from square meters to hectares?
  4. Why is the gain band less useful than the loss band for recent analysis?
  5. What is the spatial resolution of the Hansen dataset?

Going deeper

We've covered forest monitoring at a foundational level here. When you're ready for more advanced techniques, check out:

  • EEFA Book - Chapter A3.4: Forest Degradation and Canopy Disturbance
  • EEFA Book - Chapter A3.5: Deforestation Mapping Using Multi-Sensor Data

Next Steps