Repository navigation
Home
The JavaScript scripts provided in this repository are specifically designed for use within the Google Earth Engine (GEE) Code Editor. To utilize these tools, simply copy the code from the desired .js file and paste it directly into the GEE web interface. These scripts leverage the MapBiomas API and Earth Engine's distributed computing power to perform advanced temporal analysis of Land Use and Land Cover (LULC) dynamics, allowing for seamless replication of the environmental metrics described in this documentation.
All scripts read the MapBiomas Brazil Collection 10.1 coverage asset, where each pixel holds one land cover class per year in bands classification_1985 to classification_2024. Analysis 10 compares two years; all the others reduce that 40-year series to a single value per pixel. The class of interest is set by targetClass at the top of each script (15, Pasture, by default). Pixels whose result is zero are masked with selfMask() and appear transparent on the map.
The figure of each analysis runs its script on the same four example pixels:
- Class Age
- Class Frequency
- Number of Distinct Classes
- Number of Changes
- Stable Classes
- Class First Year
- Class Last Year
- Time Since Last Occurrence
- Accumulated Class
- Transitions
- Open the Google Earth Engine Code Editor (a GEE account is required).
- Copy the whole content of the script from
codes/into a new script. - Adjust the parameters at the top (for example
targetClass) and click Run. The result is added as a layer to the map.
The scripts load the official MapBiomas palettes with require('users/mapbiomas/modules:Palettes.js'), which is available to every GEE user.
See also: Figures, how the figures in this wiki are generated.