Skip to contents

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

Installation

Install just the package:

if (!require("remotes"))
  install.packages("remotes")
remotes::install_github("birdflow-science/BirdFlowR")

Or to install with example data and vignette:

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, dependencies = TRUE)

See the Installation vignette for more information and help troubleshooting.

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 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.

library(BirdFlowR)
library(BirdFlowModels)

bf <- amewoo 

species(bf)
#> [1] "American Woodcock"

# 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.


plot_movement_vectors(bf, start = 12)

Learn more