dbmss

Distance Based Measures of Spatial Structures

https://github.com/ericmarcon/dbmss

Science Score: 39.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 2 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.6%) to scientific vocabulary

Keywords

concentration economic-geography spatial-structures specialization
Last synced: 6 months ago · JSON representation

Repository

Distance Based Measures of Spatial Structures

Basic Info
Statistics
  • Stars: 9
  • Watchers: 3
  • Forks: 7
  • Open Issues: 0
  • Releases: 0
Topics
concentration economic-geography spatial-structures specialization
Created over 8 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%", 
  message = FALSE
)
```

# Distance Based Measures of Spatial Structures 


[![CRAN version](https://www.r-pkg.org/badges/version/dbmss)](https://CRAN.r-project.org/package=dbmss)
[![](https://cranlogs.r-pkg.org/badges/grand-total/dbmss)](https://CRAN.R-project.org/package=dbmss)
[![](https://cranlogs.r-pkg.org/badges/dbmss)](https://CRAN.R-project.org/package=dbmss)
![R-CMD-check](https://github.com/EricMarcon/dbmss/workflows/R-CMD-check/badge.svg)
[![codecov](https://codecov.io/github/EricMarcon/dbmss/branch/master/graphs/badge.svg)](https://app.codecov.io/github/EricMarcon/dbmss)
[![CodeFactor](https://www.codefactor.io/repository/github/ericmarcon/dbmss/badge)](https://www.codefactor.io/repository/github/ericmarcon/dbmss)


dbmss is an R package for simple computation of spatial statistic functions of distance to characterize the spatial structures of mapped objects, including classical ones (Ripley's *K* and others) and more recent ones used by spatial economists (Duranton and Overman's *Kd*, Marcon and Puech's *M*). It relies on spatstat for some core calculation.

## Installation

You can install the current release of the package from CRAN or the development version of dbmss from [GitHub](https://github.com/) with:

``` r
# install.packages("pak")
pak::pak("EricMarcon/dbmss")
```

## Main functions

The main functions of the package are designed to calculate distance-based measures of spatial structure.
Those are non-parametric statistics able to summarize and test the spatial distribution (concentration, dispersion) of points.

The classical, topographic functions such as Ripley's _K_ are provided by the _spatstat_ package and supported by _dbmss_ for convenience.

Relative functions are available in _dbmss_ only.
These are the $M$ and $m$ and $K_d$ functions.

The bivariate $M$ function can be calculated for _Q. Rosea_ trees around _V. Americana_ trees:

```{r m}
library(dbmss)
autoplot(
  Mhat(
    paracou16, 
    ReferenceType = "V. Americana", 
    NeighborType = "Q. Rosea"
  ), 
  main = ""
)
```


## Confidence envelopes

Confidence envelopes of various null hypotheses can be calculated.
The univariate distribution of _Q. Rosea_ is tested against the null hypothesis of random location.

```{r}
autoplot(
  KdEnvelope(paracou16, ReferenceType = "Q. Rosea", Global = TRUE), 
  main = ""
)
```

Significant concentration is detected between about 10 and 20 meters.


## Maps

Individual values of some distance-based measures can be computed and mapped.

```{r}
# Calculate individual intertype M(distance) value
ReferenceType <- "V. Americana"
NeighborType <- "Q. Rosea"
fvind <- Mhat(
  paracou16, 
  r = c(0, 30), 
  ReferenceType = ReferenceType, 
  NeighborType = NeighborType, 
  Individual = TRUE
)
# Plot the point pattern with values of M(30 meters)
p16_map <- Smooth(
  paracou16, 
  fvind = fvind, 
  distance = 30,
  # Resolution
  Nbx = 512, 
  Nby = 512
)
par(mar = rep(0, 4))
plot(p16_map, main = "")
# Add the reference points to the plot
is.ReferenceType <- marks(paracou16)$PointType == ReferenceType
points(
  x = paracou16$x[is.ReferenceType], 
  y = paracou16$y[is.ReferenceType], 
  pch = 20
)
# Add contour lines
contour(p16_map, nlevels = 5, add = TRUE)
```

## Vignettes

A quick [introduction](https://EricMarcon.github.io/dbmss/) is in `vignette("dbmss")`.

A [full documentation](https://ericmarcon.github.io/dbmss/articles/articles/reference.html) is available on the package website.
It is a continuous update of the paper published in the Journal of Statistical Software ([Marcon et al., 2015](https://doi.org/10.18637/jss.v067.c03)).

## Reference

Marcon, E., Traissac, S., Puech, F. and Lang, G. (2015). Tools to Characterize Point Patterns: dbmss for R. 
*Journal of Statistical Software*. 67(3): 1-15.

Owner

  • Name: Eric Marcon
  • Login: EricMarcon
  • Kind: user
  • Location: Montpellier, France
  • Company: AgroParisTech

GitHub Events

Total
  • Push event: 42
  • Pull request event: 1
  • Fork event: 1
  • Create event: 1
Last Year
  • Push event: 42
  • Pull request event: 1
  • Fork event: 1
  • Create event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 199
  • Total Committers: 6
  • Avg Commits per committer: 33.167
  • Development Distribution Score (DDS): 0.583
Past Year
  • Commits: 28
  • Committers: 1
  • Avg Commits per committer: 28.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Eric Marcon e****n@f****r 83
Eric Marcon e****n@e****f 60
Eric Marcon e****n@a****r 34
Eric Marcon E****n@e****f 20
Eric Marcon e****n@a****r 1
rubak r****k@m****k 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: about 6 hours
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.6
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 35 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • EricMarcon (4)
  • rubak (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 942 last-month
  • Total docker downloads: 21,777
  • Total dependent packages: 0
  • Total dependent repositories: 3
  • Total versions: 34
  • Total maintainers: 1
cran.r-project.org: dbmss

Distance-Based Measures of Spatial Structures

  • Versions: 34
  • Dependent Packages: 0
  • Dependent Repositories: 3
  • Downloads: 942 Last month
  • Docker Downloads: 21,777
Rankings
Forks count: 9.6%
Docker downloads count: 12.5%
Dependent repos count: 16.4%
Average: 17.6%
Stargazers count: 18.3%
Downloads: 19.8%
Dependent packages count: 28.6%
Last synced: 6 months ago

Dependencies

.github/workflows/check.yml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
DESCRIPTION cran
  • R >= 3.5.0 depends
  • Rcpp >= 0.12.14 depends
  • spatstat.explore * depends
  • RcppParallel * imports
  • automap * imports
  • cubature * imports
  • dplyr * imports
  • ggplot2 * imports
  • reshape2 * imports
  • rlang * imports
  • sp * imports
  • spatstat.geom * imports
  • spatstat.random * imports
  • spatstat.utils * imports
  • stats * imports
  • tibble * imports
  • tidyr * imports
  • tidyselect * imports
  • knitr * suggests
  • pkgdown * suggests
  • rmarkdown * suggests
  • testthat * suggests
.github/workflows/pr.yml actions
  • actions/checkout master composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite