naturecounts

R package to access data from the NatureCounts platform by Bird Studies Canada

https://github.com/birdscanada/naturecounts

Science Score: 26.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
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.0%) to scientific vocabulary

Keywords from Contributors

projection interactive birds serializer measurement cycles packaging charts network-simulation archival
Last synced: 6 months ago · JSON representation

Repository

R package to access data from the NatureCounts platform by Bird Studies Canada

Basic Info
Statistics
  • Stars: 16
  • Watchers: 3
  • Forks: 4
  • Open Issues: 13
  • Releases: 4
Created about 7 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog

README.Rmd

---
output: github_document
---
 


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


[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![R-CMD-check](https://github.com/BirdsCanada/naturecounts/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/BirdsCanada/naturecounts/actions/workflows/R-CMD-check.yaml)
![r-universe](https://birdscanada.r-universe.dev/badges/naturecounts)


Access and download data on plant and animal populations from various databases through NatureCounts, a service managed by Birds Canada.

See tutorials, documentation and articles on the [naturecounts package Website](https://birdscanada.github.io/naturecounts)

## Installation

You can install the main version of `naturecounts` from our R-Universe

```{r eval = FALSE}
install.packages("naturecounts", 
                 repos = c(birdscanada = 'https://birdscanada.r-universe.dev',
                           CRAN = 'https://cloud.r-project.org'))
```

## Usage

```{r}
library(naturecounts)
```

### Fetching counts

Use the `nc_count()` function to return collections and the number of observations in each for which you have access (here returns all collections associated with username **sample**).

```{r}
nc_count(username = "sample")
```

Use the `show = "all"` argument to show counts for all collections available (public or otherwise).

```{r}
nc_count(show = "all") %>%
  head()
```

### Fetching data

Fetch all observations of bittern which are available to user **sample** into a local data frame.

First find the species id
```{r}
search_species("American Bittern")
```

Use this id with `nc_data_dl()`. The `info` parameter is a short description of what the data is being downloaded for.
```{r}
bittern <- nc_data_dl(species = 2490, username = "sample", 
                    info = "readme_example")
```

Alternatively, save the downloaded data as a SQLite database (`bittern`).
```{r}
bittern <- nc_data_dl(species = 2490, sql_db = "bittern", username = "sample", 
                    info = "readme_example")
```

```{r cleanup, include = FALSE}
file.remove("bittern.nc")
```

### Authorizations

To access private/semi-public projects/collections you must [sign up](https://www.birdscanada.org/birdmon/default/profile.jsp) for a free NatureCounts account and [register](https://www.birdscanada.org/birdmon/default/projects.jsp) for the projects you'd like to access. Once registered, you can use the `username` argument (you will be prompted for a password) for both `nc_count()` and `nc_data_dl()`, which will then return a different set of records.

```{r, eval = FALSE}
nc_count(username = "my_user_name")
bittern <- nc_data_dl(species = 2490, username = "my_user_name", info = "readme_example")
```

### More advanced options

`nc_count()` and `nc_data_dl()` have a variety of arguments that allow you to filter the counts/data prior to downloading. These options include `collections`, `species`, `years`, `doy` (day-of-year), `region`, and `site_type` (users can specify up to 3 of these). For `nc_data_dl()` you have the additional arguments `fields_set` and `fields` with which you can customize which fields/columns to include in your download.

See the function examples ([`nc_count()`](https://birdscanada.github.io/naturecounts/reference/nc_count.html), [`nc_data_dl()`](https://birdscanada.github.io/naturecounts/reference/nc_data_dl.html)) the following articles for more information on these filters:

- Collections
- [Species Codes](https://birdscanada.github.io/naturecounts/articles/species-codes.html)
- [Regional Codes](https://birdscanada.github.io/naturecounts/articles/region-codes.html)
- [IBAs and BCRs (regions)](https://birdscanada.github.io/naturecounts/articles/region-areas.html)
- [Using spatial data to filter observations](https://birdscanada.github.io/naturecounts/articles/region-spatial.html)

We also have an [article on post-filtering your data](https://birdscanada.github.io/naturecounts/articles/filtering-data.html)

### Metadata

NatureCounts includes a great deal of metadata which can be accessed through the functions with the `meta_` prefix. See the [Meta Documentation](https://birdscanada.github.io/naturecounts/reference/meta.html) for specifics.

Owner

  • Name: Birds Canada
  • Login: BirdsCanada
  • Kind: organization
  • Location: Canada

Together, we are Canada's voice for birds

GitHub Events

Total
  • Issues event: 12
  • Watch event: 1
  • Issue comment event: 24
  • Push event: 85
  • Pull request event: 1
  • Create event: 1
Last Year
  • Issues event: 12
  • Watch event: 1
  • Issue comment event: 24
  • Push event: 85
  • Pull request event: 1
  • Create event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 424
  • Total Committers: 4
  • Avg Commits per committer: 106.0
  • Development Distribution Score (DDS): 0.071
Past Year
  • Commits: 28
  • Committers: 2
  • Avg Commits per committer: 14.0
  • Development Distribution Score (DDS): 0.071
Top Committers
Name Email Commits
Steffi LaZerte s****i@s****a 394
Dimitrios Markou d****u@b****g 26
dependabot[bot] 4****] 2
denislepage d****e@b****g 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 27
  • Total pull requests: 8
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 14 days
  • Total issue authors: 8
  • Total pull request authors: 2
  • Average comments per issue: 3.74
  • Average comments per pull request: 0.25
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 9
  • Pull requests: 1
  • Average time to close issues: 5 months
  • Average time to close pull requests: N/A
  • Issue authors: 3
  • Pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • steffilazerte (16)
  • DMEthier (4)
  • denislepage (2)
  • pmorrill (1)
  • see24 (1)
  • sjbonner (1)
  • MOB-Habitat (1)
  • dhope (1)
Pull Request Authors
  • steffilazerte (9)
  • dependabot[bot] (2)
Top Labels
Issue Labels
api (4) enhancement (1)
Pull Request Labels
dependencies (2)

Packages

  • Total packages: 2
  • Total downloads: unknown
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 8
proxy.golang.org: github.com/birdscanada/naturecounts
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/BirdsCanada/naturecounts
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.1.2 depends
  • DBI >= 1.0.0 imports
  • RSQLite >= 2.1.1 imports
  • askpass >= 1.1 imports
  • dbplyr >= 1.4.4 imports
  • dplyr >= 0.7.8 imports
  • httr >= 1.4.0 imports
  • jsonlite >= 1.6 imports
  • lubridate >= 1.7.4 imports
  • magrittr * imports
  • memoise >= 1.1.0 imports
  • purrr >= 0.3.2 imports
  • readr >= 1.3.1 imports
  • rlang >= 0.1.2 imports
  • stringi >= 1.2.4 imports
  • stringr >= 1.3.1 imports
  • tidyr >= 0.8.2 imports
  • tidyselect >= 1.0.0 imports
  • ggmap * suggests
  • ggplot2 * suggests
  • here * suggests
  • knitr * suggests
  • mapview * suggests
  • rgeos * suggests
  • rmarkdown * suggests
  • rnaturalearth * suggests
  • roxygen2 * suggests
  • sf * suggests
  • spelling * suggests
  • testthat * suggests
.github/workflows/R-CMD-check.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/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