dynamicsdm
An R package for species geographical distribution and abundance modelling at high spatiotemporal resolution
Science Score: 59.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 7 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.9%) to scientific vocabulary
Keywords
dynamicsdm
google-earth-engine
googledrive
sdm
spatiotemporal
spatiotemporal-data-analysis
spatiotemporal-forecasting
species-distribution-modelling
species-distributions
Last synced: 6 months ago
·
JSON representation
Repository
An R package for species geographical distribution and abundance modelling at high spatiotemporal resolution
Basic Info
- Host: GitHub
- Owner: r-a-dobson
- Language: R
- Default Branch: main
- Homepage: https://github.com/r-a-dobson/dynamicSDM
- Size: 28.7 MB
Statistics
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
- Releases: 2
Topics
dynamicsdm
google-earth-engine
googledrive
sdm
spatiotemporal
spatiotemporal-data-analysis
spatiotemporal-forecasting
species-distribution-modelling
species-distributions
Created over 3 years ago
· Last pushed 8 months ago
Metadata Files
Readme
Changelog
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# dynamicSDM
[](http://www.gnu.org/licenses/gpl-3.0.html)
[](https://app.codecov.io/gh/r-a-dobson/dynamicSDM?branch=main)
[](https://github.com/r-a-dobson/dynamicSDM/actions)
[](https://doi.org/10.5281/zenodo.7405906)
[](https://doi.org/10.1111/2041-210X.14101)
[](https://CRAN.R-project.org/package=dynamicSDM)
# Added features dynamicSDM v1.3
* Added function `extract_static_coords` for extracting spatially-buffered co-ordinate data from static datasets.
* Added arguments to `dynamic_proj_covariates()` for adding static rasters to covariates for each data (e.g. static elevation raster)
* Removed package dependency on `raster`, `sp`, `geodist` and `geosphere`.
* All functions are now `terra` and `sf` compatible.
* The package has since been published in the **Open Access journal "Methods in Ecology and Evolution"**
[*Dobson, R., Challinor, A.J., Cheke, R.A., Jennings, S., Willis, S.G. and Dallimer, M., 2023. dynamicSDM: An R package for species geographical distribution and abundance modelling at high spatiotemporal resolution. Methods in Ecology and Evolution, 14, 1190-1199.*](https://doi.org/10.1111/2041-210X.14101)
# Summary
Across ecological research fields, species distribution and abundance modelling (SDM) is a major tool for understanding the drivers and patterns of species occurrence. To advance our ability to model species inhabiting dynamic ecosystems worldwide, **dynamicSDM** facilitates the incorporation of explanatory variables that are dynamic in both space and time.
Our functions are:
* **user-friendly** - requiring only simple inputs and outputs;
* **highly flexible** - offering diverse and open arguments for targeting study specifics;
* **computer friendly** - utilising Google Earth Engine and Google Drive to minimise the computing power and storage demands associated with high spatiotemporal resolution modelling.
# Package structure
dynamicSDM functions are split into four key modelling stages: response data, explanatory variables, modelling relationships and dynamic projections. See the package manual [here](https://github.com/r-a-dobson/dynamicSDM/blob/main/man/figures/dynamicSDM_1.3.pdf) for more details on each function.
### 1) Response data functions
Functions for preparing species distribution or abundance model input data for modelling with spatiotemporally dynamic explanatory variables.
* `convert_gbif()` Transform Global Biodiversity Information Facility occurrence records to `dynamicSDM` compatible.
* `spatiotemp_check()` Check species occurrence record formatting, completeness and validity.
* `spatiotemp_extent()` Filter species occurrence records by a given spatial and temporal extent.
* `spatiotemp_resolution()` Filter species occurrence records by given spatial and temporal resolution.
* `spatiotemp_bias()` Test for spatial and temporal bias in species occurrence records.
* `spatiotemp_thin()` Thin species occurrence records by spatial and temporal proximity.
* `spatiotemp_pseudoabs()` Generate pseudo-absence record coordinates and dates.
* `spatiotemp_weights()` Calculate sampling effort across spatial and temporal buffer from occurrence records.
### 2) Explanatory variable functions
Functions for extracting spatiotemporally dynamic explanatory variable data for species occurrence record co-ordinates and dates using Google Earth Engine.
* `extract_dynamic_coords()` Extract temporally dynamic explanatory variable data for occurrence records.
* `get_moving_window()` Generate a “moving window” matrix of optimal size for spatial buffering of explanatory variable data.
* `extract_buffered_coords()` Extract spatially buffered and temporally dynamic explanatory variable data for occurrence records.
* `extract_coords_combine()` Combine extracted explanatory variable data for occurrence records into single data frame for model fitting.
* `extract_static_coords` Extract spatially buffered data from static rasters for occurrence record co-ordinates (no temporal dimension).
### 3) Modelling relationship functions
Functions for generating species distribution or abundance models that account for spatial and temporal autocorrelation in dynamic explanatory variables.
* `spatiotemp_autocorr()` Test for spatial and temporal autocorrelation in species distribution model explanatory data.
* `spatiotemp_block()` Split occurrence records into spatial and temporal blocks for model fitting.
* `brt_fit()` Fit boosted regression tree models to species distribution or abundance data.
### 4) Dynamic projection functions
Functions for generating explanatory variable projection data frames at given spatiotemporal extent and resolution, and projecting species dynamic distribution and abundance patterns onto these.
* `dynamic_proj_dates()` Generate vector of dates for dynamic projections
* `extract_dynamic_raster()` Extract temporally dynamic rasters of explanatory variable data.
* `extract_buffered_raster()` Extract spatially buffered and temporally dynamic rasters of explanatory variable data.
* `dynamic_proj_covariates()` Combine explanatory variable rasters into a covariate data frame for each projection date.
* `dynamic_proj()` Project species distribution and abundance models onto dynamic environmental covariates.
* `dynamic_proj_GIF()` Create GIF of dynamic species distribution and abundance projections
# Installation
``` r
# Install using Github
install_github("r-a-dobson/dynamicSDM")
```
# Common installation errors
dynamicSDM depends on a range of spatial and graphic R packages, which may result in some persistent
errors on installation or running of certain functions.
If you encounter an error or bug when installing and using dynamicSDM, please post a comment
[here](https://github.com/r-a-dobson/dynamicSDM/issues) for guidance and support from us.
Below we have outlined common errors and typical solutions to try, depending on your operating
system
#### 1) Error with rgl
```{r,eval=F}
# Loading rgl's DLL failed. This build of rgl depends on XQuartz, which failed to load.
options(rgl.useNULL = TRUE)
library(rgl)
```
#### 2) Dependency package terra
On Homebrew (macOS) run:
```{Homebrew,eval=F}
brew install pkg-config
brew install gdal
```
On Linux run:
```{Linux,eval=F}
sudo apt-get install libgdal-dev libproj-dev libgeos-dev libudunits2-dev netcdf-bin
```
Then in R run:
```{r,eval=F}
install.packages("Rcpp")
install.packages('terra', repos='https://rspatial.r-universe.dev')
```
#### 3) Dependency package magick
On Homebrew (macOS) run:
```{Homebrew,eval=F}
brew install imagemagick@6
```
On Linux run:
```{Linux,eval=F}
sudo apt-get install -y libmagick++-dev
```
Then in R run:
```{r,eval=F}
install.packages("magick")
```
Owner
- Name: radobson
- Login: r-a-dobson
- Kind: user
- Location: UK
- Twitter: RachelDobson98
- Repositories: 2
- Profile: https://github.com/r-a-dobson
PhD researcher in School of Earth and Environment at University of Leeds, UK.
GitHub Events
Total
- Watch event: 2
- Push event: 6
Last Year
- Watch event: 2
- Push event: 6
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| RachelDobson | e****o@l****k | 89 |
| RachelDobson | 7****n | 51 |
| r-a-dobson | 7****n | 36 |
Committer Domains (Top 20 + Academic)
leeds.ac.uk: 1
Issues and Pull Requests
Last synced: about 2 years ago
All Time
- Total issues: 4
- Total pull requests: 0
- Average time to close issues: 31 minutes
- Average time to close pull requests: N/A
- Total issue authors: 3
- Total pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 4
- Pull requests: 0
- Average time to close issues: 31 minutes
- Average time to close pull requests: N/A
- Issue authors: 3
- Pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- fernandabiologia (3)
- simonrolph (2)
- r-a-dobson (1)
- vineetkrdubey (1)
- Rogerio-7 (1)
- GretaBocedi (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 384 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 8
- Total maintainers: 1
cran.r-project.org: dynamicSDM
Species Distribution and Abundance Modelling at High Spatio-Temporal Resolution
- Homepage: https://github.com/r-a-dobson/dynamicSDM
- Documentation: http://cran.r-project.org/web/packages/dynamicSDM/dynamicSDM.pdf
- License: GPL (≥ 3)
-
Latest release: 1.3.4
published over 1 year ago
Rankings
Forks count: 28.8%
Dependent packages count: 29.8%
Average: 32.3%
Downloads: 32.5%
Stargazers count: 35.2%
Dependent repos count: 35.5%
Maintainers (1)
Last synced:
7 months ago
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v1 composite
DESCRIPTION
cran
- R >= 3.5.0 depends
- ape * imports
- dplyr * imports
- gargle * imports
- gbm * imports
- geodist * imports
- geosphere * imports
- ggplot2 * imports
- googledrive * imports
- grDevices * imports
- graphics * imports
- lubridate * imports
- magick * imports
- magrittr * imports
- matrixStats * imports
- methods * imports
- rangemap * imports
- raster * imports
- reticulate * imports
- rgee * imports
- rgeos * imports
- sp * imports
- stats * imports
- stringr * imports
- terra * imports
- tidyr * imports
- utils * imports
- covr * suggests
- testthat >= 3.0.0 suggests