distanceto
:package: distanceto is an R package to calculate distances from point locations to features
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.2%) to scientific vocabulary
Keywords
animal
distance-to
ecology
r
resource-selection
rsf
spatial
Last synced: 4 months ago
·
JSON representation
·
Repository
:package: distanceto is an R package to calculate distances from point locations to features
Basic Info
- Host: GitHub
- Owner: robitalec
- License: gpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://robitalec.github.io/distance-to/
- Size: 306 KB
Statistics
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 2
Topics
animal
distance-to
ecology
r
resource-selection
rsf
spatial
Created over 4 years ago
· Last pushed over 2 years ago
Metadata Files
Readme
Changelog
License
Citation
Codemeta
README.Rmd
---
output: github_document
---
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://cran.r-project.org/package=distanceto)
[](https://github.com/robitalec/distance-to/actions/workflows/R-CMD-check.yaml)
# distance-to
## Overview
The `distanceto` package is designed to quickly sample distances from points
features to other vector layers. Normally the approach for calculating distance
to (something) involves generating distance surfaces using raster based approaches
eg. `raster::distance` or `gdal_proximity` and subsequently point sampling these
surfaces. Since raster based approaches are a costly method that frequently leads
to memory issues or long and slow run times with high resolution data or large
study sites, we have opted to compute these distances using vector based
approaches. As a helper, there's a decidedly low-res raster based approach for
visually inspecting your region's distance surface. But the workhorse is
`distance_to`. See the [Example](#example).
## Install
```{r, eval = FALSE}
install.packages('distanceto', repos = 'https://robitalec.r-universe.dev')
```
## Example
```{r}
library(distanceto)
library(sf)
# Load nc data
nc <- st_read(system.file("shape/nc.shp", package="sf"))
# Set number of sampling points
npts <- 1e3
# Sample points in nc
ncpts <- st_sample(nc, npts)
# Select first 5 of nc
ncsub <- nc[1:5,]
# Measure distance from ncpts to first 5 of nc
dists <- distance_to(ncpts, ncsub, measure = 'geodesic')
head(dists, 30)
# Add to ncpts
ncpts$dist <- dists
```
## Other approaches
* `nngeo::st_nn`
* `gdal_proximity`
* `raster::distance`
* GUI GIS applications
Citation (CITATION.cff)
# -----------------------------------------------------------
# CITATION file created with {cffr} R package, v0.5.0
# See also: https://docs.ropensci.org/cffr/
# -----------------------------------------------------------
cff-version: 1.2.0
message: 'To cite package "distanceto" in publications use:'
type: software
license: GPL-3.0-or-later
title: 'distanceto: Calculate Distance to Features'
version: 0.0.3
abstract: Calculates distances from point locations to features. The usual approach
for eg. resource selection function analyses is to generate a complete distance
to features surface then sample it with your observed and random points. Since these
raster based approaches can be pretty costly with large areas, and often lead to
memory issues in R, the distanceto package opts to compute these distances using
efficient, vector based approaches. As a helper, there's a decidedly low-res raster
based approach for visually inspecting your region's distance surface. But the workhorse
is distance_to.
authors:
- family-names: Robitaille
given-names: Alec L.
email: robit.alec@gmail.com
orcid: https://orcid.org/0000-0002-4706-1762
repository: https://CRAN.R-project.org/package=distanceto
repository-code: https://github.com/robitalec/distance-to
url: https://robitalec.github.io/distance-to/
contact:
- family-names: Robitaille
given-names: Alec L.
email: robit.alec@gmail.com
orcid: https://orcid.org/0000-0002-4706-1762
references:
- type: software
title: fasterize
abstract: 'fasterize: Fast Polygon to Raster Conversion'
notes: Suggests
url: https://github.com/ecohealthalliance/fasterize
repository: https://CRAN.R-project.org/package=fasterize
authors:
- family-names: Ross
given-names: Noam
email: ross@ecohealthalliance.org
orcid: https://orcid.org/0000-0002-2136-0000
year: '2023'
- type: software
title: knitr
abstract: 'knitr: A General-Purpose Package for Dynamic Report Generation in R'
notes: Suggests
url: https://yihui.org/knitr/
repository: https://CRAN.R-project.org/package=knitr
authors:
- family-names: Xie
given-names: Yihui
email: xie@yihui.name
orcid: https://orcid.org/0000-0003-0645-5666
year: '2023'
- type: software
title: rmarkdown
abstract: 'rmarkdown: Dynamic Documents for R'
notes: Suggests
url: https://pkgs.rstudio.com/rmarkdown/
repository: https://CRAN.R-project.org/package=rmarkdown
authors:
- family-names: Allaire
given-names: JJ
email: jj@posit.co
- family-names: Xie
given-names: Yihui
email: xie@yihui.name
orcid: https://orcid.org/0000-0003-0645-5666
- family-names: Dervieux
given-names: Christophe
email: cderv@posit.co
orcid: https://orcid.org/0000-0003-4474-2498
- family-names: McPherson
given-names: Jonathan
email: jonathan@posit.co
- family-names: Luraschi
given-names: Javier
- family-names: Ushey
given-names: Kevin
email: kevin@posit.co
- family-names: Atkins
given-names: Aron
email: aron@posit.co
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
- family-names: Cheng
given-names: Joe
email: joe@posit.co
- family-names: Chang
given-names: Winston
email: winston@posit.co
- family-names: Iannone
given-names: Richard
email: rich@posit.co
orcid: https://orcid.org/0000-0003-3925-190X
year: '2023'
- type: software
title: raster
abstract: 'raster: Geographic Data Analysis and Modeling'
notes: Suggests
url: https://rspatial.org/raster
repository: https://CRAN.R-project.org/package=raster
authors:
- family-names: Hijmans
given-names: Robert J.
email: r.hijmans@gmail.com
orcid: https://orcid.org/0000-0001-5872-2872
year: '2023'
- type: software
title: tinytest
abstract: 'tinytest: Lightweight and Feature Complete Unit Testing Framework'
notes: Suggests
url: https://github.com/markvanderloo/tinytest
repository: https://CRAN.R-project.org/package=tinytest
authors:
- family-names: van der Loo
given-names: Mark
email: mark.vanderloo@gmail.com
orcid: https://orcid.org/0000-0002-9807-4686
year: '2023'
- type: software
title: lwgeom
abstract: 'lwgeom: Bindings to Selected ''liblwgeom'' Functions for Simple Features'
notes: Suggests
url: https://github.com/r-spatial/lwgeom/
repository: https://CRAN.R-project.org/package=lwgeom
authors:
- family-names: Pebesma
given-names: Edzer
email: edzer.pebesma@uni-muenster.de
orcid: https://orcid.org/0000-0001-8049-7069
year: '2023'
- type: software
title: sf
abstract: 'sf: Simple Features for R'
notes: Imports
url: https://r-spatial.github.io/sf/
repository: https://CRAN.R-project.org/package=sf
authors:
- family-names: Pebesma
given-names: Edzer
email: edzer.pebesma@uni-muenster.de
orcid: https://orcid.org/0000-0001-8049-7069
year: '2023'
- type: software
title: nabor
abstract: 'nabor: Wraps ''libnabo'', a Fast K Nearest Neighbour Library for Low
Dimensions'
notes: Imports
url: https://github.com/ethz-asl/libnabo
repository: https://CRAN.R-project.org/package=nabor
authors:
- family-names: Mangenat
given-names: Stephane
- family-names: Jefferis
given-names: Gregory
year: '2023'
identifiers:
- type: url
value: https://github.com/ethz-asl/libnabo
- type: software
title: geodist
abstract: 'geodist: Fast, Dependency-Free Geodesic Distance Calculations'
notes: Imports
url: https://github.com/hypertidy/geodist
repository: https://CRAN.R-project.org/package=geodist
authors:
- family-names: Padgham
given-names: Mark
email: mark.padgham@email.com
- family-names: Sumner
given-names: Michael D.
year: '2023'
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "distanceto",
"description": "Calculates distances from point locations to features. The usual approach for eg. resource selection function analyses is to generate a complete distance to features surface then sample it with your observed and random points. Since these raster based approaches can be pretty costly with large areas, and often lead to memory issues in R, the distanceto package opts to compute these distances using efficient, vector based approaches. As a helper, there's a decidedly low-res raster based approach for visually inspecting your region's distance surface. But the workhorse is distance_to.",
"name": "distanceto: Calculate Distance to Features",
"relatedLink": [
"https://robitalec.github.io/distance-to/",
"https://CRAN.R-project.org/package=distanceto"
],
"codeRepository": "https://github.com/robitalec/distance-to",
"issueTracker": "https://github.com/robitalec/distance-to/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.0.3",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.3.0 (2023-04-21)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"author": [
{
"@type": "Person",
"givenName": "Alec L.",
"familyName": "Robitaille",
"email": "robit.alec@gmail.com",
"@id": "https://orcid.org/0000-0002-4706-1762"
}
],
"maintainer": [
{
"@type": "Person",
"givenName": "Alec L.",
"familyName": "Robitaille",
"email": "robit.alec@gmail.com",
"@id": "https://orcid.org/0000-0002-4706-1762"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "fasterize",
"name": "fasterize",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=fasterize"
},
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "raster",
"name": "raster",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=raster"
},
{
"@type": "SoftwareApplication",
"identifier": "tinytest",
"name": "tinytest",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=tinytest"
},
{
"@type": "SoftwareApplication",
"identifier": "lwgeom",
"name": "lwgeom",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=lwgeom"
}
],
"softwareRequirements": {
"1": {
"@type": "SoftwareApplication",
"identifier": "sf",
"name": "sf",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=sf"
},
"2": {
"@type": "SoftwareApplication",
"identifier": "nabor",
"name": "nabor",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=nabor"
},
"3": {
"@type": "SoftwareApplication",
"identifier": "geodist",
"name": "geodist",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=geodist"
},
"SystemRequirements": null
},
"fileSize": "100.57KB",
"releaseNotes": "https://github.com/robitalec/distance-to/blob/master/NEWS.md",
"readme": "https://github.com/robitalec/distance-to/blob/main/README.md",
"contIntegration": "https://github.com/robitalec/distance-to/actions/workflows/R-CMD-check.yaml",
"developmentStatus": "https://lifecycle.r-lib.org/articles/stages.html#experimental"
}
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Alec L. Robitaille | r****c@g****m | 203 |
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 0
- Total pull requests: 11
- Average time to close issues: N/A
- Average time to close pull requests: 37 minutes
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.09
- Merged pull requests: 11
- 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
Pull Request Authors
- robitalec (11)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 254 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: distanceto
Calculate Distance to Features
- Homepage: https://github.com/robitalec/distance-to
- Documentation: http://cran.r-project.org/web/packages/distanceto/distanceto.pdf
- License: GPL (≥ 3)
-
Latest release: 0.0.3
published over 2 years ago
Rankings
Forks count: 28.8%
Dependent packages count: 29.8%
Stargazers count: 31.7%
Dependent repos count: 35.5%
Average: 38.0%
Downloads: 64.0%
Maintainers (1)
Last synced:
4 months ago