sptotal

sptotal: an R package for predicting totals and weighted sums from spatial data - Published in JOSS (2023)

https://github.com/highamm/sptotal

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

Sociology Social Sciences - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

Package for Fitting Spatial Linear Models and Predicting Total Abundances for Finite Populations

Basic Info
  • Host: GitHub
  • Owner: highamm
  • License: gpl-2.0
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 10.8 MB
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 1
Created almost 7 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

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 DOI

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

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
Published
May 24, 2023
Volume 8, Issue 85, Page 5363
Authors
Matt Higham
St. Lawrence University
Jay Ver Hoef
National Oceanic and Atmospheric Administration
Bryce Frank
Bureau of Land Management
Michael Dumelle ORCID
United States Environmental Protection Agency
Editor
Fabian Scheipl ORCID
Tags
kriging finite population spatial prediction

GitHub Events

Total
Last Year

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 249
  • Total Committers: 5
  • Avg Commits per committer: 49.8
  • Development Distribution Score (DDS): 0.241
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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
bug (1)
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

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 292 Last month
  • Docker Downloads: 21,613
Rankings
Docker downloads count: 0.6%
Forks count: 17.0%
Stargazers count: 23.6%
Average: 23.8%
Dependent packages count: 28.7%
Downloads: 36.1%
Dependent repos count: 36.8%
Maintainers (1)
Last synced: 4 months ago

Dependencies

DESCRIPTION cran
  • 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
.github/workflows/pkgdown.yaml actions
  • 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
.github/workflows/check-standard.yaml actions
  • 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
.github/workflows/draft-pdf.yml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v1 composite
  • openjournals/openjournals-draft-action master composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite