Skip to main content

Calculating the CBD target 6.1 indicator from occurrence cubes

Project description

b3alien: a Python package to calculate the Target 6.1 headline indicator of the CBD

Build Coverage PyPI Docs License

Introduction

The historic Kunming-Montreal Global Biodiversity Framework, which supports the achievement of the Sustainable Development Goals and builds on the Convention on Biological Diversity’s (CBD) previous Strategic Plans, sets out an ambitious pathway to reach the global vision of a world living in harmony with nature by 2050. Among the Framework’s key elements are 23 targets for 2030. In order to track the progress on the targets, a number of indicators were agreed upon for each target. The B3ALIEN software provides a technical solution to track Target 6: “Reduce the Introduction of Invasive Alien Species by 50% and Minimize Their Impact.” It mainly focusses on the headline indicator: rate of invasive alien species establishment, but can provide input to some of the complementary indicators.

Decision makers at local, regional, national and international levels need accurate and reliable information about status, trends, threats, and they need data presented in an actionable and understandable format, with measures of uncertainty. Furthermore, we need synthesized data products that can be combined with other environmental data, such as climate, soil chemistry, land use, altitude... B3ALIEN is built upon the concept of data cubes developed in the Horizon Europe Biodiversity Building Blocks for Policy project (b- cubed.eu). It uses the solid foundations of the GBIF infrastructure, where tools such as the GBIF Taxonomic Backbone and the Global Registry of Introduced and Invasive Species are available by default. Readily available occurrence data is used to determine and estimate accurately the rate of introduction of alien species..

Architecture

png

Example usage

from b3alien import b3cube
from b3alien import visualisation
from b3alien.utils.runtime import in_jupyter
from b3alien import griis
from b3alien import simulation

import matplotlib
matplotlib.use("TkAgg")
cube = b3cube.OccurrenceCube("gs://b-cubed-eu/data_PT-30b.parquet", gproject='$GPROJECT-ID')
print(cube.df)
       kingdom  kingdomkey           phylum  phylumkey              class  \
0      Plantae           6       Charophyta    7819616       Charophyceae   
1      Plantae           6     Tracheophyta    7707728     Polypodiopsida   
2      Plantae           6     Tracheophyta    7707728     Polypodiopsida   
3      Plantae           6     Tracheophyta    7707728     Polypodiopsida   
4      Plantae           6     Tracheophyta    7707728     Polypodiopsida   
...        ...         ...              ...        ...                ...   
52187  Plantae           6     Tracheophyta    7707728      Magnoliopsida   
52188  Plantae           6     Tracheophyta    7707728      Magnoliopsida   
52189  Plantae           6     Tracheophyta    7707728      Magnoliopsida   
52190  Plantae           6  Marchantiophyta          9  Jungermanniopsida   
52191  Plantae           6        Bryophyta         35          Bryopsida   

       classkey            order  orderkey          family  familykey  ...  \
0           328         Charales       626       Characeae       8782  ...   
1       7228684      Salviniales   7229405    Salviniaceae       6629  ...   
2       7228684     Polypodiales       392   Polypodiaceae       2368  ...   
3       7228684     Polypodiales       392   Polypodiaceae       2368  ...   
4       7228684     Polypodiales       392   Polypodiaceae       2368  ...   
...         ...              ...       ...             ...        ...  ...   
52187       220     Malpighiales      1414   Euphorbiaceae       4691  ...   
52188       220     Malpighiales      1414   Euphorbiaceae       4691  ...   
52189       220     Malpighiales      1414   Euphorbiaceae       4691  ...   
52190       126  Jungermanniales       381  Calypogeiaceae       2289  ...   
52191       327        Pottiales       621      Pottiaceae       4671  ...   

      classcount  ordercount familycount genuscount distinctobservers  \
0              1           1           1          1                 1   
1             11           1           1          1                 1   
2              1           1           1          1                 1   
3              1           1           1          1                 1   
4              6           6           1          1                 1   
...          ...         ...         ...        ...               ...   
52187         27           4           4          2                 1   
52188         27           4           4          2                 1   
52189         26           3           3          3                 1   
52190          2           2           1          1                 1   
52191          4           1           1          1                 1   

      occurrences  mintemporaluncertainty  mincoordinateuncertaintyinmeters  \
0               1                 2678400                            1000.0   
1               1                      60                              23.0   
2               1                   86400                            1000.0   
3               1                 2505600                            1000.0   
4               1                   86400                            1000.0   
...           ...                     ...                               ...   
52187           1                       1                              16.0   
52188           1                       1                               6.0   
52189           3                   86400                            2400.0   
52190           1                       1                            1000.0   
52191           1                   86400                              30.0   

           cellCode                                           geometry  
0      W016N32ACAAA  POLYGON ((-17 32.71875, -16.96875 32.71875, -1...  
1      W016N32ACADB  POLYGON ((-16.90625 32.65625, -16.875 32.65625...  
2      W016N32AACCA  POLYGON ((-17 32.78125, -16.96875 32.78125, -1...  
3      W016N32AACCD  POLYGON ((-16.96875 32.75, -16.9375 32.75, -16...  
4      W016N32AACCD  POLYGON ((-16.96875 32.75, -16.9375 32.75, -16...  
...             ...                                                ...  
52187  W017N32BDBCB  POLYGON ((-17.09375 32.65625, -17.0625 32.6562...  
52188  W017N32BDBCB  POLYGON ((-17.09375 32.65625, -17.0625 32.6562...  
52189  W017N32BDBDA  POLYGON ((-17.0625 32.65625, -17.03125 32.6562...  
52190  W016N32AACDB  POLYGON ((-16.90625 32.78125, -16.875 32.78125...  
52191  W017N32BBCAD  POLYGON ((-17.21875 32.8125, -17.1875 32.8125,...  

[52192 rows x 28 columns]
cube._species_richness()
print(cube.richness)
             cell  richness
0    W016N30DDDDA         3
1    W016N32AACAC       212
2    W016N32AACAD       152
3    W016N32AACBC       168
4    W016N32AACBD       225
..            ...       ...
120  W017N32BDBCA       136
121  W017N32BDBCB       165
122  W017N32BDBDA       189
123  W017N32BDBDB       276
124  W017N32BDBDD        91

[125 rows x 2 columns]
b3cube.plot_richness(cube.richness, cube.df)

png

CL = griis.CheckList("$YOUR_DIRECTORY/merged_distr.txt")
d_s, d_c = b3cube.cumulative_species(cube, CL.species)
time, rate = b3cube.calculate_rate(d_c)
C1 = simulation.simulate_solow_costello(time, rate, vis=True)
Optimization terminated successfully.
         Current function value: -263.092115
         Iterations: 172
         Function evaluations: 287

png


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

b3alien-0.0.4.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

b3alien-0.0.4-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file b3alien-0.0.4.tar.gz.

File metadata

  • Download URL: b3alien-0.0.4.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for b3alien-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1d6fff622b04d2230abf8a142ebf0adc02f3b818c1bd56a23ffe9c7c6dc83bad
MD5 80a44f968dc3af5f950752133c4de90c
BLAKE2b-256 a8a2d0a6c0d1cefff21fb487a41c9f5819508fad97abbb3b5618056f784b1e9f

See more details on using hashes here.

File details

Details for the file b3alien-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: b3alien-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for b3alien-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9295fdf7fbaacdcee4748d779bc2a4f39c1027039d88357c1f3d0ffaada62fe4
MD5 c7775f131d6a29fa80375486b58e93bf
BLAKE2b-256 ba3511d0591478f4ff5d72b0fbd33f4580faa832b4f72aa25e0cbd537d19a7cf

See more details on using hashes here.

Supported by

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