A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

BirdFlowR

Predict changes in bird distributions and generate synthetic migration routes.
https://github.com/birdflow-science/birdflowr

Category: Biosphere
Sub Category: Avian Monitoring and Analysis

Keywords

bird-migration birds ebird ecology r-package

Keywords from Contributors

movement-ecology

Last synced: about 4 hours ago
JSON representation

Repository metadata

BirdFlow R Package

README.Rmd

          ---
output: github_document
---



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

set.seed(1)
```

# BirdFlowR 


  [![R-CMD-check](https://github.com/birdflow-science/BirdFlowR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/birdflow-science/BirdFlowR/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/birdflow-science/BirdFlowR/branch/main/graph/badge.svg)](https://app.codecov.io/gh/birdflow-science/BirdFlowR?branch=main)




An R package to predict changes in bird distributions and generate synthetic 
migration routes based on BirdFlow models.

This package is under development and not yet formally released. Function names
and arguments may change.


## Installation

Install just the package:
```{r install, eval = FALSE}
if(!require("remotes"))
  install.packages("remotes") 
remotes::install_github("birdflow-science/BirdFlowR")
```
Or to install with example data and vignette:

```{r install everything, eval = FALSE}
installed <- rownames(installed.packages())
if(!"remotes" %in% installed)
  install.packages("remotes")
if(!"rnaturalearthdata" %in% installed)
  install.packages("rnaturalearthdata")
remotes::install_github("birdflow-science/BirdFlowModels")
remotes::install_github("birdflow-science/BirdFlowR", build_vignettes = TRUE)
```
See `vignette("Installation")` for troubleshooting and more installation 
options.

## Usage 

The two primary functions are `predict()` to project distributions and 
`route()` to generate synthetic routes.  

`route_migration()` is a wrapper to `route()` which automates sampling
locations from the a distribution for the start of the migration and setting 
the start and end dates to route for the migration window. We can use it to 
create synthetic routes for a species.
```{r examples}
library(BirdFlowR)
library(BirdFlowModels)

bf <- amewoo 

species(bf)

# Generate routes for the prebreeding migration 
rts <- route(bf, n = 10, season = "prebreeding")

# Plot routes
plot_routes(rts, bf)

```

Visualize the movement in the BirdFlow model for a timestep.

```{r movement_vectors}

plot_movement_vectors(bf, start = 12)

```


## Learn more

- `vignette("BirdFlowR")` has a longer introduction to the package, and how to
  use `predict()` and `route()` to project bird distributions and movement. 
- `vignette("Installation")` for detailed installation instructions.
- `vignette("Preprocess")` covers downloading and formatting data for model 
  fitting with `preprocess_species()`, importing fitted models with 
  `import_birdflow()`, and reducing model size with `sparsify()`.   
- Read the paper:
  - [BirdFlow: Learning Seasonal Bird Movements from Citizen Science Data](https://www.biorxiv.org/content/10.1101/2022.04.12.488057v1) Miguel Fuentes, Benjamin M. Van Doren, Daniel Fink, Daniel Sheldon bioRxiv 2022.04.12.488057; doi: https://doi.org/10.1101/2022.04.12.488057



        

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 350
Total Committers: 8
Avg Commits per committer: 43.75
Development Distribution Score (DDS): 0.3

Commits in past year: 135
Committers in past year: 3
Avg Commits per committer in past year: 45.0
Development Distribution Score (DDS) in past year: 0.393

Name Email Commits
Ethan Plunkett e****n@p****m 245
chenyangkang c****4@o****m 82
Dave Slager s****r 18
Luke Ruud 1****d 1
Daniel Sheldon s****n@c****u 1
Benjamin Van Doren 8****n 1
yc85_illinois_edu y****u@l****u 1
plunkett_umass_edu p****u@c****u 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 82
Total pull requests: 86
Average time to close issues: about 2 months
Average time to close pull requests: 2 days
Total issue authors: 5
Total pull request authors: 4
Average comments per issue: 1.78
Average comments per pull request: 0.41
Merged pull request: 84
Bot issues: 0
Bot pull requests: 0

Past year issues: 18
Past year pull requests: 15
Past year average time to close issues: 2 days
Past year average time to close pull requests: 10 days
Past year issue authors: 4
Past year pull request authors: 2
Past year average comments per issue: 2.22
Past year average comments per pull request: 1.2
Past year merged pull request: 15
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/birdflow-science/birdflowr

Top Issue Authors

  • ethanplunkett (54)
  • slager (20)
  • chenyangkang (6)
  • dsheldon (1)
  • rsmiller74 (1)

Top Pull Request Authors

  • ethanplunkett (75)
  • slager (9)
  • chenyangkang (1)
  • lukeruud (1)

Top Issue Labels

  • enhancement (8)
  • bug (2)
  • help wanted (1)
  • duplicate (1)

Top Pull Request Labels


Dependencies

.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/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
DESCRIPTION cran
  • Matrix * imports
  • dplyr * imports
  • lubridate * imports
  • magrittr * imports
  • progress * imports
  • rhdf5 * imports
  • rlang * imports
  • rnaturalearth * imports
  • sf * imports
  • stringr * imports
  • terra * imports
  • BirdFlowModels * suggests
  • auk * suggests
  • covr * suggests
  • ebirdst * suggests
  • knitr * suggests
  • methods * suggests
  • rmarkdown * suggests
  • rnaturalearthdata * suggests
  • testthat >= 3.0.0 suggests

Score: 5.717027701406222