Skip to contents

Core functions

The primary entry points for loading a fitted model, projecting distributions, and simulating routes.

load_collection_index()
Load the index to a remote model collection
load_model()
Load BirdFlow models from a collection
predict(<BirdFlow>)
Predict bird distributions
predict_between()
Predict bird distributions conditioned on known locations
route()
Generate BirdFlow routes
route_between()
Generate BirdFlow routes between known locations
calc_bmtr()
Estimate BirdFlow Migration Traffic Rate (BMTR)
rasterize_bmtr()
Rasterize BMTR Data
calc_movement_vectors()
Calculate the average movement for cells in a BirdFlow model

Working with distributions

Retrieve, create, sample, and convert the species distributions that a BirdFlow model represents.

get_distr()
Extract distributions from BirdFlow models
as_distr()
Convert to a BirdFlow distribution
sample_distr()
Sample locations from a distribution
rasterize_distr() rast(<BirdFlow>)
Convert a BirdFlow distribution into a raster
flatten_raster()
Convert a raster bird distribution into its flattened, vector equivalent

Retrieving information

Accessors for a model’s dates, geometry, and metadata.

Temporal

get_dates()
Retrieve dates component of a BirdFlow model
lookup_date()
Retrieve date associated with timesteps, transitions, or marginals
lookup_timestep()
Lookup timestep
lookup_timestep_sequence()
Lookup a sequence of timesteps
lookup_season_timesteps()
Lookup breeding, non-breeding, or migration season timesteps
nrow(<BirdFlow>) ncol(<BirdFlow>) dim(<BirdFlow>) n_timesteps() n_distr() n_transitions() n_active() crs(<BirdFlow>) ext(<BirdFlow>) res(<BirdFlow>) xres(<BirdFlow>) yres(<BirdFlow>) xmin(<BirdFlow>) ymin(<BirdFlow>) xmax(<BirdFlow>) ymax(<BirdFlow>) is_cyclical() n_parameters()
Dimensions of a BirdFlow object

Spatial

get_mask()
Extract mask from BirdFlow model
get_dynamic_mask()
Get the dynamic mask from a BirdFlow object
get_clip()
Retrieve the clip polygon used during preprocessing
is_clipped()
Test whether a BirdFlow model was clipped during preprocessing
is_location_valid() is_distr_valid()
Are locations and distributions covered by the model for the given time
get_naturalearth() get_states() get_coastline() get_countries()
Retrieve, crop, and transform Natural Earth data
compareGeom(<BirdFlow>,<BirdFlow>) compareGeom(<SpatRaster>,<BirdFlow>) compareGeom(<BirdFlow>,<SpatRaster>)
BirdFlow compareGeom methods
st_bbox(<BirdFlow>)
Get the bounding box of a BirdFlow model
st_crs(<BirdFlow>)
Get the coordinate reference system of a BirdFlow model
nrow(<BirdFlow>) ncol(<BirdFlow>) dim(<BirdFlow>) n_timesteps() n_distr() n_transitions() n_active() crs(<BirdFlow>) ext(<BirdFlow>) res(<BirdFlow>) xres(<BirdFlow>) yres(<BirdFlow>) xmin(<BirdFlow>) ymin(<BirdFlow>) xmax(<BirdFlow>) ymax(<BirdFlow>) is_cyclical() n_parameters()
Dimensions of a BirdFlow object

Metadata

Other

get_marginal()
Return a marginal matrix from a BirdFlowR model
get_transition()
Return a transition matrix from a BirdFlowR model
get_loss()
Get loss values for each step in the model fitting process
get_ebird_coverage()
Get eBird model coverage from a BirdFlow model

Routes and interval data

Constructors, I/O, and validators for tracked and synthetic route data (Routes / BirdFlowRoutes / BirdFlowIntervals).

as_routes()
Convert a data frame into a Routes object
as_birdflow_routes()
Convert Routes to BirdFlowRoutes
as_birdflow_intervals()
Create BirdFlowIntervals objects
snap_to_birdflow()
Assign cells and timesteps to coordinates and dates
`[`(<Routes>) `[`(<BirdFlowRoutes>) `[`(<BirdFlowIntervals>)
Subset Routes, BirdFlowRoutes, or BirdFlowIntervals objects by row
sort_by_id_and_dates()
Sort Routes by ID and Date
add_stay_id()
Add Stay IDs
add_stay_id_with_varied_intervals()
Add Stay IDs with Temporal Thresholds
write_routes() read_routes() read_intervals() write_intervals()
Read and write routes and intervals
print(<Routes>)
Print Routes and BirdFlowRoutes objects
print(<BirdFlowIntervals>)
Print a BirdFlowIntervals Object
st_as_sf(<BirdFlowRoutes>)
Convert BirdFlowRoutes to an sf object
validate_route_df() validate_interval_df() validate_routes() validate_Routes() validate_birdflow_routes() validate_BirdFlowRoutes() validate_birdflow_intervals() validate_BirdFlowIntervals()
Object Validators

Evaluating models against tracking data

distribution_performance()
Evaluate a BirdFlow models ability to recreate training distributions
calc_interval_metrics()
Calculate interval metrics
great_circle_distances()
Calculate great circle distances among BirdFlow object cells
visualize_distance_weights()
Visualize the spread kernel used by calc_dist_weights()

Coordinates and indice conversions

Convert among the location index, row/column, model (x, y), and (lat, lon) representations of a cell.

x_to_col() y_to_row() row_to_y() col_to_x() i_to_rc() i_to_row() i_to_col() i_to_x() i_to_y() i_to_xy() rc_to_i() xy_to_i() latlon_to_xy() xy_to_latlon()
Functions to convert among spatial indices
dmi_to_i() i_to_dmi()
Convert between dynamic mask index and static location index

Visualization

Static plots and animations of distributions, bmtr, movement vectors, routes, and model loss.

plot_distr()
Plot distributions
animate_distr()
Animate distributions
plot_bmtr()
Plot BirdFlow Migration Traffic Rate (BMTR)
animate_bmtr()
Animate BirdFlow Migration Traffic Rate (BMTR)
plot_movement_vectors()
Plot bird movement vectors
animate_movement_vectors()
Animate movement vectors
plot_routes() plot(<BirdFlowRoutes>)
Plot Routes
animate_routes()
Animate routes
plot_loss()
Plot changes in component and total loss during model fitting

Utilities

Building, importing/exporting, and manipulating BirdFlow model objects.

preprocess_species()
Prepare eBird Status and Trends data for BirdFlow model fitting
export_birdflow() import_birdflow()
Export and import BirdFlow models in HDF5 format
export_rasters()
export distributions and masks from a BirdFlow object to raster files.
make_mask()
Internal function to determine the extent of data in eBird rasters.
add_dynamic_mask()
Convert a BirdFlow object without a dynamic mask into one with a dynamic mask
birdflow_options()
Set and retrieve BirdFlowR options
sparsify()
sparsify BirdFlow models
build_transitions() drop_transitions()
Add or drop transition matrices
combine_transitions()
Function to combine a sequence of transition matrices into one
as_transitions()
Convert a sequence of timesteps into a sequence of transition names
shrink_birdflow()
Shrink BirdFlow extent
truncate_birdflow()
Truncate the timespan of a BirdFlow model
extend_birdflow()
Extend BirdFlow extent
validate_BirdFlow()
Function to validate a BirdFlow object
pad_timestep()
pad timesteps from BirdFlow models
upgrade_birdflow()
Upgrade an older BirdFlow object to the current in-memory format

Deprecated

route_migration()
Deprecated function to generate migration routes from a BirdFlow model
evaluate_performance()
Evaluate BirdFlow model performance
calc_flux()
Calculate Bird Flow Migration Traffic Rate
plot_flux()
Plot Bird Flow Migration Traffic Rate (BMTR)
animate_flux()
Animate Bird Flow Migration Traffic Rate (BMTR)
interval_log_likelihood()
Calculate log likelihoods of observed bird movements
Routes()
Deprecated function to convert a data frame into a Routes object
BirdFlowIntervals()
Deprecated function to make a BirdFlowIntervals object from a data frame
as_BirdFlowRoutes()
Deprecated function to convert Routes to BirdFlowRoutes
as_BirdFlowIntervals()
Deprecated function to convert BirdFlowRoutes to BirdFlowIntervals