
Routes()
is used to convert data frames containing bird movement data into a formal Routes
object with the same data.
Source: R/Routes.R
Routes.Rd
Routes()
is used to convert data frames containing bird movement
data into a formal Routes
object with the same data.
Arguments
- data
A data frame with data on bird movement. Likely tracking, banding, or Motus data on real birds; or possibly synthetic versions of the same.It must have the following columns:
date
Date or Date Time object of class
Date
,POSIXlt
, orPOSIXct
lat
,lon
The latitude and longitude of the location in WGS84 (EPSG::4326)
route_type
The type of route - one of
"tracking"
,"banding"
,"motus"
,"unknown"
, or"synthetic"
Types can be mixed in the column.
Other columns are permitted and will be retained in
Routes
object but dropped if they are converted toBirdFlowRoutes
.- species
Either: a character scalar suitable for use with
ebirdst::get_species()
; or a list with species metadata which must includecommon_name
and can optionally also includescientific_name
andspecies_code
and any other standard BirdFlow species metadata. Seespecies_info()
for a description of the full list. Note list input is not checked against eBird species codes and names. Scalar input is preferred unless the species does not conform to eBird's taxonomy.- source
Optional text describing the source of the data.
source()
must be of classcharacter
can have one or more elements.
Value
An object of class Routes
which has the following components
- data
A data frame with the input
data
- species
A list with, at a minimum items
common_name
,scientific_name
, andspecies_code
and depending on thespecies
argument potentially having all the items returned bylookup_species_metadata()
- source
Same as the input
source