Package: spacemodR 0.3.5

Virgile Baudrot

spacemodR: Wildlife Chemical Risk Mapping Through Food Webs

A workflow to map the risk of chemicals for wildlife: habitat, food web, dispersal, exposure and risk. Starting from a raster of chemical concentrations in the environment (e.g., metals in soil, pesticides in fields), the package builds habitat layers for a set of species, organises them in a directed acyclic graph representing a food web, and propagates the flow of elements (e.g., food, energy, chemicals) along its links. It also provides soil interpolation by kriging, dispersal by kernel convolution or by circuit theory (through the optional 'Julia' package 'Omniscape'), land cover retrieval for France ('OCS-GE') and Europe ('EUNIS'), and Bayesian calibration of transfer models with 'Stan'.

Authors:Virgile Baudrot [aut, cre, cph], Léa Bariod [aut], Clémentine Fritsch [aut, cph], Renaud Scheifler [aut], Quentin Devalloir [aut]

spacemodR_0.3.5.tar.gz
spacemodR_0.3.5.zip(r-4.7-x86_64)spacemodR_0.3.5.zip(r-4.7-arm64)spacemodR_0.3.5.zip(r-4.6-x86_64)spacemodR_0.3.5.zip(r-4.6-arm64)spacemodR_0.3.5.zip(r-4.5-x86_64)
spacemodR_0.3.5.tgz(r-4.6-x86_64)spacemodR_0.3.5.tgz(r-4.6-arm64)spacemodR_0.3.5.tgz(r-4.5-x86_64)spacemodR_0.3.5.tgz(r-4.5-arm64)
spacemodR_0.3.5.tar.gz(r-4.7-arm64)spacemodR_0.3.5.tar.gz(r-4.7-x86_64)spacemodR_0.3.5.tar.gz(r-4.6-arm64)spacemodR_0.3.5.tar.gz(r-4.6-x86_64)
spacemodR_0.3.5.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
spacemodR/json (API)

# Install 'spacemodR' in R:
install.packages('spacemodR', repos = c('https://qonfluens.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/qonfluens/spacemodr/issues

Pkgdown/docs site:https://qonfluens.github.io

Uses libs:
  • onetbb– Parallelism library for C++
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

onetbbcpp

5.55 score 18 scripts 222 downloads 38 exports 69 dependencies

Last updated from:22367e37e4. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK364
linux-devel-x86_64OK439
source / vignettesOK600
linux-release-arm64OK365
linux-release-x86_64OK389
macos-release-arm64OK366
macos-release-x86_64OK769
macos-oldrel-arm64OK382
macos-oldrel-x86_64OK783
windows-devel-arm64OK529
windows-devel-x86_64OK572
windows-release-arm64OK554
windows-release-x86_64OK470
windows-oldrel-x86_64OK529
wasm-releaseOK290

Exports:add_fluxadd_habitatadd_linkadd_nohabitatapply_fluxcalibrate_directcalibrate_simplecalibrate_trophiccompute_dispersalcompute_kernelcv_soildispersalfit_soil_variogramfluxget_departements_for_roiget_eunis_dataget_gbif_dataget_ocsgeget_ocsge_data_fgbget_ocsge_data_ignhabitathabitat_rasteris_cyclicjoin_ocsge_specieskernel_smooth_soilkrige_soilload_raster_extdatalower_neighborsnormalize_weightsplot_species_habitatraster_stacksoil_gridsoil_variogramsoil_vgmsource_covariatesspacemodeltransfertrophic

Dependencies:abindaskpassbackportsBHcallrcheckmateclassclassIntclicpp11curlDBIdescdistributionaldplyre1071farvergenericsggplot2gluegridExtragtablehttrinlineisobandjsonliteKernSmoothlabelinglifecycleloomagrittrmatrixStatsmimenumDerivopensslotelpatchworkpillarpkgbuildpkgconfigposteriorprocessxproxypsQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanrstantoolss2S7scalessfStanHeaderssystensorAterratibbletidyselectunitsutf8vctrsviridisLitewithrwk

Getting Started: Overview of spacemodR
1. Landscape and Habitats | 2. The Trophic Web | 3. The Spacemodel: The Core Object | 4. Dispersal and Movement | 5. Exposure and Contaminant Transfer | 6. Ecological Risk Mapping | Next Steps

Last update: 2026-10-12
Started: 2026-06-08

Getting Started: Vue d'ensemble de spacemodR
1. Le Paysage et les Habitats | 2. Le Réseau Trophique | 3. Le Spacemodel : l'objet central | 4. La Dispersion et le Mouvement | 5. Exposition et Transfert des Contaminants | 6. Cartographie du Risque Écologique | Prochaines Étapes

Last update: 2026-10-12
Started: 2026-06-08

Tutorial
1. Land cover of the study area | Study area | OCS-GE land cover | 2. Habitat layers | What is a habitat? | The habitat object | Adding layers one by one | The soil layer | From polygons to rasters | One stack for all layers | 3. Food web | 4. The spacemodel | 5. Dispersal | 6. Exposure | 7. Risk | Going further

Last update: 2026-10-12
Started: 2026-01-16

Readme and manuals

Help Manual

Help pageTopics
spacemodR: Wildlife Chemical Risk Mapping Through Food WebsspacemodR-package spacemodR
Subset method for trophic_tbl[.trophic_tbl
Add a Flux Ruleadd_flux
Add habitat zones to a Habitat objectadd_habitat
Add links to a trophic tableadd_link
Add non-habitat zones to a Habitat objectadd_nohabitat
Apply trophic flux from a resource layerapply_flux
Data concentration Cd Soil - Vegetation extracted from BAPPETbappet_cd
Calibrate direct transfer modelcalibrate_direct
Calibrate simple transfer modelcalibrate_simple
Calibrate trophic transfer modelcalibrate_trophic
Compute dispersal or spread map (Generic Engine)compute_dispersal
Create a 2D Gaussian motion kernel as a SpatRastercompute_kernel
Cross-validate a soil interpolation methodcv_soil
Bird Functional Traits Dataset (EltonTraits 1.0)DBFunc_BirdFuncDat
Mammal Functional Traits Dataset (EltonTraits 1.0)DBFunc_MamFuncDat
Disperse a species or variable over the landscapedispersal
Data concentration Cd Soil - Earthwormearthworm_cd
Species habitat dictionary for EUNIS Level 2 land cover classeseunis_species_dict
Fit a variogram model to an empirical soil variogramfit_soil_variogram
Constructor for Flux Parametersflux
Field Metabolic Rates Database (FmrBT)FmrBT
Identify codes of departments intersecting a region of interestget_departements_for_roi
Efficiently retrieve EUNIS land cover data from the EEA Ecosystem Type Mapget_eunis_data
Retrieve species occurrences from GBIFget_gbif_data
Retrieve OCS GE data for a region of interestget_ocsge
Efficiently retrieve OCS GE data from a remote FlatGeobufget_ocsge_data_fgb
Retrieve OCS GE data from the IGN Géoplateformeget_ocsge_data_ign
Create a Habitat objecthabitat
Rasterize a Habitat Objecthabitat_raster
Test if a directed graph is cyclicis_cyclic
Join OCSGE Spatial Data with Species Traitsjoin_ocsge_species
Gaussian kernel smoothing of soil concentrationskernel_smooth_soil
Krige soil concentrations into a rasterkrige_soil
load raster file from internal dataload_raster_extdata
Get resource layers for a given trophic layerlower_neighbors
Normalize weights of a trophic tablenormalize_weights
SF object defining very simplified OCS-GE soil cover metaleuropocsge_metaleurop
Species habitat dictionary for OCS-GE land cover and land useocsge_species_dict
OCS-GE land cover and land use of the Metaleurop siteocsge_us_metaleurop
Plot Habitat Suitability Maps from OCSGE Dataplot_species_habitat
Plot a Habitat objectplot.habitat
Plot an empirical variogram and its fitted model(s)plot.soil_vgm
Plot a trophic tableplot.trophic_tbl
Create a RasterStack from a list of rasters and namesraster_stack
Nomenclature and render colors of EUNIS land cover classesref_eunis
Nomenclature of OCS-GE soil coverref_ocsge
Crosswalk between OCS-GE (cover and use) and EUNIS Level 2ref_ocsge_eunis
SF object defining ROI metaleuroproi_metaleurop
DataBase of collected MicroMammals speciessf_micromammals
Build a regular raster grid around sampling pointssoil_grid
Soil metal concentrations sampled around the former Metaleurop smeltersoil_metaleurop
Empirical semi-variogram of soil concentrationssoil_variogram
Build a variogram model by handsoil_vgm
Distance and wind covariates around a contamination sourcesource_covariates
Create a spacemodel objectspacemodel
Eco-SSL Toxicity Data for Multiple Taxonomic GroupsSSD_ecoSSL_all
Summarise a cross-validationsummary.soil_cv
Transfer (food, contaminant) across trophic levelstransfer
Create a trophic tabletrophic