πŸ—ΊοΈExternal integrations and maps

TimberID pulls data from external data sources to enhance the sample report for uncertain/untrusted samples. These are:

MapBiomas (Land Use Data and Map)

The MapBiomas project provides Google Earth Engine (GEE) images of land use data in Brazil.

To access this data from the Earth Engine code editor (https://code.earthengine.google.com) you can use this link to add the MapBiomas user toolkit to your scripts folder. You can also find the MapBiomas user toolkit on Github. You can also find the MapBiomas entry in the GEE Community Catalog for more info.

Once you add the user toolkit, you can access the deforestation images like so:

MapBiomas releases their updated data in regular "collections". You can find the GEE Image url to the images in the source code.


This is an example of how this image is displayed in TimberID, in the sample details page.This is only displayed for uncertain/untrusted samples, not for reference/trusted samples.

The MapBiomas map is centered on the [latitude, longitude] of the sample, showing a 1 km buffer zone (in white) and a 10km buffer zone (in black). Below the map, the UI displays what current percentage of land is water in both 1km and 10km radii, and below the map are details of each land use category for the last 10 years of MapBiomas data (2011 - 2021).

Embedded Map

The map is created using the Earth Engine Python API, using the geemap module.

Geemap allows students and researchers to use the Python ecosystem of diverse libraries and tools to explore Google Earth Engine. In particular, it's designed for existing GEE users who would like to transition from the GEE JavaScript API to Python API, so the library will be familiar for uses of the former.

The creation of map is mediated by Cloud Functions, specifically the fraud-detection-generate-maps function (see more details on Cloud Functions here). You can see a diagram of how that works below:

The blue flow happens once a day at 9am, the orange flow is triggered every time a sample is created or modified.

Maps for every sample are regenerated every day by the flow displayed in blue. This is because the geemap assets in the generated HTML expire after 48 hours.

You can find links each of the components below:

Land Use Data

Land Use Data is calculated in the fraud-detection-update-sample function, specifically in the section fraud_detection_fetch_land_use_data.py. This uses the Earth Engine Python API.

MapBiomas Alerta (deforestation alerts)

This is an example of how deforestation alerts data is displayed in TimberID, in the sample details page. This is only displayed for uncertain/untrusted samples, not for reference/trusted samples.

The corresponding page to each alert is linked on the details column under "More info". You can see an example alert here.

This data comes from MapBiomas Alerta's GraphQL API. Deforestation alerts data is fetched and stored in the fraud-detection-update-sample function, specifically in the section fraud_detection_fetch_mapbiomas_alerts.py.

This API is generally available and doesn't require authentication. You can find more details about the API in this link: https://plataforma.alerta.mapbiomas.org/api (viewing this page requires login, create a new account to access the content). This link also includes a Sandbox to test this GraphQL api, too.

Last updated