move (version 3.2.2)

getMovebankData: Download data from Movebank

Description

This function downloads the location data and timestamp of a study stored in Movebank

Usage

# S4 method for numeric,character,MovebankLogin
getMovebankData(study, animalName, login, ...)

# S4 method for numeric,numeric,MovebankLogin getMovebankData(study, animalName, login, removeDuplicatedTimestamps=FALSE, includeExtraSensors=FALSE, deploymentAsIndividuals=FALSE, includeOutliers=FALSE,...)

Arguments

study

character or numeric. Character: full name of the study, as stored on Movebank. Numeric: Movebank ID of the study which can be obtained on the Study Details page on Movebank or with getMovebankID.

login

a MovebankLogin object, if empty you'll be asked to enter your username and password

animalName

character. Name of the individuals as stored on Movebank. A single individual or a vector of several individuals from the same study can be specified. Optional.

includeExtraSensors

logical; if TRUE data from non location sensors included in the study will be also downloaded, the data will automatically be stored in the unUsedRecords slot as they cannot produce locations. See 'Details'.

removeDuplicatedTimestamps

logical; if TRUE duplicated timestamps values will be removed. See 'Note'.

deploymentAsIndividuals

logical; if TRUE the deployments will be downloaded separately. See 'Details'.

includeOutliers

logical; if TRUE locations marked as outliers in Movebank will be included in the regular trajectory otherwise as unUsedRecords. See 'Details'

...

Additional arguments passed on to the movebank API through getMovebank function:

timestamp_start, timestamp_end

character or POSIXct. Starting and/or ending timestamp to download the data for a specific time period. Timestamps have to be provided in format 'yyyyMMddHHmmssSSS'. If POSIXct then it is converted to character using UTC as a time zone, note that this can change the time. Optional.

Value

Object of class 'Move' or 'MoveStack'

Details

getMovebankData belongs to the Movebank browsing functions and returns a Move object from studies with only one animal or a MoveStack object for studies with multiple animals. Remember that you need an account on Movebank, see movebankLogin.

Attribute names: The definitions of the content of the columns within the @idData, @sensor, @data slots of the move or moveStack object is detailed in the Attribute Dictionary on Movebank

includeExtraSensors: If this includeExtraSensors=TRUE the data of all non location sensors (e.g. acceleration, magnetometer, etc) available in the study will be downloaded and stored in the unUsedRecords slot. Data from a single or a set of non location sensors can be also downloaded as a data.frame with the function getMovebankNonLocationData

deploymentAsIndividuals: If single individuals have several deployments, and these are wished to be downloaded separately, this can be done by setting deploymentAsIndividuals=TRUE. In this case the "@trackId" will contain the names of the deployments.

idData: The idData slot contains only the information of the animals. To obtain information on tags, deployments and sensors of the study use the function getMovebankReferenceTable. When deploymentAsIndividuals=TRUE than the idData slot contains the information of the deployments.

See Also

movebankLogin, getMovebankNonLocationData

Examples

Run this code
# NOT RUN {
# obtain a login
login<-movebankLogin()

# returns a MoveStack object from the specified study
getMovebankData(study="BCI Ocelot", login=login) 

# returns a Move object (there is only one individual in this study)
getMovebankData(study="BCI Agouti", login=login) 

# returns a MoveStack with two individuals
getMovebankData(study=123413, animalName=c("Mancha","Yara"), login=login) 

# Get a specific timerange, eg: all positions untill "2003-05-06 19:45:10.000"
(ocelots <- getMovebankData(study=123413, animalName=c("Mancha","Yara"), 
                            login=login, timestamp_end="20030506194510000"))

timestamps(ocelots)
# }

Run the code above in your browser using DataLab