sptotal
sptotal: an R package for predicting totals and weighted sums from spatial data - Published in JOSS (2023)
Science Score: 95.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 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
2 of 5 committers (40.0%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Scientific Fields
Repository
Package for Fitting Spatial Linear Models and Predicting Total Abundances for Finite Populations
Basic Info
Statistics
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
sptotal implements finite population block kriging (FPBK, Ver Hoef (2008)), a geostatistical approach to predicting means and totals of count data for finite populations.
See sptotal's Website for more information.
The accepted Journal of Open Source Software paper on sptotal can be found at
Statement of Need
The primary purpose of sptotal is to provide an implementation of the Finite Population Block Kriging (FPBK) methods developed in Ver Hoef (2002) and Ver Hoef (2008). The method is useful when
- there are a finite number of spatial locations (or sites)
- only a subset of the spatial locations are sampled
- there is expected to be some spatial correlation
Examples of settings where FPBK is useful include wildlife abundance surveys performed on a finite number of spatial locations. In these surveys, it is not uncommon to only sample a subset of the region.
Installation Instructions
sptotal can be installed from CRAN
{r}
install.packages("sptotal")
or using devtools
{r}
library(devtools)
install_git("https://github.com/highamm/sptotal.git")
Simple Example
The sptotal package can be used for spatial prediction in settings where there are a finite number of sites and some of these sites were not sampled. Note that, to keep this example simple, we are simulating response values that are spatially independent. In a real example, we assume that there is some spatial dependence in the response.
```{r} set.seed(102910) spatialcoords <- expand.grid(1:10, 1:10) toydf <- data.frame(xco = spatialcoords[ ,1], yco = spatialcoords[ ,2], counts = sample(c(rpois(50, 15), rep(NA, 50)), size = 100, replace = TRUE))
mod <- slmfit(formula = counts ~ 1, xcoordcol = "xco", ycoordcol = "yco", data = toy_df) summary(mod)
pred <- predict(mod) ```
We can look at the predictions with
{r}
pred$Pred_df[1:6, c("xco", "yco", "counts", "counts_pred_count")]
Methods and Basic Functions
sptotal Main Functions:
slmfit() fits a spatial linear model to the response on the
observed/sampled sites. \code{check.variogram} can be used to construct
an empirical variogram of the residuals of the spatial linear model.
predict.slmfit() uses the spatial linear model fitted with slmfit() and finite
population block kriging to predict counts/densities at unobserved locations.
A prediction for the total count as well as a prediction variance
are given by default.
For more details on how to use these functions and for a real world example applying the methods to a moose data set, please see the Vignette at https://highamm.github.io/sptotal/articles/sptotal-vignette.html .
Community Guidelines
We encourage users to submit GitHub issues and enhancement requests at https://github.com/highamm/sptotal so we may continue to improve sptotal.
Citation
To cite this package in the literature, run the following line:
{r}
citation("sptotal")
The methods in this package are based on the following references:
Ver Hoef, J. M. (2008). "Spatial methods for plot-based sampling of wildlife populations." Environmental and Ecological Statistics, 15(1), 3–13.
Ver Hoef, J. M. (2002). "Sampling and geostatistics for spatial data." Ecoscience, 9(2), 152– 161.
Owner
- Name: Matt Higham
- Login: highamm
- Kind: user
- Location: Canton, NY
- Repositories: 20
- Profile: https://github.com/highamm
I am an Assistant Professor in the Department of Statistics at St. Lawrence University.
JOSS Publication
sptotal: an R package for predicting totals and weighted sums from spatial data
Authors
St. Lawrence University
National Oceanic and Atmospheric Administration
Bureau of Land Management
Tags
kriging finite population spatial predictionGitHub Events
Total
Last Year
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Matt Higham | h****m@o****u | 189 |
| Jay | j****f@g****m | 35 |
| Michael Dumelle | m****e@g****m | 11 |
| pmaurogut | p****t@g****m | 7 |
| brycefrank | b****k@o****u | 7 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 6
- Total pull requests: 2
- Average time to close issues: 21 days
- Average time to close pull requests: 6 minutes
- Total issue authors: 3
- Total pull request authors: 2
- Average comments per issue: 1.83
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- brycefrank (4)
- garretrc (1)
- fabian-s (1)
Pull Request Authors
- brycefrank (1)
- highamm (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 292 last-month
- Total docker downloads: 21,613
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
cran.r-project.org: sptotal
Predicting Totals and Weighted Sums from Spatial Data
- Homepage: https://highamm.github.io/sptotal/index.html
- Documentation: http://cran.r-project.org/web/packages/sptotal/sptotal.pdf
- License: GPL-2
-
Latest release: 1.0.1
published about 3 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.5.0 depends
- ggplot2 * imports
- graphics * imports
- sp * imports
- stats * imports
- viridis * imports
- gstat * suggests
- knitr * suggests
- prettydoc * suggests
- rgeos * suggests
- rmarkdown * suggests
- testthat * suggests
- tibble * suggests
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v3 composite
- actions/upload-artifact v1 composite
- openjournals/openjournals-draft-action master composite
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
