LIFE
Implementation of the methodology for the Eyres et al LIFE biodiversity metric.
https://github.com/quantifyearth/life
Category: Biosphere
Sub Category: Biodiversity Analysis and Metrics
Keywords
aoh biodiversity ecology extinction
Last synced: about 16 hours ago
JSON representation
Repository metadata
Implementation of the methodology for the Eyres et al LIFE biodiversity metric
- Host: GitHub
- URL: https://github.com/quantifyearth/life
- Owner: quantifyearth
- License: isc
- Created: 2022-08-04T13:06:29.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2026-06-30T10:14:22.000Z (25 days ago)
- Last Synced: 2026-07-05T19:00:39.626Z (20 days ago)
- Topics: aoh, biodiversity, ecology, extinction
- Language: Python
- Homepage:
- Size: 396 KB
- Stars: 4
- Watchers: 5
- Forks: 4
- Open Issues: 4
- Releases: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
LIFE implementation
This repository implements the LIFE extinction risk methodology as published in Eyres et al. The code will generate maps that cover the impact to extinction risk in an area under the two scenarios: conversion of the land to arable use, and coversion of the land to pre-human.
Running the code
The methodology is explained in more detail in method.md. The pipeline is implemented as a Snakemake workflow in workflow/.
Prerequisites
The following tools must be available on PATH:
reclaimer— downloads inputs from Zenodo (quantifyearth/reclaimer)aoh-calc,aoh-habitat-process,aoh-collate-data,aoh-species-richness,aoh-endemism,aoh-validate-prevalence— from theaohPython packagegdalwarp— part of GDAL
The following environment variables must be set:
| Variable | Purpose |
|---|---|
DATADIR |
Root directory for all input/output data |
DB_HOST, DB_NAME, DB_USER, DB_PASSWORD |
PostgreSQL credentials for IUCN species database |
For GBIF occurrence validation (optional):
| Variable | Purpose |
|---|---|
GBIF_USERNAME, GBIF_EMAIL, GBIF_PASSWORD |
GBIF account credentials |
Running the pipeline
# Full pipeline: delta P maps for all scenarios + model validation
snakemake --cores N all
# Delta P maps only, without validation
snakemake --cores N life
# Species richness and endemism maps (not included in 'all')
snakemake --cores N summaries
# Model validation only
snakemake --cores N validation
# GBIF occurrence validation (expensive — downloads gigabytes of data)
snakemake --cores N occurrence_validation
Other useful targets for incremental runs:
snakemake --cores N prepare # Download and warp all base layers
snakemake --cores N species_data # Extract species data from the database
snakemake --cores N aohs # Generate all AOH rasters and collated CSVs
Precious layers
The habitat and elevation layers are expensive to generate and are treated as precious: they will only be rebuilt if their output files are explicitly deleted, even if upstream inputs or code have changed. This applies to:
habitat_layers/current/— food-enhanced current habitat map at ~1.67km resolutionhabitat_layers/{scenario}/— per-scenario fractional habitat mapshabitat_layers/pnv/— potential natural vegetation fractional mapselevation-max.tif,elevation-min.tif— warped elevation layers
To force a rebuild of any of these, delete the relevant .sentinel file (or the output file itself) before re-running.
Configuration
Pipeline parameters are in config/config.yaml:
taxa— taxonomic classes to process (default: AMPHIBIA, AVES, MAMMALIA, REPTILIA)scenarios— habitat change scenarios to evaluate (default: arable, restore)curve— extinction curve exponent for delta P (default:"0.25")pixel_scale— output raster resolution in degrees (default: ~5 arc-seconds)
Inspecting the pipeline graph
The rule graph can be generated with:
snakemake --forceall --rulegraph 2>/dev/null | dot -Tsvg > graph.svg
Note that rules whose inputs are determined by the species-extraction checkpoint (generate_aoh, calculate_delta_p) will not appear in the static rule graph — this is a known snakemake limitation with checkpoint-based expansion. To see the complete job graph after species data has been extracted:
snakemake --forceall --dag 2>/dev/null | unflatten -f -l 5 | dot -Tsvg > dag.svg
Credits
Originally derived from and using IUCN modlib and aoh lib by Daniele Baisero.
Owner metadata
- Name: Quantify Earth
- Login: quantifyearth
- Email: avsm2@cam.ac.uk
- Kind: organization
- Description: Quantifying environment data around the globe, by the Cambridge Conservation Initiative at the University of Cambridge.
- Website: https://quantify.earth
- Location: United Kingdom
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/149889182?v=4
- Repositories: 1
- Last ynced at: 2023-11-21T20:35:57.393Z
- Profile URL: https://github.com/quantifyearth
GitHub Events
Total
- Delete event: 11
- Pull request event: 25
- Fork event: 1
- Issues event: 9
- Watch event: 2
- Issue comment event: 7
- Push event: 43
- Public event: 1
- Pull request review event: 1
- Create event: 20
Last Year
- Delete event: 4
- Pull request event: 12
- Fork event: 1
- Issues event: 2
- Issue comment event: 1
- Push event: 32
- Create event: 12
Committers metadata
Last synced: 9 days ago
Total Commits: 278
Total Committers: 6
Avg Commits per committer: 46.333
Development Distribution Score (DDS): 0.115
Commits in past year: 72
Committers in past year: 3
Avg Commits per committer in past year: 24.0
Development Distribution Score (DDS) in past year: 0.139
| Name | Commits | |
|---|---|---|
| Michael Dales | m****4@c****k | 246 |
| mwd24 | m****4@c****k | 23 |
| alieyres | a****s@g****m | 3 |
| Ali | a****1@c****k | 3 |
| thomasball42 | t****2@c****k | 2 |
| Miranda Black | M****k@o****m | 1 |
Committer domains:
- cam.ac.uk: 3
- cl.cam.ac.uk: 1
Issue and Pull Request metadata
Last synced: 20 days ago
Total issues: 6
Total pull requests: 17
Average time to close issues: over 1 year
Average time to close pull requests: 7 days
Total issue authors: 2
Total pull request authors: 1
Average comments per issue: 1.83
Average comments per pull request: 0.0
Merged pull request: 15
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 12
Past year average time to close issues: 17 days
Past year average time to close pull requests: 10 days
Past year issue authors: 1
Past year pull request authors: 1
Past year average comments per issue: 1.0
Past year average comments per pull request: 0.0
Past year merged pull request: 10
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- alieyres (4)
- mdales (2)
Top Pull Request Authors
- mdales (17)
Top Issue Labels
Top Pull Request Labels
- 🏗️ enhancement (1)
Dependencies
- actions/checkout v4 composite
- actions/setup-python v3 composite
- ghcr.io/osgeo/gdal ubuntu-small-3.6.4 build
- golang bullseye build
- alive-progress *
- gdal ==3.9.3
- geopandas *
- mypy *
- numpy <2
- pandas *
- pandas-stubs *
- postgis *
- psutil *
- psycopg2 *
- pyarrow *
- pylint *
- pyproj *
- pytest *
- rasterio *
- requests *
- scikit-image *
- scipy *
- types-requests *
Score: 3.8712010109078907