Back to data catalog

Deforestation API

Aggregated deforestation data on a global scale

More info

Data sources

The deforestation data covers the period from 2001 to 2022 and is provided by the Global Land Analysis and Discovery (GLAD) laboratory at the University of Maryland, in partnership with Global Forest Watch (GFW). The data are freely available for use under a Creative Commons Attribution 4.0 International License. River basin polygons data is provided by HydroSHEDS. The basin data are feely available for both non-commercial and commercial use under a licence agreement included in the HydroSHEDS Technical Documentation.

Processing

Using the river basin polygons, the deforestation data are aggregated per basin and year.

Examples

Example 1

Get the total forest cover loss within the queried river basin over the given time period.

const response = await fetch(
	"https://api.openepi.io/deforestation/basin?" +
		new URLSearchParams({
			lon: "30.0619",
			lat: "-1.9441",
			start_year: "2010",
			end_year: "2019",
		})
)
const data = await response.json()

// Get the total forest cover loss within the returned river basin over the time period
const loss = json.features[0].properties.daterange_tot_treeloss

console.log(`Total forest cover loss: ${loss} km^2`)