Changelog
Source:NEWS.md
spacemodR (development version)
New Features & Improvements
-
Species occurrences from GBIF: new function
get_gbif_data(), which downloads the occurrence records of a species for a region of interest with the public GBIF search API (no account needed) and returns them assfpoints. - New article “Species Occurrences (GBIF)”, which compares the records of the wood mouse (Apodemus sylvaticus) with its habitat scores from EUNIS and OCS-GE.
spacemodR 0.3.5
CRAN release: 2026-10-12
New Features & Improvements
-
Stacking order of habitat layers:
habitat(),add_habitat()andadd_nohabitat()gain apriorityargument, stored in a newprioritycolumn of thehabitatobject. Inhabitat_raster(), overlapping features are stacked by priority and the pixel takes the value of the top one, so the result no longer depends on the order of theadd_*()calls. By default each new layer goes on top of the previous ones, as before. -
Continuity of thin structures:
habitat(),add_habitat()andadd_nohabitat()gain atouchesargument, stored in a newtouchescolumn. Withtouches = TRUE, lines and polygons fill every pixel they touch inhabitat_raster(), which keeps hedgerows, rivers or roads continuous; withtouches = FALSE, polygons fill the pixels whose centre they cover. -
Mixed geometries:
habitat_raster()now accepts points, lines and polygons in the samehabitatobject. - The “Habitat Layer” article explains
priorityandtoucheson a watercourse of the Metaleurop landscape. -
OCS-GE from IGN: new function
get_ocsge(), a single entry point to get the OCS-GE of a region of interest, with asourceargument.source = "ign"calls the newget_ocsge_data_ign(), which downloads the per-department GeoPackages of the IGN Géoplateforme (no API key), keeps them in a cache directory and lets you choose the vintage withyear.source = "fgb"callsget_ocsge_data_fgb(), unchanged. Extracting the IGN archives needs thearchivepackage or the7zcommand line tool. -
OCS-GE / EUNIS crosswalk: new dataset
ref_ocsge_eunis, a ranked correspondence between the 14 OCS-GE cover classes (CS), optionally refined by land use (US), and the 45 EUNIS Level 2 classes, with the share of each match measured on the Metaleurop site. -
Land use in OCS-GE habitats:
ocsge_species_dictnow has rows for 47 (cover, use) pairs (code_us) in addition to the 14 covers, derived fromeunis_species_dictthroughref_ocsge_eunis.join_ocsge_species()gains aus_colargument: when the polygons carry the land use, they take the scores of their (cover, use) pair, and of their cover otherwise. New datasetocsge_us_metaleurop, the OCS-GE of the Metaleurop site with cover and use. - Habitat data sources guide: the article “Habitat Layer from EUNIS” becomes “Habitat Data Sources”. It compares OCS-GE cover, OCS-GE cover and use, and EUNIS, shows how to move between them, and lists the other sources that could refine them.
Behaviour changes
-
touchesdefaults toTRUE, whereashabitat_raster()used to fill the pixels whose centre is covered by a polygon, and the pixels of a thin line. Existing rasters therefore change: features are drawn larger. Settouches = FALSEto get the previous result, in particular for layers of contiguous polygons such as a land cover map. -
ocsge_species_dictrebuilt with the columns ofeunis_species_dict:weight_globalbecomessuitability,weight_movementbecomespermeability,weight_breedingand the species-level columns (sppID,taxon_group,habitat_breadth,specialization,confidence,in_france) are added, and cover codes are written without space ("CS2.2.1"). The scores themselves changed: they follow an anchored scale, are lower on classes that are not habitat, and movement accounts for flight.resistanceis now on a 1-100 logarithmic scale derived frompermeability(it was a 1-10 score): code that rescaled it, or testedresistance == 10, must be updated (usepermeability == 0for impassable classes). -
nom_especerenamedspecies_nameinocsge_species_dictandeunis_species_dict. -
plot_species_habitat()now expectssuitabilityinstead ofweight_global, and draws resistance on a log scale.
Bug fixes
-
habitat_raster()no longer fails on an emptyhabitatobject. -
get_eunis_data()returned the raster upside down (north and south swapped), because the image exported by the EEA service carries no georeferencing. The image is now georeferenced before being read. The Metaleurop layer shipped ininst/extdata/eunis_metaleurop_L2.tifwas rebuilt; rasters obtained with earlier versions must be downloaded again.
Packaging
- Preparation of the CRAN submission: shorter package title,
get_eunis_data()now takesservice_url = NULLby default (the EEA service, as before), the examples ofhabitat_raster()andplot()for habitat objects are run, and the vignette figures are lighter. -
calibrate_simple()checked for the wrong compiled model before sampling. -
dispersal(method = "omniscape")reports its progress withmessage()instead ofcat().
spacemodR 0.3.0
New Features & Improvements
-
Soil interpolation (kriging): new functions to build soil contamination rasters from sampling points, without additional dependency:
soil_variogram(),fit_soil_variogram(),soil_vgm(),krige_soil()(ordinary kriging or kriging with external drift),cv_soil()(random or spatial-block cross-validation),kernel_smooth_soil()(Gaussian smoothing reusingcompute_kernel()),soil_grid()andsource_covariates()(distance / wind covariates around a point source). New datasetsoil_metaleurop(595 soil Cd, Pb, Zn samples) and new article “Soil contamination maps by kriging”. -
EUNIS land cover: new function
get_eunis_data()to download EUNIS Level 1 / Level 2 land cover rasters for a region of interest from the EEA Ecosystem Type Map v3.1 service, and new lookup datasetref_eunis. -
Trophic graph plots:
plot()for trophic objects gains link weights and custom colors. - Dispersal: cleaned up the kernel dispersal code.
spacemodR 0.2.0
Breaking Changes
-
Refactored trophic fluxes interface: The
intake()function has been completely redesigned and renamed toflux()to better reflect the mathematical and ecological concept of transfer rates. -
New pipe-friendly syntax: The definition of transfer parameters no longer uses multiple named arguments. Users must now initialize the table with
flux()and chain specific rules using the newadd_flux()function. -
Namespace conflict resolution: The internal utility function previously named
flux()(used within thetransfer()function) has been renamed to avoid conflicts with the new main API.
New Features & Improvements
-
New
add_flux()function: Allows for adding transfer rules in a readable, sequential manner (e.g.,add_flux(from = "soil", to = "plant", value = ~ 10^x / 32)). -
Global target rules: In
add_flux(), if the source compartment (from) is not specified, the rule (value) is automatically applied to all links pointing to the target compartment (to). -
Safe default values: The
flux()function now features an explicitdefaultparameter. It is highly recommended to use1(full transfer) or0(no transfer) instead ofNAto prevent the propagation of missing values during subsequent model calculations.
spacemodR 0.1.3
CRAN release: 2026-02-20
-
Bug Fixes:
- Fixed an
rlang_error(replacement has length zero) inspacemodelraster layer sub-assignment within the Tutorial vignette. - Removed non-ASCII characters (smart quotes) from the
DBFunc_BirdFuncDatdataset to pass CRAN checks. - Resolved R CMD Check notes regarding
no visible binding for global variable(weight_global,weight_foraging,resistance).
- Fixed an
-
Documentation & Data:
- Added complete
roxygen2documentation for internal datasets:FmrBT,DBFunc_MamFuncDat, andDBFunc_BirdFuncDat. - Translated and enhanced the
Food_Intakevignette into professional scientific English. - Updated the
pkgdownwebsite structure to use a clean 3-tier navigation system (Quick Start, Core Guides, Example Zoo).
- Added complete
spacemodR 0.1.2
-
New Features:
- Added the
Food_Intakemodule and dataset integration (FmrBT, EltonTraits) to compute Daily Food Intake (DFI). - Included the Eco-SSL (Ecological Soil Screening Levels) risk index assessment example.
- Added the
-
Enhancements:
- Improved the
Omniscape_Connectivitytutorial with real-world spatial data for the Wood Mouse (Apodemus sylvaticus).
- Improved the