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 (17.7%) to scientific vocabulary

Keywords

bird breeding cluster home-range r territory
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • Open Issues: 5
  • Releases: 1
Topics
bird breeding cluster home-range r territory
Created over 4 years ago · Last pushed 9 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Zenodo

README.Rmd

---
output: github_document
---



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

# territoria


[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Lifecycle: stable](https://lifecycle.r-lib.org/articles/figures/lifecycle-stable.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![License](https://img.shields.io/badge/license-GPL--3-blue.svg?style=flat)](https://www.gnu.org/licenses/gpl-3.0.html)
![GitHub](https://img.shields.io/github/license/inbo/territoria)
[![R build status](https://github.com/inbo/territoria/workflows/check%20package%20on%20main/badge.svg)](https://github.com/inbo/territoria/actions)
[![Codecov test coverage](https://codecov.io/gh/inbo/territoria/branch/main/graph/badge.svg)](https://app.codecov.io/gh/inbo/territoria?branch=main)
![r-universe name](https://inbo.r-universe.dev/badges/:name?color=c04384)
![r-universe package](https://inbo.r-universe.dev/badges/territoria)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/inbo/territoria.svg)
![GitHub repo size](https://img.shields.io/github/repo-size/inbo/territoria.svg)


The goal of `territoria` is to cluster observations from different breeding bird surveys into territoria.

## Installation

You can install the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("remotes")
remotes::install_github("inbo/territoria")
```

## Example

We start by simulating some observations.
We need for  every observation their `x` and `y` coordinates in a projected coordinate system.
`survey` is an integer id for every survey.
A survey is a unique combination of an area and date.
`status` is an integer indication the breeding status.
A higher value assume more certainty about breeding.
Set this to a constant value if you don't distinct between different certainties.
In this example we use three classes: `1`, `2` and `3`.

```{r sim-data}
library(territoria)
set.seed(20210806)
obs <- simulate_observations()
names(obs)
summary(obs$centroids)
summary(obs$observations)
obs <- obs$observations[obs$observations$observed, ]
```

Once we have a data.frame with the observations, we connect to a SQLite database and import the observations.
This assigns every observation to its own cluster.

```{r import-data}
conn <- connect_db()
import_observations(observations = obs, conn = conn, max_dist = 336)
result <- get_cluster(conn = conn)
nrow(result$observations) == nrow(result$cluster)
```

Next, we need to calculate the distance matrix.
This is not the full distance matrix.
We omit all irrelevant distances, e.g. between observations from the same survey or with a distance larger than twice the maximum cluster distance.

```{r distance}
distance_matrix(conn = conn, max_dist = 366)
```

Now we can start the clustering.
The clustering takes into account all observations with a `status` greater than or equal to the set status.

```{r cluster-3}
cluster_observation(conn = conn, status = 3, max_dist = 336)
result3 <- get_cluster(conn = conn)
nrow(result3$observations) > nrow(result3$cluster)
```

Repeat the clustering for every status level.
Note that skipping levels implies that we combine them with the lower level.

```{r cluster-1}
cluster_observation(conn = conn, status = 1, max_dist = 336)
result1 <- get_cluster(conn = conn)
nrow(result1$observations) > nrow(result1$cluster)
nrow(result3$cluster) > nrow(result1$cluster)
summary(result1$observations)
summary(result1$cluster)
```

Owner

  • Name: Research Institute for Nature and Forest (INBO)
  • Login: inbo
  • Kind: organization
  • Location: Belgium

Open source, data and science initiatives of the Research Institute for Nature and Forest (INBO)

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it using these metadata.
title: "territoria: Clustering Observations from Breeding Birds into Territoria"
authors:
- given-names: Thierry
  family-names: Onkelinx
  affiliation: Research Institute for Nature and Forest (INBO)
  orcid: 0000-0001-8804-4216
keywords:
- breeding bird
- cluster
contact:
- given-names: Thierry
  family-names: Onkelinx
  affiliation: Research Institute for Nature and Forest (INBO)
  orcid: 0000-0001-8804-4216
doi: ~
license: GPL-3.0
repository-code: https://github.com/inbo/territoria/
type: software
abstract: "Clusters individual observations based on breeding indication and distance
  between observations."
version: 0.0.3

GitHub Events

Total
  • Issues event: 2
  • Push event: 3
  • Pull request review event: 2
  • Pull request review comment event: 3
  • Pull request event: 1
  • Create event: 1
Last Year
  • Issues event: 2
  • Push event: 3
  • Pull request review event: 2
  • Pull request review comment event: 3
  • Pull request event: 1
  • Create event: 1

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 39
  • Total Committers: 1
  • Avg Commits per committer: 39.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Thierry Onkelinx t****x@i****e 39
Committer Domains (Top 20 + Academic)
inbo.be: 1

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 4
  • Total pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: 4 months
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 0.25
  • Average comments per pull request: 1.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • hansvancalster (2)
  • RCinbo (2)
Pull Request Authors
  • ThierryO (4)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

DESCRIPTION cran
  • RSQLite * imports
  • assertthat * imports
  • mvtnorm * imports
  • spatstat.geom * imports
  • spatstat.random * imports
.github/workflows/check_on_branch.yml actions
  • inbo/actions/check_pkg checklist-0.3.6 composite
.github/workflows/check_on_different_r_os.yml 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/check_on_main.yml actions
  • inbo/actions/check_pkg checklist-0.3.6 composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • ncipollo/release-action v1 composite
.github/workflows/remove_old_artifacts.yml actions
  • c-hive/gha-remove-artifacts v1 composite