Gokul GopanContact
← Back to Projects
Candidate tree-cover loss screened to high cocoa-probability overlap in Juaboso District

Post-2020 Tree-Cover Change and Cocoa-Linked Risk Screening in Juaboso District, Ghana

An end-to-end, cloud-native screening workflow that intersects candidate tree-cover loss with modeled cocoa probability.

Commodity-risk screeningCloud-native PythonGoogle Earth Engine10 m LULCGhana

Project overview

I built a workflow to identify candidate tree-cover loss between 2020 and 2024, filter small change patches, convert the final mask to vector polygons, and screen those areas against a 2024 cocoa-probability layer. The output identifies where candidate tree-cover loss spatially overlaps elevated modeled cocoa probability.

This is a screening workflow—not proof that cocoa caused the change and not a legal EUDR compliance determination.

Study area

Juaboso District, Western North Region, Ghana. The district boundary defines the area of interest for raster processing, polygon outputs and zonal statistics.

Why this project

The aim was to move beyond a land-cover map and build an end-to-end workflow closer to practical deforestation monitoring and commodity-risk screening: detect a change signal, clean it, make it spatially usable, and assess its overlap with a third-party commodity-probability product.

Data used

ESA WorldCover supported baseline comparison and GLAD land-cover provided a second comparison product. Change detection uses the Impact Observatory / Microsoft / Esri Annual 10 m Land Use/Land Cover dataset for 2017–2024, comparing 2020 with 2024. The screening layer is the Forest Data Partnership 2024 cocoa probability layer accessed in Google Earth Engine. Trees are class 2 in the annual LULC product.

Workflow

STAC → Python stackpystac-client · odc-stac · XArray · rioxarray · Dask
2020 / 2024 annual LULCCandidate tree-loss mask
Connected-pixel filter → polygonizeFinal mask · GeoTIFF · GeoPackage
Earth Engine cocoa screeningProbability thresholds · pixelArea · reduceRegion
Candidate-loss polygonsConverted to Earth Engine geometry
Overlap statistics + raster exportHigh cocoa-probability screening result

An intentional architecture change

I initially explored loading the complete cocoa-probability raster through XEE, XArray and Dask. Although workable, it was unnecessarily heavy because the analysis only required statistics inside candidate-loss areas.

The final design keeps the cocoa raster server-side in Google Earth Engine, sends only the candidate tree-loss geometry, and calculates zonal overlap using reduceRegion and pixelArea. This reduced data movement while retaining a transparent, reproducible screening step.

Tree-cover change methodology

Candidate loss is defined as Tree in 2020 AND non-tree in 2024. At 10 m resolution, a 100-connected-pixel threshold (~1 ha) removes isolated classification noise. After sieving, the result is intersected with the original binary loss mask to retain only valid original loss pixels, then polygonized.

1,359.30 ha
Candidate tree-cover loss
13.59 km²
Candidate tree-cover loss
1,077.75 ha
Trees → Rangeland

Tree-cover loss is a land-cover change signal and must not automatically be read as confirmed deforestation.

Cocoa screening results

The cocoa layer is continuous from 0 to 1. Thresholds of ≥ 0.50 (moderate-or-higher modeled probability) and ≥ 0.75 (high modeled probability) are transparent portfolio screening thresholds—not validated legal or classification cut-offs.

99.02 ha
Cocoa probability ≥ 0.50
7.28% of candidate loss
60.95 ha
Cocoa probability ≥ 0.75
4.48% of candidate loss
0.073
Mean cocoa probability
inside candidate-loss areas

The spatial-overlap areas are the key screening result; they identify locations suitable for prioritised follow-up rather than establishing causality.

Final map

Candidate tree-cover loss screened to high cocoa-probability overlap
Candidate 2020–2024 tree-cover loss is shown first, then screened to 2024 cocoa probability ≥ 0.75. The result is a high-probability overlap screen, not confirmed cocoa-driven deforestation.

What I learned

How to process annual cloud-native land-cover data; clean multitemporal change; move between raster and vector outputs; choose local/cloud-native Python processing versus server-side Earth Engine analysis; integrate third-party commodity probabilities; and communicate uncertainty without implying causal proof.

Limitations

Candidate tree-cover loss is not automatically confirmed deforestation. Cocoa is modeled probability, and spatial coincidence does not prove cocoa caused the change. Tree cover is not automatically equivalent to the EUDR legal definition of forest, and the probability thresholds are screening thresholds. Follow-up could use higher-resolution optical imagery, SAR, time-series evidence, plot boundaries or supply-chain data.

Technical stack

Cloud-native Python: Python · STAC · pystac-client · odc-stac · XArray · rioxarray · Dask · Rasterio · GeoPandas · pandas · Matplotlib · xarray-spatial

Earth Engine: Google Earth Engine · Earth Engine Python API · ImageCollection · reduceRegion · pixelArea · Export.image.toDrive · Forest Data Partnership cocoa probability layer

GIS & data: QGIS · GeoTIFF · GeoPackage · GeoJSON · CRS / reprojection

Source code and notebook

The technical notebooks are maintained in the separate remote-sensing portfolio repository.

View technical notebook / source code ↗

Learning attribution: the cloud-native land-cover workflow was adapted from the Cloud Native Remote Sensing with Python course by Ujaval Gandhi / Spatial Thoughts and customised for Juaboso District.