Comments (5)
I am on leave until next week, but happy to chat during lunch next week (or anytime)
from ibis.isdm.
I have worked on this using the ecospat
packages. Here is my approach. x
and y
are the point and range maps. envir
is the stack of predictors.
Source:
- https://doi.org/10.1111/j.1466-8238.2011.00698.x
- http://www.unil.ch/ecospat/home/menuguid/ecospat-resources/tools.html
- https://doi.org/10.1111/j.1558-5646.2010.01204.x
library(ecospat)
library(ade4)
library(terra)
compare_niches <- function(x, y, envir) {
# extract values for first object
values_x <- terra::extract(x = envir, y = x, ID = FALSE)
values_x <- values_x[complete.cases(values_x), ]
# extract values for second object
values_y <- terra::extract(x = envir, y = y, ID = FALSE)
values_y <- values_y[complete.cases(values_y), ]
# extract environmental values
values_envir <- terra::as.data.frame(x = envir)
# Calibrating the PCA in the whole study area, including both x and
# y ranges (same as PCAenv in Broenniman et al. 2012)
pca_env <- ade4::dudi.pca(values_envir, center = TRUE, scale = TRUE, scannf = FALSE,
nf = 2)
# predict the global envir scores on the PCA axes
scores_bkg<- pca_env$li
# scores for the two species
scores_x <- ade4::suprow(pca_env, values_x)$lisup
scores_y <- ade4::suprow(pca_env, values_y)$lisup
# calculation of occurence density
suppressMessages(density_x <- ecospat::ecospat.grid.clim.dyn(glob = scores_bkg, glob1 = scores_bkg,
sp = scores_x, R = 100))
suppressMessages(density_y <- ecospat::ecospat.grid.clim.dyn(glob = scores_bkg, glob1 = scores_bkg,
sp = scores_y, R = 100))
# calculate overlap
ecospat::ecospat.niche.overlap(density_x, density_y, cor = TRUE)
}
from ibis.isdm.
Sounds good. I think it would be neat if there is a wrapper function for ibis.iSDM objects. So specifically by providing a BiodiversityDistribution-class
object to the function and it then extracts the covariates and any datasets (both ranges and points) to construct the plot.
If at all possible without extra dependencies, e.g. ecospat
, the better (PCA can be created with base R)
from ibis.isdm.
Sounds all reasonable 👍
The function above is not exactly Piero's idea, but similar, and based on the first paper listed under the Sources. So in terms of a BiodiversityDistribution-class
would this extract the biodiversity data and the range? Or what would should it be possible to provide two BiodiversityDistribution-class
objects? Or both ?
from ibis.isdm.
Sounds all reasonable 👍
The function above is not exactly Piero's idea, but similar, and based on the first paper listed under the Sources. So in terms of a
BiodiversityDistribution-class
would this extract the biodiversity data and the range? Or what would should it be possible to provide twoBiodiversityDistribution-class
objects? Or both ?
We made a sketch in the coffee room today :D But yeah, extract all specified biodiversity data in the object. Can talk tmr or so about it.
from ibis.isdm.
Related Issues (20)
- integrated SDM predicts near-zeros across most of study area HOT 6
- Question: How to make predictions over smaller spatial domain, or on a new set of predictor rasters. HOT 5
- Issue with GDP priors and custom formula HOT 5
- Issue with `project()` when used with integrated model HOT 9
- Issue with BREG priors and custom formula HOT 1
- INLA/INLABRU engines option
- Integration several datasets HOT 3
- Partial (and spartial) calculations of glmnet seem to ignore lambda
- Improvements thin_observations HOT 2
- Implemement a (Deep) Neural Network as engine in ibis
- Support for compositing of threshold values via `ensemble`
- Implement spatial block-validation in `ibis.iSDM` ?
- Error with `distribution()` if `getOption("ibis.setupmessages")` is NULL HOT 6
- Unclear warning log message with `distribution()` HOT 4
- Possible typo in FAQ HOT 1
- Error with `train()` when using INLA with `add_biodiversity_poipa()` and weights HOT 7
- Extracting pseudo-absences HOT 6
- Importing of terra and sf HOT 1
- Prediction raster from `train()` does not spatially conform with `distribution()` background HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ibis.isdm.