SkillAgentSearch skills...

SpatialEco

R package for spatial analysis and modelling of ecological systems

Install / Use

/learn @jeffreyevans/SpatialEco
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

spatialEco (dev 2.0-4) <img src="man/figures/logo.png" align="right" height="132" />

<!-- badges: start -->

R-CMD-check CRAN status CRAN RStudio mirror downloads

<!-- badges: end -->

spatialEco R package with utilities to support spatial data manipulation, query, sampling and modeling. Functions include models for species population density, qudrat-based analysis and sampling, spatial smoothing, multivariate separability, point process model for creating pseudo- absences and sub-sampling, polygon and point-distance structural metrics, auto-logistic model, sampling models, cluster optimization and statistical exploratory tools.

News

In version 2.0-3

Fixed bug in aspline.downscale where, grid.search = TRUE option was producing an error

Added function "z_normalization" that Z-normalizes a time series by subtracting its mean and dividing by the standard deviation meadian or MAD

Fixed bug in sf.kde where error was returned when specifying res and ref argument. Changed how the resoultion (res) and reference (ref) raster is checked and created

Fixed bug in aspline.downscale where, grid.search = TRUE option was producing an error

Fixed bug in raster.kendall where, other than the default, the method argument was not being reconized

Depreciated cgls.url due to digest files no longer reliable

Depreciated oli.aws due to AWS Registry of Open Data changing to the AWS Data Exchange 

Addressed terra focal issue in raster.gaussian.smooth so that convolution now works. 

Fixed bug in hil.pt and hil (thanks to Martin Macek)

Enhancement to hil.pt and hil that implements optional equations from original paper

As of version 2.0-2 I completley depreciated several functions (they no longer have aliasis) and cleaned up documentation. Other changes are;

Added suggest for the lwgeom package after sf dropped as Imports dependency

Added function to derive LAI (leaf area index) from NDVI

Fixed bug in sf.kde where bandwidth was not being reconized as argument

Reverted sf.kde to use modification of MASS 2dkde as, ks methods are somewhat
questionable with spatial data. 

In version 2.0-1

Fixed bug in sf.kde (thanks to Dirk Pflugmacher for pointing out rotation issue)  

Added function sf_dissolve for dissolving polygon features

Added function squareBuffer for creating square buffers

Fixed bug in raster.downsample where plot returned error when scatter=TRUE with one covariate  

Added function aspline.downscale for downscaling rasters using multivariate adaptive 
regression splines (thanks to discussion with Felipe Benavides)

Fixed a bug in breeding.density (thanks to Eric Newkirk) where st_distance was resulting 
in a units class object and crashing the function. 

Feature request (Alessandro Mondanaro), added an argument/option in sf_kde for using ks or the modified MASS kde2d function that
facilitates weights. The MASS kde2d was the KDE function in the sp.kde function.   

Fixed a bug in curvature (thanks to Rachel Wright) where type="mcnab" was returning source raster values 

Updated knn function to use sf class objects  

Fixed bug in wt.centroid when sf object is tibble (thanks to Andrew Gustar for drawing my attention to the bug) 

Fixed bug in stratified.random where if there are no replicates with replace = FALSE no results returned

Enhancement added support for prewhiting of autocorrelated time-series in kendall function

I jumped to a major release and pushed the version to 2.0-0. All spatial functions are now using the sf and terra packages due to sp, rgeos, rgdal, maptools and raster being retired. Sorry but, for the most part I removed backwards compatibility with these deprecated object classes so, you will need to make sure that you are using modern spatial object classes. In terra, there is now only one class type for multi or single band raster objects "SpatRaster" which can be read or coerced using terra::rast. For coercing sp class vector objects to sf you can use sf::st_as:sf or as(x, "sf") and, going from sf to sp you use as(x, "Spatial")

Available functions in development version of spatialEco 2.0-2

| spatialEco Function | Description | |:-----------------------------|:----------------------------------------------------------------------------------------| | all_pairwise | Creates a list of all pairwise combinations of a vector | | annulus.matrix | Creates a 0,1 matrix based on defined annulus parameters, can be used as a window matrix in a raster focal function | | aspline.downscale | Downscale raster to a higher resolution using multivariate adaptive regression splines (MARS) | | background | Creates a point sample that can be used as a NULL for SDM's and other modeling approaches (see pseudo.absence for alternate approach). | | bbox_extent | Creates a bounding box polygon representing the extent of a feature or raster |
| bearing.distance | Calculate new point based on bearing/distance
| breeding.density | Calculates n-th percent breeding density areas base on a kernel density estimate of population counts. | | built.index | remote sensing built-up index |
| cgls_urls | Deprecated Based on query, provide URL's for Copernicus Global Land Service datasets
| chae | The Canine-Human Age Equivalent (for fun)
| class.comparison | Deprecated, with migration to terra, I collapsed into raster.change
| classBreaks | for finding class breaks in a distribution
| collinear | Test for linear or nonlinear collinearity/correlation in data
| combine | Combines multiple rasters into an "all possible combinations" raster emulation the ESRI combine function | concordance | Performs a concordance/disconcordance (C-statistic) test on binomial models.
| conf.interval | Calculates confidence interval for the mean or median of a distribution with with unknown population variance | convexHull | Derives a convex hull of points using the alpha hull approach with adjustable tension. Please note that due to licensing reasons, this function is only available in the GitHub development version and not on CRAN. You must call the function from the package namespace using spatialEco:::convexHull | correlogram | Calculates and plots a correlogram (spatially lagged correlations, "pearson", "kendall" or "spearman") | cross.tab | Cross tabulate two rasters, labels outputs
| crossCorrelation | Calculates the partial spatial cross-correlation function
| csi | Calculates cosine similarity and angular similarity on two vectors or a matrix
| curvature | Zevenbergen & Thorne, McNab's or Bolstad's surface (raster) curvature
| dahi | Calculates the DAHI (Diurnal Anisotropic Heat Index)
| date_seq | Creates date sequence, given defined start and stop dates, with options for day, week, month, quarter, year or, minute. | daymet.point | Downloads DAYMET climate variables for specified point and timeperiod
| daymet.tiles | Returns a vector of DAYMET tile id's within a specified extent
| dispersion | Calculates the dispersion ("rarity") of targets associated with planning units
| dissection | Evans (1972) Martonne's modified dissection
| divergence | Kullback-Leibler Divergence (Cross-entropy)
| download.daymet | Deprecated
| download.hansen | Deprecated
| download.prism | Deprecated
| effect.size | Cohen's-d effect size with pooled sd for a control and experimental group
| erase.points | Erases points inside or outside a polygon feature class
| explode | Deprecated due to redundancy with sf::st_cast
| extract.vertices | extracts (x,y) vertices coordinates from polygons and linesa
| fuzzySum | Calculates the fuzzy sum of a vector
| gaussian.kernel | Creates a Gaussian Kernel of specified size and sigma
| geo.buffer | Buffers data in geographic coordinate space using a temporary projection
| group.pdf | Creates a probability density plot of y for each group of x
| hexagons | Create hexagon polygon “fishnet” of defined size and extent.
| hli.pt | Heat Load Index for tabular "point" data with sl

View on GitHub
GitHub Stars121
CategoryDevelopment
Updated4h ago
Forks32

Languages

R

Security Score

100/100

Audited on Mar 28, 2026

No findings