A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

IUCNN

Environmental data and existing IUCN Red List assessments to predict the conservation status of "Not Evaluated" species, for any taxon or geographic region of interest.
https://github.com/iucnn/iucnn

Category: Biosphere
Sub Category: Biodiversity Data Access and Management

Keywords

conservation conservation-prioritization deep-learning machine-learning tensorflow

Last synced: about 21 hours ago
JSON representation

Repository metadata

Train neural networks based on geographic species occurrences, environmental data and existing IUCN Red List assessments to predict the conservation status of "Not Evaluated" species, for any taxon or geographic region of interest. https://iucnn.github.io/IUCNN/

README.md

Project Status: Active – The project has reached a stable, usable state and is being actively developed.
DOI
R-CMD-check

IUCNN has been updated to version 3.0 on github and will shortly be updated on CRAN to adapt to the retirement of sp and raster. The update may not be compatible with analysis-pipelines build with version 2.x

IUCNN

Batch estimation of species' IUCN Red List threat status using neural networks.

Installation

  1. Install IUCNN directly from Github using devtools (some users, will need to start from the step 2 before installing the package).
install.packages("devtools")
library(devtools)

install_github("IUCNN/IUCNN")
  1. Since some of IUCNNs functions are run in Python, IUCNN needs to set up a Python environment. This is easily done from within R, using the install_miniconda() function of the package reticulate (this will need c. 3 GB disk space).
    If problems occur at this step, check the excellent documentation of reticulate.
install.packages("reticulate")
library(reticulate)
install_miniconda()
  1. Install the tensorflow python library. Note that you may need a fresh
    R session to run the following code.
install_github("rstudio/tensorflow")
library(tensorflow)
install_tensorflow()
  1. Install the npBNN python library from Github:
reticulate::py_install("https://github.com/dsilvestro/npBNN/archive/refs/tags/v0.1.11.tar.gz", pip = TRUE)

Usage

There are multiple models and features available in IUCNN. A vignette with a detailed tutorial on how to use those is available as part of the package: vignette("Approximate_IUCN_Red_List_assessments_with_IUCNN"). Running IUCNN will write files to your working directory.

A simple example run for terrestrial orchids (This will take about 5 minutes and download ~500MB of data for feature preparation into the working directory):

library(tidyverse)
library(IUCNN)

#load example data 
data("training_occ") #geographic occurrences of species with IUCN assessment
data("training_labels")# the corresponding IUCN assessments
data("prediction_occ") #occurrences from Not Evaluated species to prdict

# 1. Feature and label preparation
features <- iucnn_prepare_features(training_occ) # Training features
labels_train <- iucnn_prepare_labels(x = training_labels,
                                     y = features) # Training labels
features_predict <- iucnn_prepare_features(prediction_occ) # Prediction features

# 2. Model training
m1 <- iucnn_train_model(x = features, lab = labels_train)

summary(m1)
plot(m1)

# 3. Prediction
iucnn_predict_status(x = features_predict,
                     model = m1)

Additional features quantifying phylogenetic relationships and geographic sampling bias are available via iucnn_phylogenetic_features and iucnn_bias_features.

With model testing

library(tidyverse)
library(IUCNN)

#load example data 
data("training_occ") #geographic occurrences of species with IUCN assessment
data("training_labels")# the corresponding IUCN assessments
data("prediction_occ") #occurrences from Not Evaluated species to predict

# Feature and label preparation
features <- iucnn_prepare_features(training_occ) # Training features
labels_train <- iucnn_prepare_labels(x = training_labels,
                                     y = features) # Training labels
features_predict <- iucnn_prepare_features(prediction_occ) # Prediction features


# Model testing
# For illustration models differing in dropout rate and number of layers

mod_test <- iucnn_modeltest(x = features,
                            lab = labels_train,
                            mode = "nn-class",
                            dropout_rate = c(0.0, 0.1, 0.3),
                            n_layers = c("30", "40_20", "50_30_10"),
                            cv_fold = 5,
                            init_logfile = TRUE)

# Select best model
m_best <- iucnn_best_model(x = mod_test,
                          criterion = "val_acc",
                          require_dropout = TRUE)

# Inspect model structure and performance
summary(m_best)
plot(m_best)

# Train the best model on all training data for prediction
m_prod <- iucnn_train_model(x = features,
                            lab = labels_train,
                            production_model = m_best)

# Predict RL categories for target species
pred <- iucnn_predict_status(x = features_predict,
                             model = m_prod)
plot(pred)

Using a convolutional neural network

features <- iucnn_cnn_features(training_occ) # Training features
labels_train <- iucnn_prepare_labels(x = training_labels,
                                     y = features) # Training labels
features_predict <- iucnn_cnn_features(prediction_occ) # Prediction features

Citation

library(IUCNN)
citation("IUCNN")

Zizka A, Andermann T, Silvestro D (2022). "IUCNN - Deep learning approaches to approximate species’ extinction risk." Diversity and Distributions, 28(2):227-241 doi: 10.1111/ddi.13450.

Zizka A, Silvestro D, Vitt P, Knight T (2021). “Automated conservation assessment of the orchid family with deep
learning.” Conservation Biology, 35(3):897-908, doi: doi.org/10.1111/cobi.13616


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 7 days ago

Total Commits: 341
Total Committers: 7
Avg Commits per committer: 48.714
Development Distribution Score (DDS): 0.569

Commits in past year: 33
Committers in past year: 1
Avg Commits per committer in past year: 33.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Alexander Zizka z****r@g****m 147
Tobias Andermann t****n@b****e 122
BrunoVilela b****a@h****m 33
Daniele Silvestro s****e@g****m 24
Alexander Zizka (local) z****l@p****E 10
tandermann t****n@e****e 4
Matthias Grenié m****e@e****r 1

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 58
Total pull requests: 1
Average time to close issues: 5 months
Average time to close pull requests: 2 days
Total issue authors: 13
Total pull request authors: 1
Average comments per issue: 1.31
Average comments per pull request: 1.0
Merged pull request: 1
Bot issues: 0
Bot pull requests: 0

Past year issues: 3
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 2
Past year pull request authors: 0
Past year average comments per issue: 1.0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/iucnn/iucnn

Top Issue Authors

  • azizka (32)
  • ricardosegovia (7)
  • Orange-chen-PEAR (4)
  • tandermann (4)
  • PabloMLucas (3)
  • sandro-unibe (1)
  • samkands (1)
  • brenaac (1)
  • collisilva (1)
  • Lucmas9 (1)
  • luannpedro (1)
  • zhaoyiliu (1)
  • akarolinamoreno (1)

Top Pull Request Authors

  • Rekyt (1)

Top Issue Labels

  • enhancement (12)
  • documentation (4)
  • bug (2)

Top Pull Request Labels


Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
DESCRIPTION cran
  • R >= 4.1 depends
  • PVR * imports
  • checkmate * imports
  • curl * imports
  • dplyr * imports
  • grDevices * imports
  • graphics * imports
  • magrittr * imports
  • missForest * imports
  • rCAT * imports
  • raster * imports
  • readr * imports
  • reticulate * imports
  • sf * imports
  • stats * imports
  • terra * imports
  • tidyr * imports
  • tidyselect * imports
  • ape * suggests
  • covr * suggests
  • knitr * suggests
  • markdown * suggests
  • rmarkdown * suggests
  • sampbias * suggests
  • spelling * suggests
  • testthat * suggests

Score: 5.556828061699537