Skip to main content

Mapping deforestation risk following JNR methodology

Project description

Logo riskmapjnr

riskmapjnr Python package

Python version PyPI version GitHub Actions License GPLv3 Zenodo

Overview

The riskmapjnr Python package can be used to obtain maps of the spatial risk of deforestation and forest degradation following the methodology developed in the context of the Jurisdictional and Nested REDD+ (JNR) and using only a forest cover change map as input.

riskmapjnr-example

Statement of Need

The VCS (Verified Carbon Standard) program allows certified projects to turn their greenhouse gas (GHG) emission reductions and removals into tradable carbon credits. Since its launch in 2006, the VCS program has grown into the world’s largest voluntary GHG program.

In the forest sector, programs to mitigate GHG emissions across entire national or subnational jurisdictions (called REDD+ programs, i.e. programs aiming at Reducing Emissions from Deforestation and Forest Degradation) can be accounted for and credited using a jurisdictional-scale framework, the Jurisdictional and Nested REDD+ (JNR) framework. JNR integrates government-led and project-level REDD+ activities and establishes a clear pathway for subnational- and project-level activities to be incorporated within broader REDD+ programs. The JNR framework ensures all projects and other reducing emissions from deforestation and degradation activities in a given jurisdiction are developed using consistent baselines and crediting approaches. They mitigate the risk of “leakage”, i.e. the displacement of emission-causing activities to areas outside the project boundary, by monitoring emissions across an entire jurisdictional area.

The JNR Risk Mapping Tool is a “benchmark” methodology that provides a standardized approach for developing deforestation and forest degradation risk maps for users of the JNR Allocation Tool in the context of Jurisdictional and Nested REDD+ (JNR) requirements. The methodology allows deriving a map of the deforestation (or degradation) risk based on a minimal spatial information provided by the past deforestation (or degradation) map at the jurisdictional scale.

The JNR Risk Mapping Tool allows the creation of categorical and spatially static maps whose categories represent different levels of risk of deforestation or forest degradation in the validity period of the Forest Reference Emissions Level (FREL) and throughout the jurisdictional geographical boundaries. In the JNR Allocation Tool, the level of risk determines how the jurisdictional FREL is spatially distributed to nested lower-level jurisdictional programs and projects.

While the JNR Risk Mapping Tool methodology favors simplicity, obtaining the risk map is not straightforward. The approach requires several geoprocessing steps on raster data that can be large, i.e. covering large spatial extent (eg. national scale) at high spatial resolution (eg. 30 m). The riskmapjnr Python package includes functions to perform these geoprocessing steps and derive a risk map on any jurisdiction and at any spatial resolution following the JNR Risk Mapping Tool methodology.

Installation

You will need several dependencies to run the riskmapjnr Python package. The best way to install the package is to create a Python virtual environment, either through conda (recommended) or virtualenv.

Using virtualenv

You first need to have the virtualenv package installed (see here).

Then, create a virtual environment and install the riskmapjnr package with the following commands:

cd ~
mkdir venvs # Directory for virtual environments
cd venvs
virtualenv --python=/usr/bin/python3 venv-rmj
source ~/venvs/venv-rmj/bin/activate
# Install numpy first
pip install numpy
# Install gdal (the correct version)
pip install --global-option=build_ext --global-option="-I/usr/include/gdal" gdal==$(gdal-config --version)
pip install riskmapjnr # For PyPI version, this will install all other dependencies
# pip install https://github.com/ghislainv/riskmapjnr/archive/master.zip # For GitHub dev version
# pip install sphinx flake8 jedi jupyter geopandas descartes folium # Optional additional packages

To deactivate and delete the virtual environment:

deactivate
rm -R ~/venvs/venv-rmj # Just remove the repository

Installation testing

You can test that the package has been correctly installed using the command riskmapjnr in a terminal:

riskmapjnr

This should return a short description of the riskmapjnr package and the version number:

# riskmapjnr: Map of deforestation risk following JNR methodology.
# https://ecology.ghislainv.fr/riskmapjnr/
# riskmapjnr version x.x.

You can also test the package executing the commands in the Get started tutorial.

Main functionalities

The riskmapjnr package includes functions to:

  1. Estimate the distance to forest edge beyond which the deforestation risk is negligible: dist_edge_threshold().

  2. Compute local deforestation rates using a moving window whose size can vary: local_defor_rate().

  3. Transform local deforestation rates into categories of deforestation risks using several slicing algorithms: set_defor_cat_zero() and defor_cat()

  4. Validate maps of deforestation risk and select the map with the higher accuracy: defrate_per_cat() and validation().

The riskmapjnr package uses several known Python scientific packages such as NumPy, SciPy, and Pandas for fast matrix and vector operations and gdal for processing georeferenced raster data. Raster data are divided into blocks of data for in-memory processing. Such an approach allow processing large raster files with large geographical extents (e.g. country scale) and high spatial resolutions (eg. 30 m).

Contributing

The riskmapjnr Python package is Open Source and released under the GNU GPL version 3 license. Anybody who is interested can contribute to the package development following our Community guidelines. Every contributor must agree to follow the project’s Code of conduct.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

riskmapjnr-1.3.2.tar.gz (441.0 kB view details)

Uploaded Source

Built Distribution

riskmapjnr-1.3.2-py2.py3-none-any.whl (450.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file riskmapjnr-1.3.2.tar.gz.

File metadata

  • Download URL: riskmapjnr-1.3.2.tar.gz
  • Upload date:
  • Size: 441.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for riskmapjnr-1.3.2.tar.gz
Algorithm Hash digest
SHA256 003189c353c6eed74ea88d731a7d3537752654f160df8b4fb0ce1ba62ed9e9fb
MD5 0f1d75da4adf5b45dda6f9e0dd5dc274
BLAKE2b-256 20a09dc490342229f88dada540b537267ff42d68b18710e2e50b041d8779c497

See more details on using hashes here.

File details

Details for the file riskmapjnr-1.3.2-py2.py3-none-any.whl.

File metadata

  • Download URL: riskmapjnr-1.3.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 450.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for riskmapjnr-1.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 db5f3156eeff788b75e1d8da4e64dfdb86aaffaf302273c1f5ec8905fb4ae1c5
MD5 f3620818b61042230ff3b6c02c989c75
BLAKE2b-256 bd488eed47e83d786952a44929695dceb5982f5de8a8ec72f89acb8925bd2741

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page