This function downloads the location data and timestamp of a study stored in Movebank as a move/moveStack object
# 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,...)
Object of class 'Move' or 'MoveStack'
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
.
a MovebankLogin
object, if empty you'll be asked to enter your username and password
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.
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'.
logical; if TRUE duplicated timestamps values will be removed. See 'Note'.
logical; if TRUE the deployments will be downloaded separately. See 'Details'.
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.
Marco Smolla & Anne Scharf
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.
movebankLogin,getMovebankLocationData, getMovebankNonLocationData
if (FALSE) {
# obtain a login
login<-movebankLogin()
# returns a MoveStack object from the specified study
getMovebankData(study="Ocelots on Barro Colorado Island, Panama", login=login)
# returns a Move object (there is only one individual in this study)
getMovebankData(study="Coatis on BCI Panama (data from Powell et al. 2017)", 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